Hello swift user base,<br><br>I have been having trouble with a bit of swift code for a while now, and despite my hesitancy to ask other people to debug my code, I believe my issue may be more of a lack of understanding of swift than a simple syntax error, so I have decided to send out this email. Specifically, I have a single_file_mapper mapping to a file which does not yet exist when my code is run, in hopes that the file being mapped to will be written to by a an app call. However, when I try running my code, I get the error back from swift <br>
<br>Execution failed:<br> File not found: <i>filename </i>(in this case new_point1_1.mat)<br><i><br></i>This paradigm of referencing files that do not yet exist has worked before in swift, so I do not know what the problem is here. Hopefully it is not a simple syntax bug. Anyway, thank you for your help,<br>
<br>Jonathan<br><br>----- My Code: ----------<br><br>#cce_ua.swift<br>type file;<br><br>int num_complexes = @toint(@arg("num_complexes"));<br>int num_simplexes_per_complex = @toint(@arg("num_simplexes_per_complex"));<br>
<br>app (file output, file log) cce_ua (file input1, file input2, int number, file input3)<br>{<br> cce_ua @input1 @input2 @output number @input3 stdout=@filename(log) stderr=@filename(log);<br> #located at _RUNDIR_/swat/cce_ua.sh<br>
}<br><br>file inSCE<single_file_mapper;file="SCE_Par.mat">;<br>file inrunswat<single_file_mapper;file="RunSwat.m">;<br><br>foreach i in [1:num_complexes]<br>{<br> foreach j in [1:num_simplexes_per_complex]<br>
{ <br> # These files already exist in the local directory<br> file input<single_file_mapper; file=@strcat("simplex", i, "_", j, ".mat")>;<br> # These files do not exist in the local directory at runtime<br>
file output<single_file_mapper; file=@strcat("new_point", i, "_", j, ".mat")>;<br> file log<single_file_mapper; file=@strcat("cce_ua", i, "_", j, "_log.txt")>;<br>
<br> (output, log) = cce_ua(inSCE, input, i*num_simplexes_per_complex + j, inrunswat);<br> } <br>}<br><br><br>---- The command line call to swift (broken up over multiple lines) ---<br>swift -tc.file swift_files/executable_locations -sites.file swift_files/sites.xml cce_ua.swift -num_complexes=2 -num_simplexes_per_complex=1<br>