[Swift-devel] Multiple output files
Jonathan Ozik
jozik at uchicago.edu
Thu Mar 20 18:04:59 CDT 2014
Mike,
Thank you for the detailed information.
Regarding the "collect files of this pattern into an array" semantics, is the "file system mapper" not intended for this?
I think I'm stumbling on the notion of what output, in terms of files, can be produced using an "app" element in a swift script. Most of the examples have stdout (or stderr) pointing to a file, but I'm not sure I've found an example where side effects (e.g., files produced by a process) can be retrieved. Is this possible?
Jonathan
On Mar 19, 2014, at 7:03 PM, Michael Wilde <wilde at anl.gov> wrote:
> Hi Jonathan,
>
> You are thinking about this exactly right, and have (quickly) hit one of our programmability weaknesses.
>
> At the moment, there is no good way to do this. We have had much discussion on it, though, and plan to create such "collect files of this pattern into an array" semantics.
>
> What we do for now is one of these two work-arounds:
>
> - write a single tarfile as output (in a wrapper script for the app, which tars files of the appropriate pattern, like "*.simout"
>
> - write the files directly to a specific (shared) directory instead of the Swift "app task directory" (called "job directory" in the current User Guide. Then return a single file with a list of these file names, and map that using an array_mapper if the results need to be passed to a next stage
>
> We should see if we can get a prototype of such a feature to you in short order. But hopefully just to get things working, one of the above methods will suffice for you, for now.
>
> Im cc'ing swift-devel to see what we can do.
>
> Thanks for reminding us of this fairly common need!
>
> - Mike
>
> On 3/19/14, 5:57 PM, Jonathan Ozik wrote:
>> Mike,
>>
>> Perhaps I'm not thinking about this correctly, but I'm trying to figure out how to collect output files that are generated by a simulation run. The scenario is that the Repast executable is run and, after it is run, there are files that are output into some location. There can be an arbitrary number of such output files per simulation run but, if necessary, it would be possible to pre-specify which files to look for. Is there a simple way to indicate to swift that it should collect all the files matching a particular pattern within a directory? It looks like the mappers might work here but as far as I understand the mappers are defined prior to calls to executables. Again, I might just not be thinking about this in a "swift" enough way.
>>
>> Jonathan
>>
>
> --
> Michael Wilde
> Mathematics and Computer Science Computation Institute
> Argonne National Laboratory The University of Chicago
>
More information about the Swift-devel
mailing list