[Swift-user] swift hangs on local

Michael Wilde wilde at mcs.anl.gov
Wed May 16 15:01:16 CDT 2012


Its possibly hanging because Swift cant determine the size of the resulting res[] array:
---
app (file o, file _res[]) mars (file _ctl, file lic, file _inp[])
{
  mars @_ctl stdout=@o;
}

...
foreach ctlfile, i in ctl {
  file res[]<simple_mapper; location="result", prefix="mars.", suffix=".ot*">;
  (out[i], res) = mars(ctlfile, licence, inp);
}
---

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?

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.

- Mike


----- Original Message -----
> From: "Ketan Maheshwari" <ketancmaheshwari at gmail.com>
> To: "Swift User" <swift-user at ci.uchicago.edu>
> Sent: Wednesday, May 16, 2012 2:41:58 PM
> Subject: [Swift-user] swift hangs on local
> I am trying to run the GE Energy stuff through Swift but seems like
> Swift hangs without progress. Details below:
> 
> 
> Inputs: a control file
> Binary: marsMain
> expected outputs: mars.ot* files and a .bin file
> 
> 
> Needs : LIC and 3 .in files to be present in the pwd.
> 
> 
> The directory is on mcs workstations: ~ketan/ketan_mars.
> 
> 
> Standalone, it runs as follows:
> 
> 
> ./marsMain ctlfiles/mars.ctl
> 
> 
> The swift file is mars.swift
> 
> 
> log for a hanged run is in the directory:
> mars-20120516-1434-1xfq9zuc.log
> 
> 
> stdout looks like this:
> 
> 
> 
> [steamroller:ketan_mars]$ swift -config cf -tc.file tc -sites.file
> sites.xml mars.swift
> Swift 0.93 swift-r5520 cog-r3338 (cog modified locally)
> 
> 
> RunID: 20120516-1440-u3srmzyd
> Progress: time: Wed, 16 May 2012 14:40:30 -0500
> (input): found 1 files
> (input): found 3 files
> No events in 10s.
> 
> 
> Registered futures:
> file[] res Open, 0 elements, 1 listeners
> ----
> 
> 
> Waiting threads:
> 0-7-0-3
> ----
> 
> 
> 
> =======
> 
> 
> 
> 
> swift.workdir is not created.
> 
> 
> Clues? --
> Ketan
> 
> 
> 
> _______________________________________________
> Swift-user mailing list
> Swift-user at ci.uchicago.edu
> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user

-- 
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory




More information about the Swift-user mailing list