[Bug 1337] New: external dependencies broken in 0.95?
https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=1337 Summary: external dependencies broken in 0.95? Product: Swift Version: 0.95 Platform: PC OS/Version: Mac OS Status: NEW Severity: normal Priority: P2 Component: General AssignedTo: [email protected] ReportedBy: [email protected] I'm working with a script that uses the external datatype to manage the order in which the applications run. The apps needs to run in a specific order: combine1, combine2, combine3. This script runs as expected in Swift 0.94. In Swift 0.95, the ordering is broken. Sometimes it will run combine1,combine2,combine3. Other times it will run combine3,combine2,combine1. Log file at http://web.ci.uchicago.edu/~davidk/combine-20140924-0223-gz394mb0.log Script --- type file; app (external e) combine1 (string lat, string var, string inputDir, string outputDir, string param) { combine1 lat var inputDir outputDir param; } app (external e) combine2 (external[string][string] varsDone, int chunk, int varNum, string fileDir, string outDir, string param) { combine2 varNum chunk fileDir outDir param; } app combine3 (external[int][int] inputs, string var, file scenarioInput[], string varDirectory, string param) { combine3 var varDirectory param; } app (file output) findParts (string workDir) { findParts workDir stdout=@output; } file scenarios[] <filesys_mapper; location=@arg("campaign"), pattern="*">; string params = @strcat(@arg("workdir"), "/params.psims"); string variables[] = @strsplit(@arg("variables"), ","); string lats[] = readData(findParts(@arg("workdir"))); string partDir = @strcat(@arg("workdir"), "/parts"); string varDir = @strcat(@arg("workdir"), "/var_files"); int num_chunks = @toInt(@arg("num_chunks", "1")); external varsCombine1[string][string]; external varsCombine2[int][int]; # parts -> var_files tracef("\nRunning combine1 . . . %k\n", lats); foreach lat in lats { foreach var in variables { varsCombine1[lat][var] = combine1(lat, var, partDir, varDir, params); } } # var_files -> nc files tracef("\nRunning combine2 . . . %k\n", varsCombine1); foreach variable,variable_idx in variables { foreach chunk in [1:num_chunks] { varsCombine2[variable_idx][chunk] = combine2(varsCombine1, chunk, variable_idx+1, varDir, @arg("workdir"), params); } } # nc files -> final files tracef("\nRunning combine3 . . . %k\n", varsCombine2); foreach var in variables { combine3(varsCombine2, var, scenarios, @arg("workdir"), params); } --- -- Configure bugmail: https://bugzilla.mcs.anl.gov/swift/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=1337 --- Comment #1 from Mihael Hategan <[email protected]> 2014-09-24 13:50:24 --- What seems to be happening there is that the iteration over "variables" that sets varsCombine2 (line 41) completes without actually iterating over "variables". This immediately closes varsCombine2 with a size of 0 and allows combine3 to run. So I wouldn't say this is an issue with external, but some issue either with foreach or with the premature closing of "variables". -- Configure bugmail: https://bugzilla.mcs.anl.gov/swift/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=1337 --- Comment #2 from David Kelly <[email protected]> 2014-09-26 19:00:30 --- I tried to come up with a simple test script to reproduce the problem but didn't have much luck, so I'm not sure where exactly where this script is breaking. For now I'm able to get around this by running each app in their own Swift script (combine1.swift, combine2.swift, combine3.swift). The scripts get called in the correct order by a shell script they use. This is probably not ideal because we're using automatic coasters, which means when a script finishes it has to re-allocate resources. But for now this lets us use 0.95 and have working swift logs, restart logs, and do plotting. -- Configure bugmail: https://bugzilla.mcs.anl.gov/swift/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla-daemon@mcs.anl.gov