Sorry, I should have specified this earlier, but I do not believe my cce_ua function was ever called. The first line of my cce_ua function is a statement that prints to stdout. The second and third lines open a file (via absolute path) and write to it. I have not observed either of those being executed. Furthermore, the following (matlab) code process the output argument:<br>
<br>output_point_location = argv(){3};<br><br>new_point = ....<br><br>save(output_point_location, 'new_point');<br><br>There is no other code that modifies the output_point_location variable. So shouldn't this work, given how swift passes files as command line arguments?<br>
<br>I think something else is the problem, but of course any solution would be great. Thanks!<br><br>Jonathan<br><br><div class="gmail_quote">On Tue, Jul 3, 2012 at 5:11 PM, Michael Wilde <span dir="ltr"><<a href="mailto:wilde@mcs.anl.gov" target="_blank">wilde@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Jonathan, from a cursory read of your script, I suspect that the Swift runtime is complaining that the app cce_ua did not produce the file new_point1_1.mat, which your output file mapping specified.<br>
<br>
Given your output mapping, Swift is expecting new_point1_1.mat to exist in the temporary job directory in which your app was launched. I suspect your app (matlab script) did not create a file of this exact name.<br>
<br>
You can specify the property "sitedir.keep=true" in your config file (e.g., -config cf on the command line) to tell Swift to retain these job directories on failure. They should be below the "workdirectory" that you specified in your sites.xml file.<br>
(I think...)<br>
<br>
- Mike<br>
<div><div class="h5"><br>
<br>
----- Original Message -----<br>
> From: "Jonathan Margoliash" <<a href="mailto:jmargolpeople@gmail.com">jmargolpeople@gmail.com</a>><br>
> To: <a href="mailto:swift-user@ci.uchicago.edu">swift-user@ci.uchicago.edu</a><br>
> Sent: Tuesday, July 3, 2012 4:48:16 PM<br>
> Subject: [Swift-user] How does swift mapping to files that do not yet exist work?<br>
> Hello swift user base,<br>
><br>
> I have been having trouble with a bit of swift code for a while now,<br>
> and despite my hesitancy to ask other people to debug my code, I<br>
> believe my issue may be more of a lack of understanding of swift than<br>
> a simple syntax error, so I have decided to send out this email.<br>
> Specifically, I have a single_file_mapper mapping to a file which does<br>
> not yet exist when my code is run, in hopes that the file being mapped<br>
> to will be written to by a an app call. However, when I try running my<br>
> code, I get the error back from swift<br>
><br>
> Execution failed:<br>
> File not found: filename (in this case new_point1_1.mat)<br>
><br>
> This paradigm of referencing files that do not yet exist has worked<br>
> before in swift, so I do not know what the problem is here. Hopefully<br>
> 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 =<br>
> @toint(@arg("num_simplexes_per_complex"));<br>
><br>
> app (file output, file log) cce_ua (file input1, file input2, int<br>
> number, file input3)<br>
> {<br>
> cce_ua @input1 @input2 @output number @input3 stdout=@filename(log)<br>
> 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,<br>
> ".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,<br>
> ".mat")>;<br>
> file log<single_file_mapper; file=@strcat("cce_ua", i, "_", j,<br>
> "_log.txt")>;<br>
><br>
> (output, log) = cce_ua(inSCE, input, i*num_simplexes_per_complex + j,<br>
> inrunswat);<br>
> }<br>
> }<br>
><br>
><br>
> ---- The command line call to swift (broken up over multiple lines)<br>
> ---<br>
> swift -tc.file swift_files/executable_locations -sites.file<br>
> swift_files/sites.xml cce_ua.swift -num_complexes=2<br>
> -num_simplexes_per_complex=1<br>
><br>
</div></div>> _______________________________________________<br>
> Swift-user mailing list<br>
> <a href="mailto:Swift-user@ci.uchicago.edu">Swift-user@ci.uchicago.edu</a><br>
> <a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Michael Wilde<br>
Computation Institute, University of Chicago<br>
Mathematics and Computer Science Division<br>
Argonne National Laboratory<br>
<br>
</font></span></blockquote></div><br>