[Swift-devel] problems with external dependencies
Michael Wilde
wilde at mcs.anl.gov
Sun Mar 22 16:30:14 CDT 2009
I meant I was expecting:
SwiftScript trace: I am populateDatabase
Progress: Selecting site:7 Stage in:1 Finished successfully:2
Progress: Selecting site:2 Stage in:1 Active:1 Finished successfully:6
SwiftScript trace: i am analyseDatabase
Final status: Finished successfully:10
sur$
On 3/22/09 4:28 PM, Michael Wilde wrote:
> Im trying to adapt the example of external dependencies in the user
> guide to enable me to wait for a procedure that does lot of parallel
> work to complete, and then analyze its results.
>
> Im trying this approach, instead of ordinary dependencies, because the
> list of datasets produced in the parallel operations exceeds the command
> line length limits of wrapper.sh.
>
> So Im trying to use externals to indicate that the parallel work has
> completed, then call a local analysis script with just one item from the
> parallel outputs, and this script will then locate all the other outputs
> with similar names by perusing a local directory passed as a string.
> (theres a few more elegant variants on this, but this simple hack will
> suffice for the current need).
>
> Problem is that in the following test example to see if this will work,
> the script does not seem to wait for the echo app invocations to
> complete before running the final trace() function:
>
> type file;
>
> app (file o) echo (int i) { echo i stdout=@o; }
>
> (external o) populateDatabase() {
> trace("I am populateDatabase");
> int j[] = [0:9];
> file r[];
> foreach i in j {
> r[i] = echo(i);
> }
> }
>
> analyseDatabase(external i) {
> trace("i am analyseDatabase");
> }
>
> external database;
>
> database = populateDatabase();
> analyseDatabase(database);
>
> ---
>
> Instead, I get:
>
> Swift svn swift-r2724 (swift modified locally) cog-r2333
>
> RunID: 20090322-1553-ltauz86a
> Progress:
> SwiftScript trace: i am analyseDatabase
> SwiftScript trace: I am populateDatabase
> Progress: Selecting site:7 Stage in:1 Finished successfully:2
> Progress: Selecting site:2 Stage in:1 Active:1 Finished successfully:6
> Final status: Finished successfully:10
> sur$
>
> ---
> while I was expecting:
>
>
> SwiftScript trace: i am analyseDatabase
> SwiftScript trace: I am populateDatabase
> Progress: Selecting site:7 Stage in:1 Finished successfully:2
> Progress: Selecting site:2 Stage in:1 Active:1 Finished successfully:6
> Final status: Finished successfully:10
> sur$
>
>
> --
>
> Ive been trying the same with an array of externals, to no avail (yet).
>
> Can you offer any guidance on how to do this, or whether its possible
> with the current implementation of external?
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
More information about the Swift-devel
mailing list