Thanks Mike! Replaced the output mapper with ext mapper and it works now.<br><br><div class="gmail_quote">On Wed, May 16, 2012 at 4:01 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">Its possibly hanging because Swift cant determine the size of the resulting res[] array:<br>
---<br>
app (file o, file _res[]) mars (file _ctl, file lic, file _inp[])<br>
{<br>
  mars @_ctl stdout=@o;<br>
}<br>
<br>
...<br>
foreach ctlfile, i in ctl {<br>
  file res[]<simple_mapper; location="result", prefix="mars.", suffix=".ot*">;<br>
  (out[i], res) = mars(ctlfile, licence, inp);<br>
}<br>
---<br>
<br>
You mapped it with a "dynamic" output mapper (vs. a static output mapper like the ext mapper). A dynamic mapper will map each element of an array on demand, as its added to an array.  In your script, however, the array would get set by the app() function mares(), but Swift has no way of knowing how many elements mars() is placing in that array. Is that a number you can know up-front, and set it in an ext mapper? There is no way I know of in Swift to have an app function return a dynamically-determined number of elements in an output array. Im not even certain that returning an output array works. If it truly needs to be dynamic, can you return a single file of filenames, and then use readData or other mappers to map that to a new array of output files?<br>

<br>
In any case, try for a first step just removing the res[] argument and array, and see if the rest of your data flow works.<br>
<br>
- Mike<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
----- Original Message -----<br>
> From: "Ketan Maheshwari" <<a href="mailto:ketancmaheshwari@gmail.com">ketancmaheshwari@gmail.com</a>><br>
> To: "Swift User" <<a href="mailto:swift-user@ci.uchicago.edu">swift-user@ci.uchicago.edu</a>><br>
> Sent: Wednesday, May 16, 2012 2:41:58 PM<br>
> Subject: [Swift-user] swift hangs on local<br>
> I am trying to run the GE Energy stuff through Swift but seems like<br>
> Swift hangs without progress. Details below:<br>
><br>
><br>
> Inputs: a control file<br>
> Binary: marsMain<br>
> expected outputs: mars.ot* files and a .bin file<br>
><br>
><br>
> Needs : LIC and 3 .in files to be present in the pwd.<br>
><br>
><br>
> The directory is on mcs workstations: ~ketan/ketan_mars.<br>
><br>
><br>
> Standalone, it runs as follows:<br>
><br>
><br>
> ./marsMain ctlfiles/mars.ctl<br>
><br>
><br>
> The swift file is mars.swift<br>
><br>
><br>
> log for a hanged run is in the directory:<br>
> mars-20120516-1434-1xfq9zuc.log<br>
><br>
><br>
> stdout looks like this:<br>
><br>
><br>
><br>
> [steamroller:ketan_mars]$ swift -config cf -tc.file tc -sites.file<br>
> sites.xml mars.swift<br>
> Swift 0.93 swift-r5520 cog-r3338 (cog modified locally)<br>
><br>
><br>
> RunID: 20120516-1440-u3srmzyd<br>
> Progress: time: Wed, 16 May 2012 14:40:30 -0500<br>
> (input): found 1 files<br>
> (input): found 3 files<br>
> No events in 10s.<br>
><br>
><br>
> Registered futures:<br>
> file[] res Open, 0 elements, 1 listeners<br>
> ----<br>
><br>
><br>
> Waiting threads:<br>
> 0-7-0-3<br>
> ----<br>
><br>
><br>
><br>
> =======<br>
><br>
><br>
><br>
><br>
> swift.workdir is not created.<br>
><br>
><br>
> Clues? --<br>
> Ketan<br>
><br>
><br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<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>
<br>
--<br>
</div></div><span class="HOEnZb"><font color="#888888">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><br clear="all"><div><br></div>-- <br><font face="'courier new', monospace">Ketan</font><br><br><br>