From noreply at svn.ci.uchicago.edu Fri Jun 6 09:06:42 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Fri, 6 Jun 2008 09:06:42 -0500 (CDT) Subject: [Swift-commit] r2048 - trunk/tests/sites Message-ID: <20080606140642.E330F1360015@www.ci.uchicago.edu> Author: benc Date: 2008-06-06 09:06:42 -0500 (Fri, 06 Jun 2008) New Revision: 2048 Modified: trunk/tests/sites/run-site trunk/tests/sites/tguc-fork-gram2.xml trunk/tests/sites/tguc-fork-gram4.xml trunk/tests/sites/tguc-pbs-gram2-syntax1.xml trunk/tests/sites/tguc-pbs-gram2.xml trunk/tests/sites/tguc-pbs-gram4.xml Log: move TGUC sites to use different hostname for data transfer Modified: trunk/tests/sites/run-site =================================================================== --- trunk/tests/sites/run-site 2008-06-04 20:41:20 UTC (rev 2047) +++ trunk/tests/sites/run-site 2008-06-06 14:06:42 UTC (rev 2048) @@ -12,4 +12,5 @@ export SWIFT_TEST_PARAMS="-sites.file ../sites/${SITE} -tc.file tmp.tc.data.sites" -./run 061-cattwo 130-fmri 103-quote.swift 1032-singlequote.swift 1031-quote.swift 1033-singlequote.swift 141-space-in-filename 142-space-and-quotes +#./run 061-cattwo 130-fmri 103-quote.swift 1032-singlequote.swift 1031-quote.swift 1033-singlequote.swift 141-space-in-filename 142-space-and-quotes +./run 061-cattwo Modified: trunk/tests/sites/tguc-fork-gram2.xml =================================================================== --- trunk/tests/sites/tguc-fork-gram2.xml 2008-06-04 20:41:20 UTC (rev 2047) +++ trunk/tests/sites/tguc-fork-gram2.xml 2008-06-06 14:06:42 UTC (rev 2048) @@ -1,7 +1,7 @@ - + /home/benc/swifttest Modified: trunk/tests/sites/tguc-fork-gram4.xml =================================================================== --- trunk/tests/sites/tguc-fork-gram4.xml 2008-06-04 20:41:20 UTC (rev 2047) +++ trunk/tests/sites/tguc-fork-gram4.xml 2008-06-06 14:06:42 UTC (rev 2048) @@ -1,7 +1,7 @@ - + /home/benc/swifttest Modified: trunk/tests/sites/tguc-pbs-gram2-syntax1.xml =================================================================== --- trunk/tests/sites/tguc-pbs-gram2-syntax1.xml 2008-06-04 20:41:20 UTC (rev 2047) +++ trunk/tests/sites/tguc-pbs-gram2-syntax1.xml 2008-06-06 14:06:42 UTC (rev 2048) @@ -1,7 +1,7 @@ - + /home/benc/swifttest TG-CCR080002N Modified: trunk/tests/sites/tguc-pbs-gram2.xml =================================================================== --- trunk/tests/sites/tguc-pbs-gram2.xml 2008-06-04 20:41:20 UTC (rev 2047) +++ trunk/tests/sites/tguc-pbs-gram2.xml 2008-06-06 14:06:42 UTC (rev 2048) @@ -1,7 +1,7 @@ - + TG-CCR080002N /home/benc/swifttest Modified: trunk/tests/sites/tguc-pbs-gram4.xml =================================================================== --- trunk/tests/sites/tguc-pbs-gram4.xml 2008-06-04 20:41:20 UTC (rev 2047) +++ trunk/tests/sites/tguc-pbs-gram4.xml 2008-06-06 14:06:42 UTC (rev 2048) @@ -1,7 +1,7 @@ - + /home/benc/swifttest TG-CCR080002N From noreply at svn.ci.uchicago.edu Fri Jun 6 10:14:51 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Fri, 6 Jun 2008 10:14:51 -0500 (CDT) Subject: [Swift-commit] r2049 - in trunk: libexec resources src/org/griphyn/vdl/karajan/lib tests/language-behaviour Message-ID: <20080606151451.9410A1360015@www.ci.uchicago.edu> Author: benc Date: 2008-06-06 10:14:50 -0500 (Fri, 06 Jun 2008) New Revision: 2049 Added: trunk/tests/language-behaviour/033-and.ff.out.expected trunk/tests/language-behaviour/033-and.ft.out.expected trunk/tests/language-behaviour/033-and.swift trunk/tests/language-behaviour/033-and.tf.out.expected trunk/tests/language-behaviour/033-and.tt.out.expected trunk/tests/language-behaviour/034-or.ff.out.expected trunk/tests/language-behaviour/034-or.ft.out.expected trunk/tests/language-behaviour/034-or.swift trunk/tests/language-behaviour/034-or.tf.out.expected trunk/tests/language-behaviour/034-or.tt.out.expected trunk/tests/language-behaviour/035-not.swift Modified: trunk/libexec/execute-default.k trunk/libexec/execute-dryrun.k trunk/libexec/operators.xml trunk/libexec/vdl-int.k trunk/libexec/vdl-lib.xml trunk/libexec/vdl.k trunk/resources/XDTM.stg trunk/src/org/griphyn/vdl/karajan/lib/Operators.java trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java Log: make boolean operators work Modified: trunk/libexec/execute-default.k =================================================================== --- trunk/libexec/execute-default.k 2008-06-06 14:06:42 UTC (rev 2048) +++ trunk/libexec/execute-default.k 2008-06-06 15:14:50 UTC (rev 2049) @@ -10,7 +10,7 @@ if( derr == false then( if( - not(done) try( + sys:not(done) try( sequential( echo("{tr} started") log(LOG:INFO, "START thread={#thread} tr={tr}") Modified: trunk/libexec/execute-dryrun.k =================================================================== --- trunk/libexec/execute-dryrun.k 2008-06-06 14:06:42 UTC (rev 2048) +++ trunk/libexec/execute-dryrun.k 2008-06-06 15:14:50 UTC (rev 2049) @@ -3,7 +3,7 @@ done := isDone(stageout) if( - not(done) sequential( + sys:not(done) sequential( mark(stageout, err=false) graphStuff(tr, stagein, stageout, err=false, maybe(args=arguments)) ) Modified: trunk/libexec/operators.xml =================================================================== --- trunk/libexec/operators.xml 2008-06-06 14:06:42 UTC (rev 2048) +++ trunk/libexec/operators.xml 2008-06-06 15:14:50 UTC (rev 2049) @@ -11,5 +11,8 @@ + + + Modified: trunk/libexec/vdl-int.k =================================================================== --- trunk/libexec/vdl-int.k 2008-06-06 14:06:42 UTC (rev 2048) +++ trunk/libexec/vdl-int.k 2008-06-06 15:14:50 UTC (rev 2049) @@ -32,12 +32,12 @@ ) element(isDone, [stageout] - and( + sys:and( for(pv, stageout [path, var] := each(pv) vdl:isLogged(var, path) ) - not(isEmpty(stageout)) + sys:not(isEmpty(stageout)) ) ) @@ -320,7 +320,7 @@ ) element(transferKickstartRec, [rhost, wfdir, jobid, jobdir] - if(not(file:exists("{VDL:SCRIPTNAME}-{VDL:RUNID}.d")) + if(sys:not(file:exists("{VDL:SCRIPTNAME}-{VDL:RUNID}.d")) task:dir:make("{VDL:SCRIPTNAME}-{VDL:RUNID}.d") ) recfile := "{jobid}-kickstart.xml" @@ -336,7 +336,7 @@ ) element(transferWrapperLog, [rhost, wfdir, jobid, jobdir] - if(not(file:exists("{VDL:SCRIPTNAME}-{VDL:RUNID}.d")) + if(sys:not(file:exists("{VDL:SCRIPTNAME}-{VDL:RUNID}.d")) task:dir:make("{VDL:SCRIPTNAME}-{VDL:RUNID}.d") ) recfile := "{jobid}-info" Modified: trunk/libexec/vdl-lib.xml =================================================================== --- trunk/libexec/vdl-lib.xml 2008-06-06 14:06:42 UTC (rev 2048) +++ trunk/libexec/vdl-lib.xml 2008-06-06 15:14:50 UTC (rev 2049) @@ -14,10 +14,10 @@ - + - + Modified: trunk/libexec/vdl.k =================================================================== --- trunk/libexec/vdl.k 2008-06-06 14:06:42 UTC (rev 2048) +++ trunk/libexec/vdl.k 2008-06-06 15:14:50 UTC (rev 2049) @@ -131,7 +131,7 @@ //this should be reached after everything is done if( - not(anyerrors) then( + sys:not(anyerrors) then( //hmm, you can append to channels! append(warnings, from(warnings, cleanups(cleanup))) ) Modified: trunk/resources/XDTM.stg =================================================================== --- trunk/resources/XDTM.stg 2008-06-06 14:06:42 UTC (rev 2048) +++ trunk/resources/XDTM.stg 2008-06-06 15:14:50 UTC (rev 2049) @@ -293,9 +293,19 @@ >> -and(left,right,sourcelocation) ::= "$left$$right$" +and(left,right,sourcelocation) ::= << + + $left$ + $right$ + +>> -or(left, right,sourcelocation) ::= "$left$$right$" +or(left, right,sourcelocation) ::= << + + $left$ + $right$ + +>> not(exp,sourcelocation) ::= "$exp$" Modified: trunk/src/org/griphyn/vdl/karajan/lib/Operators.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/Operators.java 2008-06-06 14:06:42 UTC (rev 2048) +++ trunk/src/org/griphyn/vdl/karajan/lib/Operators.java 2008-06-06 15:14:50 UTC (rev 2049) @@ -15,6 +15,7 @@ public static final SwiftArg L = new SwiftArg.Positional("left"); public static final SwiftArg R = new SwiftArg.Positional("right"); + public static final SwiftArg U = new SwiftArg.Positional("unaryArg"); private DSHandle newNum(Type type, double value) throws ExecutionException { try { @@ -61,16 +62,21 @@ } } - private static final String[] OPERATORS = new String[] { "vdlop_sum", "vdlop_subtraction", + private static final String[] BINARY_OPERATORS = new String[] { "vdlop_sum", "vdlop_subtraction", "vdlop_product", "vdlop_quotient", "vdlop_fquotient", "vdlop_iquotient", - "vdlop_remainder", "vdlop_le", "vdlop_ge", "vdlop_lt", "vdlop_gt", "vdlop_eq" }; + "vdlop_remainder", "vdlop_le", "vdlop_ge", "vdlop_lt", "vdlop_gt", "vdlop_eq", "vdlop_and", "vdlop_or" }; + private static final String[] UNARY_OPERATORS = new String[] { "vdlop_not" }; - private static final Arg[] OPARGS = new Arg[] { L, R }; + private static final Arg[] BINARY_ARGS = new Arg[] { L, R }; + private static final Arg[] UNARY_ARGS = new Arg[] { U }; static { - for (int i = 0; i < OPERATORS.length; i++) { - setArguments(OPERATORS[i], OPARGS); + for (int i = 0; i < BINARY_OPERATORS.length; i++) { + setArguments(BINARY_OPERATORS[i], BINARY_ARGS); } + for (int i = 0; i < UNARY_OPERATORS.length; i++) { + setArguments(UNARY_OPERATORS[i], UNARY_ARGS); + } } public Object vdlop_sum(VariableStack stack) throws ExecutionException { @@ -154,4 +160,21 @@ } return newBool(l.equals(r)); } + + public Object vdlop_and(VariableStack stack) throws ExecutionException { + boolean l = ((Boolean)L.getValue(stack)).booleanValue(); + boolean r = ((Boolean)R.getValue(stack)).booleanValue(); + return newBool(l && r); + } + + public Object vdlop_or(VariableStack stack) throws ExecutionException { + boolean l = ((Boolean)L.getValue(stack)).booleanValue(); + boolean r = ((Boolean)R.getValue(stack)).booleanValue(); + return newBool(l || r); + } + + public Object vdlop_not(VariableStack stack) throws ExecutionException { + boolean u = ((Boolean)U.getValue(stack)).booleanValue(); + return newBool(!u); + } } Modified: trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java 2008-06-06 14:06:42 UTC (rev 2048) +++ trunk/src/org/griphyn/vdl/karajan/lib/VDLFunction.java 2008-06-06 15:14:50 UTC (rev 2049) @@ -160,6 +160,9 @@ else if (Types.INT.equals(type)) { return new Double(TypeUtil.toInt(value)); } + else if (Types.BOOLEAN.equals(type)) { + return new Boolean(TypeUtil.toBoolean(value)); + } else if (value instanceof String) { return (String) value; } Added: trunk/tests/language-behaviour/033-and.ff.out.expected =================================================================== --- trunk/tests/language-behaviour/033-and.ff.out.expected (rev 0) +++ trunk/tests/language-behaviour/033-and.ff.out.expected 2008-06-06 15:14:50 UTC (rev 2049) @@ -0,0 +1 @@ +false Added: trunk/tests/language-behaviour/033-and.ft.out.expected =================================================================== --- trunk/tests/language-behaviour/033-and.ft.out.expected (rev 0) +++ trunk/tests/language-behaviour/033-and.ft.out.expected 2008-06-06 15:14:50 UTC (rev 2049) @@ -0,0 +1 @@ +false Added: trunk/tests/language-behaviour/033-and.swift =================================================================== --- trunk/tests/language-behaviour/033-and.swift (rev 0) +++ trunk/tests/language-behaviour/033-and.swift 2008-06-06 15:14:50 UTC (rev 2049) @@ -0,0 +1,18 @@ +type messagefile; + +(messagefile t) p(boolean b) { + app { + echo b stdout=@filename(t); + } +} + +messagefile fffile <"033-and.ff.out">; +messagefile ftfile <"033-and.ft.out">; +messagefile tffile <"033-and.tf.out">; +messagefile ttfile <"033-and.tt.out">; + +fffile = p(false && false); +ftfile = p(false && true); +tffile = p(true && false); +ttfile = p(true && true); + Added: trunk/tests/language-behaviour/033-and.tf.out.expected =================================================================== --- trunk/tests/language-behaviour/033-and.tf.out.expected (rev 0) +++ trunk/tests/language-behaviour/033-and.tf.out.expected 2008-06-06 15:14:50 UTC (rev 2049) @@ -0,0 +1 @@ +false Added: trunk/tests/language-behaviour/033-and.tt.out.expected =================================================================== --- trunk/tests/language-behaviour/033-and.tt.out.expected (rev 0) +++ trunk/tests/language-behaviour/033-and.tt.out.expected 2008-06-06 15:14:50 UTC (rev 2049) @@ -0,0 +1 @@ +true Added: trunk/tests/language-behaviour/034-or.ff.out.expected =================================================================== --- trunk/tests/language-behaviour/034-or.ff.out.expected (rev 0) +++ trunk/tests/language-behaviour/034-or.ff.out.expected 2008-06-06 15:14:50 UTC (rev 2049) @@ -0,0 +1 @@ +false Added: trunk/tests/language-behaviour/034-or.ft.out.expected =================================================================== --- trunk/tests/language-behaviour/034-or.ft.out.expected (rev 0) +++ trunk/tests/language-behaviour/034-or.ft.out.expected 2008-06-06 15:14:50 UTC (rev 2049) @@ -0,0 +1 @@ +true Added: trunk/tests/language-behaviour/034-or.swift =================================================================== --- trunk/tests/language-behaviour/034-or.swift (rev 0) +++ trunk/tests/language-behaviour/034-or.swift 2008-06-06 15:14:50 UTC (rev 2049) @@ -0,0 +1,18 @@ +type messagefile; + +(messagefile t) p(boolean b) { + app { + echo b stdout=@filename(t); + } +} + +messagefile fffile <"034-or.ff.out">; +messagefile ftfile <"034-or.ft.out">; +messagefile tffile <"034-or.tf.out">; +messagefile ttfile <"034-or.tt.out">; + +fffile = p(false || false); +ftfile = p(false || true); +tffile = p(true || false); +ttfile = p(true || true); + Added: trunk/tests/language-behaviour/034-or.tf.out.expected =================================================================== --- trunk/tests/language-behaviour/034-or.tf.out.expected (rev 0) +++ trunk/tests/language-behaviour/034-or.tf.out.expected 2008-06-06 15:14:50 UTC (rev 2049) @@ -0,0 +1 @@ +true Added: trunk/tests/language-behaviour/034-or.tt.out.expected =================================================================== --- trunk/tests/language-behaviour/034-or.tt.out.expected (rev 0) +++ trunk/tests/language-behaviour/034-or.tt.out.expected 2008-06-06 15:14:50 UTC (rev 2049) @@ -0,0 +1 @@ +true Added: trunk/tests/language-behaviour/035-not.swift =================================================================== --- trunk/tests/language-behaviour/035-not.swift (rev 0) +++ trunk/tests/language-behaviour/035-not.swift 2008-06-06 15:14:50 UTC (rev 2049) @@ -0,0 +1,14 @@ +type messagefile; + +(messagefile t) p(boolean b) { + app { + echo b stdout=@filename(t); + } +} + +messagefile tfile <"035-not.t.out">; +messagefile ffile <"035-not.f.out">; + +tfile = p(!true); +ffile = p(!false); + From noreply at svn.ci.uchicago.edu Fri Jun 6 11:55:20 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Fri, 6 Jun 2008 11:55:20 -0500 (CDT) Subject: [Swift-commit] r2050 - trunk/resources Message-ID: <20080606165520.E33511360015@www.ci.uchicago.edu> Author: benc Date: 2008-06-06 11:55:20 -0500 (Fri, 06 Jun 2008) New Revision: 2050 Modified: trunk/resources/swiftscript.g Log: remove "null" token from parser - it is not used anywhere Modified: trunk/resources/swiftscript.g =================================================================== --- trunk/resources/swiftscript.g 2008-06-06 15:14:50 UTC (rev 2049) +++ trunk/resources/swiftscript.g 2008-06-06 16:55:20 UTC (rev 2050) @@ -1000,10 +1000,6 @@ code=template("bConst"); code.setAttribute("value", f.getText()); } - | n:"null" - { - code=template("null"); - } | code=arrayInitializer ; From noreply at svn.ci.uchicago.edu Fri Jun 6 17:40:16 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Fri, 6 Jun 2008 17:40:16 -0500 (CDT) Subject: [Swift-commit] r2051 - in trunk: . docs libexec tests/misc Message-ID: <20080606224016.070AB1360015@www.ci.uchicago.edu> Author: benc Date: 2008-06-06 17:40:15 -0500 (Fri, 06 Jun 2008) New Revision: 2051 Added: trunk/tests/misc/workernode-local.sh Modified: trunk/CHANGES.txt trunk/docs/userguide.xml trunk/libexec/wrapper.sh trunk/tests/misc/run Log: worker-node local copying of temp files Modified: trunk/CHANGES.txt =================================================================== --- trunk/CHANGES.txt 2008-06-06 16:55:20 UTC (rev 2050) +++ trunk/CHANGES.txt 2008-06-06 22:40:15 UTC (rev 2051) @@ -1,3 +1,9 @@ +(06/06/08) +*** SWIFT_JOBDIR_PATH environment variable can be use in profiles (or + anywhere else that will get it to the worker script) to cause the + worker to copy input files to a possibly-worker-node-local working + directory. + (04/24/08) *** PATHPREFIX environment variable is prefixed to the path before execution in wrapper.sh; this variable can be set in profile entries using the usual Modified: trunk/docs/userguide.xml =================================================================== --- trunk/docs/userguide.xml 2008-06-06 16:55:20 UTC (rev 2050) +++ trunk/docs/userguide.xml 2008-06-06 22:40:15 UTC (rev 2051) @@ -2587,6 +2587,14 @@ Typing 'java -help' will sometimes give a list of commands. The Sun Java 1.4.2 command line options are documented here. + +SWIFT_JOBDIR_PATH - set in env namespace profiles. If set, then Swift will +use the path specified here as a worker-node local temporary directory to +copy input files to before running a job. If unset, Swift will keep input +files on the site-shared filesystem. In some cases, copying to a worker-node +local directory can be much faster than having applications access the +site-shared filesystem directly. + Modified: trunk/libexec/wrapper.sh =================================================================== --- trunk/libexec/wrapper.sh 2008-06-06 16:55:20 UTC (rev 2050) +++ trunk/libexec/wrapper.sh 2008-06-06 22:40:15 UTC (rev 2051) @@ -144,7 +144,15 @@ fail 254 "Missing arguments (-a option)" fi -DIR=jobs/$JOBDIR/$ID +if [ "X$SWIFT_JOBDIR_PATH" != "X" ]; then + log "Job directory mode is: local copy" + DIR=${SWIFT_JOBDIR_PATH}/$JOBDIR/$ID + COPYNOTLINK=1 +else + log "Job directory mode is: link on shared filesystem" + DIR=jobs/$JOBDIR/$ID + COPYNOTLINK=0 +fi PATH=$PATH:/bin:/usr/bin @@ -180,9 +188,15 @@ logstate "LINK_INPUTS" for L in $INF ; do - ln -s "$PWD/shared/$L" "$DIR/$L" 2>&1 >& $INFO - checkError 254 "Failed to link input file $L" - log "Linked input: $PWD/shared/$L to $DIR/$L" + if [ $COPYNOTLINK = 1 ]; then + cp "$PWD/shared/$L" "$DIR/$L" 2>&1 >& $INFO + checkError 254 "Failed to copy input file $L" + log "Copied input: $PWD/shared/$L to $DIR/$L" + else + ln -s "$PWD/shared/$L" "$DIR/$L" 2>&1 >& $INFO + checkError 254 "Failed to link input file $L" + log "Linked input: $PWD/shared/$L to $DIR/$L" + fi done logstate "EXECUTE" Modified: trunk/tests/misc/run =================================================================== --- trunk/tests/misc/run 2008-06-06 16:55:20 UTC (rev 2050) +++ trunk/tests/misc/run 2008-06-06 22:40:15 UTC (rev 2051) @@ -1,5 +1,5 @@ #!/bin/sh -for a in clusters no-retries dryrun typecheck path-prefix restart restart2 restart3 restart4 restart5; do +for a in clusters no-retries dryrun typecheck path-prefix restart restart2 restart3 restart4 restart5 workernode-local; do ./${a}.sh R=$? echo test $a ended with return value $R Added: trunk/tests/misc/workernode-local.sh =================================================================== --- trunk/tests/misc/workernode-local.sh (rev 0) +++ trunk/tests/misc/workernode-local.sh 2008-06-06 22:40:15 UTC (rev 2051) @@ -0,0 +1,20 @@ +#!/bin/bash + +rm -rf wn-local.d/ wn-local-timestamp + +mkdir wn-local.d +sleep 5s +touch wn-local-timestamp +sleep 5s + +export SWIFT_JOBDIR_PATH=`pwd`/wn-local.d/ + +swift ../language-behaviour/001-echo.swift + +if [ wn-local.d -nt wn-local-timestamp ]; then + echo something happened in the worker node directory - PASS + exit 0 +else + echo nothing happened in the worker node directory - FAIL + exit 1 +fi Property changes on: trunk/tests/misc/workernode-local.sh ___________________________________________________________________ Name: svn:executable + * From noreply at svn.ci.uchicago.edu Sat Jun 7 08:00:09 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sat, 7 Jun 2008 08:00:09 -0500 (CDT) Subject: [Swift-commit] r2052 - in trunk: resources src/org/griphyn/vdl/karajan/lib tests/language-behaviour Message-ID: <20080607130009.E30571AB0193@www.ci.uchicago.edu> Author: benc Date: 2008-06-07 08:00:09 -0500 (Sat, 07 Jun 2008) New Revision: 2052 Added: trunk/tests/language-behaviour/086-iterate-concurrent.swift Modified: trunk/resources/Karajan.stg trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java Log: fix bug 142 - concurrent mapper should now work inside iterate{}. tests added for that, and also to check that concurrent mapper + restarts + iterate{} works. Modified: trunk/resources/Karajan.stg =================================================================== --- trunk/resources/Karajan.stg 2008-06-06 22:40:15 UTC (rev 2051) +++ trunk/resources/Karajan.stg 2008-06-07 13:00:09 UTC (rev 2052) @@ -160,8 +160,11 @@ iterate(declarations,statements,cond,var) ::= << + + + - + $sub_comp(declarations=declarations, statements=statements)$ Modified: trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java =================================================================== --- trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java 2008-06-06 22:40:15 UTC (rev 2051) +++ trunk/src/org/griphyn/vdl/karajan/lib/InfiniteCountingWhile.java 2008-06-07 13:00:09 UTC (rev 2052) @@ -6,6 +6,9 @@ package org.griphyn.vdl.karajan.lib; +import java.util.Arrays; +import java.util.List; + import org.globus.cog.karajan.arguments.Arg; import org.globus.cog.karajan.workflow.nodes.*; import org.globus.cog.karajan.stack.VariableStack; @@ -26,7 +29,7 @@ stack.setVar("#condition", new Condition()); stack.setVar(VAR, "$"); String counterName = (String)stack.getVar(VAR); - stack.setVar(counterName, new Integer(0)); // should be DSHandle-wrapped + stack.setVar(counterName, Arrays.asList(new Integer[] {new Integer(0)})); super.pre(stack); } @@ -56,9 +59,11 @@ fn = (FlowElement) getElement(0); String counterName = (String) stack.getVar(VAR); - int i = ((Integer)stack.getVar(counterName)).intValue(); + List l = (List)stack.getVar(counterName); + Integer wrappedi = (Integer)l.get(0); + int i = wrappedi.intValue(); i++; - stack.setVar(counterName, new Integer(i)); // should be DSHandle-wrapped + stack.setVar(counterName, Arrays.asList(new Integer[] {new Integer(i)})); } else { fn = (FlowElement) getElement(index++); Added: trunk/tests/language-behaviour/086-iterate-concurrent.swift =================================================================== --- trunk/tests/language-behaviour/086-iterate-concurrent.swift (rev 0) +++ trunk/tests/language-behaviour/086-iterate-concurrent.swift 2008-06-07 13:00:09 UTC (rev 2052) @@ -0,0 +1,14 @@ +type messagefile; + +(messagefile t) greeting() { + app { + echo "hello" stdout=@filename(t); + } +} + +iterate i { + messagefile outfile; + outfile = greeting(); +} until(i>10); + + From noreply at svn.ci.uchicago.edu Sat Jun 7 08:58:02 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sat, 7 Jun 2008 08:58:02 -0500 (CDT) Subject: [Swift-commit] r2053 - trunk/libexec Message-ID: <20080607135802.BFDE21AB0193@www.ci.uchicago.edu> Author: benc Date: 2008-06-07 08:58:02 -0500 (Sat, 07 Jun 2008) New Revision: 2053 Modified: trunk/libexec/vdl-int.k Log: move execution end log nearer the end of actual execution (further forwards in time) and replace the existing end log location with STAGING_OUT Modified: trunk/libexec/vdl-int.k =================================================================== --- trunk/libexec/vdl-int.k 2008-06-07 13:00:09 UTC (rev 2052) +++ trunk/libexec/vdl-int.k 2008-06-07 13:58:02 UTC (rev 2053) @@ -409,7 +409,7 @@ checkJobStatus(rhost, wfdir, jobid, tr, jobdir) - log(LOG:DEBUG, "JOB_END jobid={jobid}") + log(LOG:DEBUG, "STAGING_OUT jobid={jobid}") /* need to stage the files to upper scratch area in case they are not transfered to another site @@ -427,6 +427,7 @@ discard(transferWrapperLog(rhost, wfdir, jobid, jobdir)) ) vdl:cacheUnlockFiles(stagein, sharedDir, rhost, cleanupFiles(cacheFilesToRemove, rhost)) + log(LOG:DEBUG, "JOB_END jobid={jobid}") ) catch("^Abort$" log(LOG:DEBUG, "JOB_CANCELED jobid={jobid}") From noreply at svn.ci.uchicago.edu Sat Jun 7 09:13:17 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sat, 7 Jun 2008 09:13:17 -0500 (CDT) Subject: [Swift-commit] r2054 - trunk/docs Message-ID: <20080607141317.8CBC91AB0193@www.ci.uchicago.edu> Author: benc Date: 2008-06-07 09:13:17 -0500 (Sat, 07 Jun 2008) New Revision: 2054 Modified: trunk/docs/userguide.xml Log: id for function section Modified: trunk/docs/userguide.xml =================================================================== --- trunk/docs/userguide.xml 2008-06-07 13:58:02 UTC (rev 2053) +++ trunk/docs/userguide.xml 2008-06-07 14:13:17 UTC (rev 2054) @@ -2066,7 +2066,7 @@ -
Function reference +
Function reference This section details functions that are available for use in the SwiftScript language. From noreply at svn.ci.uchicago.edu Sat Jun 7 15:54:32 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sat, 7 Jun 2008 15:54:32 -0500 (CDT) Subject: [Swift-commit] r2055 - in trunk/tests/sites: . broken Message-ID: <20080607205432.3B4509B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-07 15:54:31 -0500 (Sat, 07 Jun 2008) New Revision: 2055 Added: trunk/tests/sites/broken/ trunk/tests/sites/broken/osg-ucsdt2-condor.xml trunk/tests/sites/broken/osg-ucsdt2-fork.xml Log: site definitions for sites that seem broken but are interesting to run tests against Added: trunk/tests/sites/broken/osg-ucsdt2-condor.xml =================================================================== --- trunk/tests/sites/broken/osg-ucsdt2-condor.xml (rev 0) +++ trunk/tests/sites/broken/osg-ucsdt2-condor.xml 2008-06-07 20:54:31 UTC (rev 2055) @@ -0,0 +1,10 @@ + + + + + + + /osgfs/data + + + Added: trunk/tests/sites/broken/osg-ucsdt2-fork.xml =================================================================== --- trunk/tests/sites/broken/osg-ucsdt2-fork.xml (rev 0) +++ trunk/tests/sites/broken/osg-ucsdt2-fork.xml 2008-06-07 20:54:31 UTC (rev 2055) @@ -0,0 +1,10 @@ + + + + + + + /osgfs/data + + + From noreply at svn.ci.uchicago.edu Mon Jun 9 11:07:57 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Mon, 9 Jun 2008 11:07:57 -0500 (CDT) Subject: [Swift-commit] r2056 - trunk/tests/sites/broken Message-ID: <20080609160757.3E83F9B4002@www.ci.uchicago.edu> Author: benc Date: 2008-06-09 11:07:56 -0500 (Mon, 09 Jun 2008) New Revision: 2056 Added: trunk/tests/sites/broken/osg-ucsdt2-b2-condor.xml trunk/tests/sites/broken/osg-ucsdt2-b2-fork.xml Log: more suspect sites Added: trunk/tests/sites/broken/osg-ucsdt2-b2-condor.xml =================================================================== --- trunk/tests/sites/broken/osg-ucsdt2-b2-condor.xml (rev 0) +++ trunk/tests/sites/broken/osg-ucsdt2-b2-condor.xml 2008-06-09 16:07:56 UTC (rev 2056) @@ -0,0 +1,9 @@ + + + + + /osgfs/data/lixi + .542 + 0.05 + + Added: trunk/tests/sites/broken/osg-ucsdt2-b2-fork.xml =================================================================== --- trunk/tests/sites/broken/osg-ucsdt2-b2-fork.xml (rev 0) +++ trunk/tests/sites/broken/osg-ucsdt2-b2-fork.xml 2008-06-09 16:07:56 UTC (rev 2056) @@ -0,0 +1,9 @@ + + + + + /osgfs/data/lixi + .542 + 0.05 + + From noreply at svn.ci.uchicago.edu Wed Jun 11 16:40:11 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Wed, 11 Jun 2008 16:40:11 -0500 (CDT) Subject: [Swift-commit] r2057 - / Message-ID: <20080611214011.4E8629B4001@www.ci.uchicago.edu> Author: houzx Date: 2008-06-11 16:40:09 -0500 (Wed, 11 Jun 2008) New Revision: 2057 Added: gasateria/ Log: Making a new dir. From noreply at svn.ci.uchicago.edu Thu Jun 12 15:57:23 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Thu, 12 Jun 2008 15:57:23 -0500 (CDT) Subject: [Swift-commit] r2059 - gasateria/bin Message-ID: <20080612205723.1D89C9B4001@www.ci.uchicago.edu> Author: houzx Date: 2008-06-12 15:57:22 -0500 (Thu, 12 Jun 2008) New Revision: 2059 Removed: gasateria/bin/update-sites-cache- Log: Deleting file 'update-sites-cache-' Deleted: gasateria/bin/update-sites-cache- =================================================================== --- gasateria/bin/update-sites-cache- 2008-06-11 21:43:56 UTC (rev 2058) +++ gasateria/bin/update-sites-cache- 2008-06-12 20:57:22 UTC (rev 2059) @@ -1,59 +0,0 @@ -#/bin/bash -CDATE=`date +%F-%R` -DIR=`pwd` -USER=`whoami` -# get the grid computing sites -GRID=$1 -VO=$2 -if [ "$GRID" == "" ]; then - echo "Please input the GRID name as the first parameter." - echo "The GRID can be:osg osg-itb (teragrid?)" - echo "If necessary, please input the virtual organization name as the second parameter.Just use a space to separate the two parameters." - echo "For osg, vo can be:CDF CMS CompBioGrid DES DOSAR DZero Engage Fermilab fMRI GADU geant4 GLOW GPN GRASE GridChem GridEx GROW i2u2 iVDGL LIGO mariachi MIS nanoHUB NWICG Ops OSG OSGEDU SDSS STAR USATLAS" - exit -fi - - if [ "$VO" == "" ]; then - { - /usr/bin/wget -O $DIR/tmp/$VO-vo-sitelist.txt "http://vors.grid.iu.edu/cgi-bin/tindex.cgi?grid=$GRID" 1>/dev/null 2>/dev/null - } - else - { - /usr/bin/wget -O $DIR/tmp/$VO-vo-sitelist.txt "http://vors.grid.iu.edu/cgi-bin/tindex.cgi?grid=$GRID&VO=$VO" 1>/dev/null 2>/dev/null - } - fi - -/bin/cat $DIR/tmp/$VO-vo-sitelist.txt |grep compute |grep PASS |awk -F, {'print $3'} > $DIR/tmp/$GRID-$VO-compute-sites.txt - -#touch sites-$CDATE.txt -#for i in $(cat $DIR/tmp/$GRID-$VO-compute-sites.txt) -for i in $(/bin/awk -F: '{print $1}' $DIR/tmp/$GRID-$VO-compute-sites.txt) -do - echo $i >> $DIR/tmp/sites-$CDATE.txt - globusrun -a -r $i/jobmanager-fork >> $DIR/tmp/sites-$CDATE.txt -done - -if [ -f $DIR/tmp/sites-$CDATE.txt ]; then - m=0 - for i in $(sed -n '/success/=' $DIR/tmp/sites-$CDATE.txt) -do - #echo $i - m=`expr $m + 1` - j=`expr $i - 2` - S=`sed -n "$j"p $DIR/tmp/sites-$CDATE.txt` - echo $S >> $DIR/tmp/$GRID-$VO-sites-success-$CDATE.txt -done - echo " Now it's `date +%D-%R`.Altogether, there are $m successful available grid sites." -fi - -#If there is new sites, update sites cache -if [ $m > 24 ]; then - for SITE in $(cat $DIR/tmp/$GRID-$VO-sites-success-$CDATE.txt) - do - /bin/grep $SITE $DIR/.osg-sites.cache >> $DIR/tmp/$GRID-$VO-avail-sites-$CDATE.txt - done - -fi - -#clean the files -/bin/rm -rf $DIR/tmp/sites-$CDATE.txt $DIR/tmp/$GRID-$VO-sites-success-$CDATE.txt From noreply at svn.ci.uchicago.edu Sun Jun 15 06:31:04 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 06:31:04 -0500 (CDT) Subject: [Swift-commit] r2060 - log-processing Message-ID: <20080615113104.6F7C29B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 06:31:01 -0500 (Sun, 15 Jun 2008) New Revision: 2060 Modified: log-processing/makefile Log: another file to clean Modified: log-processing/makefile =================================================================== --- log-processing/makefile 2008-06-12 20:57:22 UTC (rev 2059) +++ log-processing/makefile 2008-06-15 11:31:01 UTC (rev 2060) @@ -16,7 +16,7 @@ cp *.event *.html *.png report-$(SDL) clean: - rm -f start-times.data kickstart-times.data start-time.tmp end-time.tmp threads.list tasks.list log *.data *.shifted *.png *.event *.coloured-event *.total *.tmp *.transitions *.last karatasks-type-counts.txt index.html *.lastsummary execstages.plot total.plot colour.plot jobs-sites.table jobs.retrycount.summary kickstart.stats execution-counts.txt site-duration.txt jobs.retrycount sp.plot karatasks.coloured-sorted-event *.cedps *.stats t.inf *.seenstates tmp-* info.* clusterstats trname-summary sites-list.data.nm info-md5sums + rm -f start-times.data kickstart-times.data start-time.tmp end-time.tmp threads.list tasks.list log *.data *.shifted *.png *.event *.coloured-event *.total *.tmp *.transitions *.last karatasks-type-counts.txt index.html *.lastsummary execstages.plot total.plot colour.plot jobs-sites.table jobs.retrycount.summary kickstart.stats execution-counts.txt site-duration.txt jobs.retrycount sp.plot karatasks.coloured-sorted-event *.cedps *.stats t.inf *.seenstates tmp-* info.* clusterstats trname-summary sites-list.data.nm info-md5sums pse2d-tmp.eip t.inf: $(LOG) ./compute-t-inf > t.inf < $(LOG) From noreply at svn.ci.uchicago.edu Sun Jun 15 07:16:26 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 07:16:26 -0500 (CDT) Subject: [Swift-commit] r2061 - in log-processing: . bin Message-ID: <20080615121626.26EF69B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 07:16:25 -0500 (Sun, 15 Jun 2008) New Revision: 2061 Added: log-processing/bin/ log-processing/bin/swift-plot-log Log: command to generate webpage for specified log Added: log-processing/bin/swift-plot-log =================================================================== --- log-processing/bin/swift-plot-log (rev 0) +++ log-processing/bin/swift-plot-log 2008-06-15 12:16:25 UTC (rev 2061) @@ -0,0 +1,28 @@ +#!/bin/bash + +# $1 should be the pathname of the log file to plot + +LOG_CODE_HOME="`dirname $0`/../" + +FC="${1:0:1}" + +if [ "$FC" = "/" ]; then # absolute path + LOG_FILE_PATH=$1 +else + LOG_FILE_PATH="`pwd`/$1" +fi + +LOG_DIRECTORY=`dirname $LOG_FILE_PATH` + +LOG_FILE_BASE=`basename $LOG_FILE_PATH .log` + +echo Log file path is $LOG_FILE_PATH +echo Log is in directory $LOG_DIRECTORY +echo Log basename is $LOG_FILE_BASE + + +cd $LOG_CODE_HOME + +make SDL=$LOG_FILE_BASE LOG=$LOG_FILE_PATH clean webpage distributable distribute + +mv report-$LOG_FILE_BASE $LOG_DIRECTORY/ Property changes on: log-processing/bin/swift-plot-log ___________________________________________________________________ Name: svn:executable + * From noreply at svn.ci.uchicago.edu Sun Jun 15 07:49:17 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 07:49:17 -0500 (CDT) Subject: [Swift-commit] r2062 - log-processing Message-ID: <20080615124917.D0D5D9B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 07:49:17 -0500 (Sun, 15 Jun 2008) New Revision: 2062 Modified: log-processing/index.html.template Log: move more interesting graph to the front of the report Modified: log-processing/index.html.template =================================================================== --- log-processing/index.html.template 2008-06-15 12:16:25 UTC (rev 2061) +++ log-processing/index.html.template 2008-06-15 12:49:17 UTC (rev 2062) @@ -3,37 +3,26 @@

Swift log analysis

-

This is an automatically generated post-mortem log file -analysis for Swift and related tools.

-

(TODO indicate log file name here; indicate report generation time here; indicate version of swift that was used - if locally modified print a big red warning)

-
    -
  • 1. Whole workflow
  • -
  • 2. execute - application calls from SwiftScript
  • -
  • 3. execute2 - attempts by Swift to invoke applications
  • -
  • 4. kickstart - records from the worker nodes
  • -
  • 5. karajan - statistics on the guts of the execution engine
  • -
  • 6. falkon
  • -
  • 7. per-site statistics
  • -
+
+

Summary of execution

+

This plot shows the state of executions over time. When a SwiftScript +program makes a procedure call, an execution will appear on this plot +in START state. Over time, jobs should end up either in END_SUCCESS or +END_FAILURE states. +

+ -

In this document, text formatted like this is boilerplate explanatory -text and will not change from run to run...

-
... whilst text formatted like this is generated based on the
-supplied run log files.
+

Final status totals:

+
+include(`execute.lastsummary')
 
-

Workflow

-

The workflow itself -(text file of event(s)) - - there should be just one of them and it should -take the whole span of execution time:

- - +

execute

Executions (text file of events) @@ -286,5 +275,14 @@
5.


+ +

Workflow

+ +

The workflow itself +(text file of event(s)) + - there should be just one of them and it should +take the whole span of execution time:

+ +

end

From noreply at svn.ci.uchicago.edu Sun Jun 15 09:42:06 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 09:42:06 -0500 (CDT) Subject: [Swift-commit] r2063 - log-processing Message-ID: <20080615144206.3B8869B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 09:42:05 -0500 (Sun, 15 Jun 2008) New Revision: 2063 Modified: log-processing/index.html.template Log: more rearrangement of report page Modified: log-processing/index.html.template =================================================================== --- log-processing/index.html.template 2008-06-15 12:49:17 UTC (rev 2062) +++ log-processing/index.html.template 2008-06-15 14:42:05 UTC (rev 2063) @@ -12,7 +12,8 @@

This plot shows the state of executions over time. When a SwiftScript program makes a procedure call, an execution will appear on this plot in START state. Over time, jobs should end up either in END_SUCCESS or -END_FAILURE states. +END_FAILURE states. (More information about +execute events)

@@ -21,7 +22,17 @@ include(`execute.lastsummary')
+

Breakdown of execute2 final statuses by site: +(More information about execute2 events)

+include(`jobs-sites.table') + + +

Number of execute2 jobs at once - this is basically the number of +execution attempts that have been submitted to some batch system such +as GRAM (so are either queued or executing)

+ +

execute

Executions From noreply at svn.ci.uchicago.edu Sun Jun 15 12:10:25 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 12:10:25 -0500 (CDT) Subject: [Swift-commit] r2064 - log-processing/bin Message-ID: <20080615171025.2084D9B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 12:10:24 -0500 (Sun, 15 Jun 2008) New Revision: 2064 Modified: log-processing/bin/swift-plot-log Log: make karajan and scheduler plots Modified: log-processing/bin/swift-plot-log =================================================================== --- log-processing/bin/swift-plot-log 2008-06-15 14:42:05 UTC (rev 2063) +++ log-processing/bin/swift-plot-log 2008-06-15 17:10:24 UTC (rev 2064) @@ -23,6 +23,6 @@ cd $LOG_CODE_HOME -make SDL=$LOG_FILE_BASE LOG=$LOG_FILE_PATH clean webpage distributable distribute +make SDL=$LOG_FILE_BASE LOG=$LOG_FILE_PATH clean webpage.kara webpage.weights webpage distributable distribute mv report-$LOG_FILE_BASE $LOG_DIRECTORY/ From noreply at svn.ci.uchicago.edu Sun Jun 15 12:10:55 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 12:10:55 -0500 (CDT) Subject: [Swift-commit] r2065 - log-processing Message-ID: <20080615171055.CDB7D9B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 12:10:55 -0500 (Sun, 15 Jun 2008) New Revision: 2065 Modified: log-processing/table-jobs-sites Log: right-align numbers in site table Modified: log-processing/table-jobs-sites =================================================================== --- log-processing/table-jobs-sites 2008-06-15 17:10:24 UTC (rev 2064) +++ log-processing/table-jobs-sites 2008-06-15 17:10:55 UTC (rev 2065) @@ -6,7 +6,7 @@ STATES="JOB_START JOB_END APPLICATION_EXCEPTION" -echo "" +echo "
" echo " " @@ -24,12 +24,12 @@ ACC=0 -echo "" +echo "" for status in $STATES; do count=$(grep $status execute2.event | grep $site | wc -l) ACC=$(( $ACC + $count )) -echo "" +echo "" done count=$(grep $site execute2.event | wc -l) From noreply at svn.ci.uchicago.edu Sun Jun 15 12:11:33 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 12:11:33 -0500 (CDT) Subject: [Swift-commit] r2066 - log-processing Message-ID: <20080615171133.5828C9B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 12:11:33 -0500 (Sun, 15 Jun 2008) New Revision: 2066 Added: log-processing/active-state-transitions Modified: log-processing/index.html.template log-processing/makefile.karatasks log-processing/makefile.webpage Log: plot of jobs in active state Added: log-processing/active-state-transitions =================================================================== --- log-processing/active-state-transitions (rev 0) +++ log-processing/active-state-transitions 2008-06-15 17:11:33 UTC (rev 2066) @@ -0,0 +1,34 @@ +#!/usr/bin/env perl + +# pull out transitions that go to active state and the immediately +# following transition + +use Time::Local; + +$prevjob = "active-state-transitions no previous event"; + +$prevline = ""; + +$active = 0; + +foreach $n () { + $n =~ /^([^ ]*) ([^ ]*) ([^ ]*) (.*)$/; + $ts = $1; + $job = $2; + $state = $3; + + if($state eq "Active") { + print "$n"; + $active = 1; + } elsif( ($job eq $prevjob) && ($active) ) { + if($active == 1) { + print $n; + $active = 0; + } + } else { + $prevjob = $job; + }; + $prevline = $n; +} + +# print $prevline; Property changes on: log-processing/active-state-transitions ___________________________________________________________________ Name: svn:executable + * Modified: log-processing/index.html.template =================================================================== --- log-processing/index.html.template 2008-06-15 17:10:55 UTC (rev 2065) +++ log-processing/index.html.template 2008-06-15 17:11:33 UTC (rev 2066) @@ -33,6 +33,11 @@ as GRAM (so are either queued or executing)

+

Number of karajan level job submissions that are 'Active' - this means +that the underlying execution layer (such as GRAM) has reported that the +job is actually executing

+ +

execute

Executions Modified: log-processing/makefile.karatasks =================================================================== --- log-processing/makefile.karatasks 2008-06-15 17:10:55 UTC (rev 2065) +++ log-processing/makefile.karatasks 2008-06-15 17:11:33 UTC (rev 2066) @@ -33,3 +33,5 @@ karatasks.JOB_SUBMISSION.transitions: karatasks.transitions ./karatasks-only JOB_SUBMISSION > $@ +karatasks.JOB_SUBMISSION.Active.transitions: karatasks.JOB_SUBMISSION.transitions + cat karatasks.JOB_SUBMISSION.transitions | ./swap-and-sort-and-swap | ./active-state-transitions > karatasks.JOB_SUBMISSION.Active.transitions Modified: log-processing/makefile.webpage =================================================================== --- log-processing/makefile.webpage 2008-06-15 17:10:55 UTC (rev 2065) +++ log-processing/makefile.webpage 2008-06-15 17:11:33 UTC (rev 2066) @@ -9,7 +9,8 @@ karatasks.FILE_OPERATION-total.png karatasks.JOB_SUBMISSION-trails.png \ karatasks.FILE_OPERATION-trails.png karatasks.FILE_TRANSFER-trails.png \ karatasks.FILE_TRANSFER.stats karatasks.FILE_OPERATION.stats \ -karatasks.JOB_SUBMISSION.stats karatasks-total.png index.html.kara +karatasks.JOB_SUBMISSION.stats karatasks-total.png \ +karatasks.JOB_SUBMISSION.Active-total.png index.html.kara webpage.clusters: karatasks.clusters.png karatasks.clusters-total.png \ karatasks.clusters.sorted-start.png karatasks.clusters-duration-histogram.png From noreply at svn.ci.uchicago.edu Sun Jun 15 14:51:16 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 14:51:16 -0500 (CDT) Subject: [Swift-commit] r2067 - in trunk: libexec src/org/griphyn/vdl/type Message-ID: <20080615195117.04DE99B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 14:51:16 -0500 (Sun, 15 Jun 2008) New Revision: 2067 Modified: trunk/libexec/vdl-int.k trunk/src/org/griphyn/vdl/type/Types.java Log: minor whitespace fixes Modified: trunk/libexec/vdl-int.k =================================================================== --- trunk/libexec/vdl-int.k 2008-06-15 17:11:33 UTC (rev 2066) +++ trunk/libexec/vdl-int.k 2008-06-15 19:51:16 UTC (rev 2067) @@ -246,9 +246,9 @@ task:transfer(srchost=host, srcfile=bname, srcdir=rdir, destdir=ldir, desthost=dhost, destprovider=provider) ) - vdl:logvar(var, path, host, dir, bname) - log(LOG:DEBUG, "FILE_STAGE_OUT_END srcname={bname} srcdir={rdir} srchost={host} ", - "destdir={ldir} desthost={dhost} provider={provider}") + vdl:logvar(var, path, host, dir, bname) + log(LOG:DEBUG, "FILE_STAGE_OUT_END srcname={bname} srcdir={rdir} srchost={host} ", + "destdir={ldir} desthost={dhost} provider={provider}") list(bname, rdir, host, file:size(fullLocal)) ) Modified: trunk/src/org/griphyn/vdl/type/Types.java =================================================================== --- trunk/src/org/griphyn/vdl/type/Types.java 2008-06-15 17:11:33 UTC (rev 2066) +++ trunk/src/org/griphyn/vdl/type/Types.java 2008-06-15 19:51:16 UTC (rev 2067) @@ -52,11 +52,11 @@ private static Type addPrimitiveType(String name) { Type type = Type.Factory.createType(name, true); addType(type); - return type; + return type; } - - public static final Type INT, STRING, FLOAT, BOOLEAN, ANY; + public static final Type INT, STRING, FLOAT, BOOLEAN, ANY; + // add built-in primitive types static { STRING = addPrimitiveType("string"); From noreply at svn.ci.uchicago.edu Sun Jun 15 15:35:54 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 15:35:54 -0500 (CDT) Subject: [Swift-commit] r2068 - trunk/tests/misc Message-ID: <20080615203554.529819B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 15:35:53 -0500 (Sun, 15 Jun 2008) New Revision: 2068 Added: trunk/tests/misc/restart-iterate.sh Modified: trunk/tests/misc/run Log: test of iterate with restarts Added: trunk/tests/misc/restart-iterate.sh =================================================================== --- trunk/tests/misc/restart-iterate.sh (rev 0) +++ trunk/tests/misc/restart-iterate.sh 2008-06-15 20:35:53 UTC (rev 2068) @@ -0,0 +1,95 @@ +#!/bin/bash + +export CF=swift.properties.restart-iterate +cat $(dirname $(which swift))/../etc/swift.properties | grep --invert-match -E '^lazy.errors=' > $CF +echo lazy.errors=true >> $CF + +rm -f *.rlog restart-*.out restart-iterate.kml restart-iterate.xml restart-iterate.*.out restart-iterate.*.out.single-run + +rm -rf _concurrent + +echo "localhost helperA $(pwd)/restart5-helper-success INSTALLED INTEL32::LINUX null" > tmp.restartOK.tc.data +echo "localhost helperB $(pwd)/restart5-helper-success INSTALLED INTEL32::LINUX null" >> tmp.restartOK.tc.data +echo "localhost helperC $(pwd)/restart5-helper-success INSTALLED INTEL32::LINUX null" >> tmp.restartOK.tc.data + +swift -config $CF -tc.file tmp.restartOK.tc.data restart-iterate.swift + +PRECHECKEXIT=$? + + +if [ "$PRECHECKEXIT" != 0 ]; then + echo Failed - attempt to run workflow without restart configuration failed + exit 1 +fi + +for fn in restart-iterate.*.out; do +mv $fn ${fn}.single-run +done + +rm -f *.rlog restart-*.out restart-iterate.kml restart-iterate.xml +rm -rf _concurrent + +echo "localhost helperA $(pwd)/restart5-helper-success INSTALLED INTEL32::LINUX null" > tmp.restartA.tc.data +echo "localhost helperB $(pwd)/restart5-helper-fail INSTALLED INTEL32::LINUX null" >> tmp.restartA.tc.data +echo "localhost helperC $(pwd)/restart5-helper-success INSTALLED INTEL32::LINUX null" >> tmp.restartA.tc.data + +swift -config $CF -tc.file tmp.restartA.tc.data restart-iterate.swift + +FIRSTEXIT=$? + +# this invocation should fail, with restart-1.out in existence but +# not the others + +if [ "$FIRSTEXIT" == 0 ]; then + echo Failed - workflow was indicated as successfully completed the first time round. + exit 2 +fi + +for i in 0 1 2 3 4 ; do + if [ ! -f restart-iterate.000$i.out ] ; then + echo Some first-time output files were missing + exit 4 + fi +done + +for i in 05 06 07 08 09 10 ; do + if [ -f restart-iterate.00$i.out ] ; then + echo Second-time output file appeared in first-time run + exit 5 + fi +done + +# now make A fail - we should have run it already, and so we want to make +# sure it does not run again; and make B succeed this time round. + +echo "localhost helperA $(pwd)/restart5-helper-fail INSTALLED INTEL32::LINUX null" > tmp.restartB.tc.data +echo "localhost helperB $(pwd)/restart5-helper-success INSTALLED INTEL32::LINUX null" >> tmp.restartB.tc.data +echo "localhost helperC $(pwd)/restart5-helper-success INSTALLED INTEL32::LINUX null" >> tmp.restartB.tc.data + +# there should be only a single rlog here, because we deleted them all +# at the start of this script. +swift -config $CF -resume *.rlog -tc.file tmp.restartB.tc.data restart-iterate.swift + +SECONDEXIT=$? + +if [ "$SECONDEXIT" != "0" ]; then + echo Failed - second round failed + exit 3 +fi + +if [ ! -f restart-iterate.0002.out ] ; then + echo Second-time output file missing + exit 5 +fi + +for i in 1 2 3; do + diff -q restart-iterate.000$i.out restart-iterate.000$i.out.single-run + if [ "$?" -ne "0" ]; then + echo restart-based output file $i differs from non-restarted output file + exit 6 + fi +done + +echo restart-iterate success +exit 0 + Property changes on: trunk/tests/misc/restart-iterate.sh ___________________________________________________________________ Name: svn:executable + * Modified: trunk/tests/misc/run =================================================================== --- trunk/tests/misc/run 2008-06-15 19:51:16 UTC (rev 2067) +++ trunk/tests/misc/run 2008-06-15 20:35:53 UTC (rev 2068) @@ -1,5 +1,5 @@ #!/bin/sh -for a in clusters no-retries dryrun typecheck path-prefix restart restart2 restart3 restart4 restart5 workernode-local; do +for a in clusters no-retries dryrun typecheck path-prefix restart restart2 restart3 restart4 restart5 restart-iterate workernode-local; do ./${a}.sh R=$? echo test $a ended with return value $R From noreply at svn.ci.uchicago.edu Sun Jun 15 16:03:09 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 16:03:09 -0500 (CDT) Subject: [Swift-commit] r2069 - trunk/libexec Message-ID: <20080615210309.8F7B39B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 16:03:09 -0500 (Sun, 15 Jun 2008) New Revision: 2069 Modified: trunk/libexec/vdl-int.k Log: my sick mind picks up the wrong meaning from this function name and makes me laugh; so I renamed it Modified: trunk/libexec/vdl-int.k =================================================================== --- trunk/libexec/vdl-int.k 2008-06-15 20:35:53 UTC (rev 2068) +++ trunk/libexec/vdl-int.k 2008-06-15 21:03:09 UTC (rev 2069) @@ -298,7 +298,7 @@ ) ) - element(transferSTDs, [rhost, tmpdir, jobid, stdout, stderr] + element(transferStandardFiles, [rhost, tmpdir, jobid, stdout, stderr] concat( for(f, list(list("stderr.txt", stderr), list("stdout.txt", stdout)) [name, file] := each(f) @@ -443,7 +443,7 @@ cleanupFiles(cacheFilesToRemove, rhost) ) - outs := transferSTDs(rhost, tmpdir, jobid, stdout, stderr) + outs := transferStandardFiles(rhost, tmpdir, jobid, stdout, stderr) discard(transferWrapperLog(rhost, wfdir, jobid, jobdir)) kickstartRec := if( From noreply at svn.ci.uchicago.edu Sun Jun 15 16:10:27 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 16:10:27 -0500 (CDT) Subject: [Swift-commit] r2070 - trunk/src/org/griphyn/vdl/engine Message-ID: <20080615211027.65F529B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 16:10:26 -0500 (Sun, 15 Jun 2008) New Revision: 2070 Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java trunk/src/org/griphyn/vdl/engine/VariableScope.java Log: remove old constructor that has been superceded Modified: trunk/src/org/griphyn/vdl/engine/Karajan.java =================================================================== --- trunk/src/org/griphyn/vdl/engine/Karajan.java 2008-06-15 21:03:09 UTC (rev 2069) +++ trunk/src/org/griphyn/vdl/engine/Karajan.java 2008-06-15 21:10:26 UTC (rev 2070) @@ -183,7 +183,7 @@ public void procedure(Procedure proc, VariableScope containingScope) throws CompilationException { VariableScope outerScope = new VariableScope(this, null); - VariableScope innerScope = new VariableScope(this, outerScope, false); + VariableScope innerScope = new VariableScope(this, outerScope, VariableScope.ENCLOSURE_NONE); StringTemplate procST = template("procedure"); containingScope.bodyTemplate.setAttribute("procedures", procST); procST.setAttribute("name", proc.getName()); Modified: trunk/src/org/griphyn/vdl/engine/VariableScope.java =================================================================== --- trunk/src/org/griphyn/vdl/engine/VariableScope.java 2008-06-15 21:03:09 UTC (rev 2069) +++ trunk/src/org/griphyn/vdl/engine/VariableScope.java 2008-06-15 21:10:26 UTC (rev 2070) @@ -42,39 +42,13 @@ public StringTemplate bodyTemplate; public VariableScope(Karajan c, VariableScope parent) { - this(c,parent,true); + this(c,parent,ENCLOSURE_ALL); } - /** Creates a new variable scope. @param c the compiler scope in which this variable lives @param parent the enclosing scope, or null if this is a top level scope - @param a if true, assignments made in this scope - to variables in an enclosing scope will be permitted. if false, - this will be prohibited, which is desirable in loops to prohibit - multiple assignment - @deprecated use explicit upwards parameter rather than boolean - */ - public VariableScope(Karajan c, VariableScope parent, boolean a) { - if(parentScope!=null) { - logger.info("New scope "+hashCode()+" with parent scope "+parentScope.hashCode()); - } else { - logger.info("New scope "+hashCode()+" with no parent."); - } - compiler = c; - parentScope = parent; - if(a) { - enclosureType = ENCLOSURE_ALL; - } else { - enclosureType = ENCLOSURE_NONE; - } - } - - /** Creates a new variable scope. - @param c the compiler scope in which this variable lives - @param parent the enclosing scope, or null if this is a - top level scope @param a specifies how assignments to variables made in enclosing scopes will be handled. */ From noreply at svn.ci.uchicago.edu Sun Jun 15 18:23:22 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 18:23:22 -0500 (CDT) Subject: [Swift-commit] r2071 - trunk/tests/misc Message-ID: <20080615232322.35A149B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 18:23:21 -0500 (Sun, 15 Jun 2008) New Revision: 2071 Added: trunk/tests/misc/restart-iterate.swift Log: forgot to add this file for test Added: trunk/tests/misc/restart-iterate.swift =================================================================== --- trunk/tests/misc/restart-iterate.swift (rev 0) +++ trunk/tests/misc/restart-iterate.swift 2008-06-15 23:23:21 UTC (rev 2071) @@ -0,0 +1,40 @@ +type file; + +(file t) a(file i) { + app { + helperA @t @i "IN A"; + } +} + +(file t) b(file i) { + app { + helperB @t @i "IN B"; + } +} + +(file t) c(file i) { + app { + helperC @t @i "IN C"; + } +} + +(file r) q(file i, int n) { + file t; + if(n<5) { t=a(i); } else { t=b(i); } + r=c(t); +} + +file J <"restart.in">; + +file X[]; + +file Y[] ; + +iterate iv { + X[iv] = q(J,iv); +} until(iv>10); + +foreach x,j in X { + Y[j] = q(x,j); +} + From noreply at svn.ci.uchicago.edu Sun Jun 15 18:38:44 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 18:38:44 -0500 (CDT) Subject: [Swift-commit] r2072 - trunk/libexec Message-ID: <20080615233844.B66979B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 18:38:44 -0500 (Sun, 15 Jun 2008) New Revision: 2072 Modified: trunk/libexec/wrapper.sh Log: log command line arguments in wrapper Modified: trunk/libexec/wrapper.sh =================================================================== --- trunk/libexec/wrapper.sh 2008-06-15 23:23:21 UTC (rev 2071) +++ trunk/libexec/wrapper.sh 2008-06-15 23:38:44 UTC (rev 2072) @@ -22,6 +22,8 @@ cat /proc/cpuinfo 2>&1 >& "$INFO" infosection "/proc/meminfo" cat /proc/meminfo 2>&1 >& "$INFO" + infosection "command line" + echo $COMMANDLINE 2>&1 >& "$INFO" } logstate() { @@ -84,6 +86,7 @@ exec 3>&- } +COMMANDLINE=$@ WFDIR=$PWD openinfo "wrapper.log" ID=$1 From noreply at svn.ci.uchicago.edu Sun Jun 15 18:41:16 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 18:41:16 -0500 (CDT) Subject: [Swift-commit] r2073 - trunk/tests/sites/coaster Message-ID: <20080615234116.6E3629B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 18:41:16 -0500 (Sun, 15 Jun 2008) New Revision: 2073 Added: trunk/tests/sites/coaster/fletch-coaster-gram2-gram2-condor.xml trunk/tests/sites/coaster/fletch-coaster-gram2-gram2-fork.xml Log: two coaster tests for the BSD cluster. fork works; condor fails with a command-line truncation problem in the middle job of 130-fmri Added: trunk/tests/sites/coaster/fletch-coaster-gram2-gram2-condor.xml =================================================================== --- trunk/tests/sites/coaster/fletch-coaster-gram2-gram2-condor.xml (rev 0) +++ trunk/tests/sites/coaster/fletch-coaster-gram2-gram2-condor.xml 2008-06-15 23:41:16 UTC (rev 2073) @@ -0,0 +1,9 @@ + + + + + + /disks/gpfs/swift/site-test + + + Added: trunk/tests/sites/coaster/fletch-coaster-gram2-gram2-fork.xml =================================================================== --- trunk/tests/sites/coaster/fletch-coaster-gram2-gram2-fork.xml (rev 0) +++ trunk/tests/sites/coaster/fletch-coaster-gram2-gram2-fork.xml 2008-06-15 23:41:16 UTC (rev 2073) @@ -0,0 +1,9 @@ + + + + + + /disks/gpfs/swift/site-test + + + From noreply at svn.ci.uchicago.edu Sun Jun 15 18:45:15 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Sun, 15 Jun 2008 18:45:15 -0500 (CDT) Subject: [Swift-commit] r2074 - trunk/tests/sites Message-ID: <20080615234515.DCB799B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-15 18:45:15 -0500 (Sun, 15 Jun 2008) New Revision: 2074 Modified: trunk/tests/sites/run-site Log: restore running lots of tests on a site - this had got removed accidentally Modified: trunk/tests/sites/run-site =================================================================== --- trunk/tests/sites/run-site 2008-06-15 23:41:16 UTC (rev 2073) +++ trunk/tests/sites/run-site 2008-06-15 23:45:15 UTC (rev 2074) @@ -12,5 +12,5 @@ export SWIFT_TEST_PARAMS="-sites.file ../sites/${SITE} -tc.file tmp.tc.data.sites" -#./run 061-cattwo 130-fmri 103-quote.swift 1032-singlequote.swift 1031-quote.swift 1033-singlequote.swift 141-space-in-filename 142-space-and-quotes -./run 061-cattwo +./run 061-cattwo 130-fmri 103-quote.swift 1032-singlequote.swift 1031-quote.swift 1033-singlequote.swift 141-space-in-filename 142-space-and-quotes +#./run 061-cattwo From noreply at svn.ci.uchicago.edu Mon Jun 16 09:35:09 2008 From: noreply at svn.ci.uchicago.edu (noreply at svn.ci.uchicago.edu) Date: Mon, 16 Jun 2008 09:35:09 -0500 (CDT) Subject: [Swift-commit] r2075 - provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky Message-ID: <20080616143509.0EA5F9B4001@www.ci.uchicago.edu> Author: benc Date: 2008-06-16 09:35:08 -0500 (Mon, 16 Jun 2008) New Revision: 2075 Modified: provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java Log: more delay parameters Modified: provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java =================================================================== --- provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java 2008-06-15 23:45:15 UTC (rev 2074) +++ provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java 2008-06-16 14:35:08 UTC (rev 2075) @@ -13,9 +13,13 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; +import java.util.Collections; import java.util.Iterator; import java.util.List; +import java.util.Random; import org.apache.log4j.Logger; import org.globus.cog.abstraction.impl.common.StatusImpl; @@ -29,22 +33,26 @@ import org.globus.cog.abstraction.interfaces.DelegatedTaskHandler; import org.globus.cog.abstraction.interfaces.FileLocation; import org.globus.cog.abstraction.interfaces.JobSpecification; +import org.globus.cog.abstraction.interfaces.ServiceContact; import org.globus.cog.abstraction.interfaces.Status; import org.globus.cog.abstraction.interfaces.Task; -/** - * @author Kaizar Amin (amin at mcs.anl.gov) - * - */ public class JobSubmissionTaskHandler implements DelegatedTaskHandler, Runnable { private static Logger logger = Logger .getLogger(JobSubmissionTaskHandler.class); -static boolean firstJob = true; +static Random r = new Random(); + +static List firstJobList = Collections.synchronizedList(new ArrayList()); + static int globalJobNumber = 0; -int jobNumber = globalJobNumber++; // racy +int jobNumber = globalJobNumber++; // racy? +List siteOptions; + +String siteName; + public static final int BUFFER_SIZE = 1024; private Task task = null; @@ -63,8 +71,25 @@ throw new TaskSubmissionException("Task is not in unsubmitted state"); } else { -System.out.println("Submitting wonky job "+jobNumber); +logger.info("Submitting wonky job "+jobNumber); this.task = task; + + + ServiceContact serviceContact = this.task.getService(0) + .getServiceContact(); + String server = serviceContact.getContact(); + +logger.debug("Contact is: "+server); + String[] splitServer = server.split("/"); + siteName = splitServer[0]; + siteOptions = Arrays.asList(splitServer); + + + + if(!failDelay("submitting")) { + this.task.setStatus(Status.FAILED); + return; + } task.setStatus(Status.SUBMITTING); JobSpecification spec; try { @@ -85,6 +110,10 @@ synchronized(this) { this.thread = new Thread(this); if (this.task.getStatus().getStatusCode() != Status.CANCELED) { + if(!failDelay("submitted")) { + this.task.setStatus(Status.FAILED); + return; + } this.task.setStatus(Status.SUBMITTED); this.thread.start(); if (spec.isBatchJob()) { @@ -100,17 +129,17 @@ public void suspend() throws InvalidSecurityContextException, TaskSubmissionException { -System.out.println("Suspend called on wonky job "+jobNumber); +logger.info("Suspend called on wonky job "+jobNumber); } public void resume() throws InvalidSecurityContextException, TaskSubmissionException { -System.out.println("Resume called on wonky job "+jobNumber); +logger.info("Resume called on wonky job "+jobNumber); } public void cancel() throws InvalidSecurityContextException, TaskSubmissionException { -System.out.println("Cancel called on wonky job "+jobNumber); +logger.info("Cancel called on wonky job "+jobNumber); synchronized(this) { killed = true; process.destroy(); @@ -123,30 +152,52 @@ public void run() { try { -System.out.println("Wonky job in queue, job number "+jobNumber); + JobSpecification spec = (JobSpecification) this.task + .getSpecification(); + + File dir = null; + if (spec.getDirectory() != null) { + dir = new File(spec.getDirectory()); + } +logger.info("Wonky job in queue, job number "+jobNumber); +String[] cmdarray = buildCmdArray(spec, jobNumber); try { -if(firstJob) { -System.out.println("not sleeping - this is the first job, "+jobNumber); -firstJob=false; // mmmm racy +logger.info("wonky site is "+siteName); + if(siteOptions.contains("firstfast") && !firstJobList.contains(siteName)) { +logger.info("not sleeping - this is the first job on site "+siteName+", "+jobNumber); +firstJobList.add(siteName); } else { -Thread.sleep(120*1000); +double qmean=0; +double qstddev=0; + +Iterator it = siteOptions.iterator(); +while(it.hasNext()) { +String op = (String) it.next(); +logger.debug("Checking: "+op); +if(op.startsWith("qmean=")) { +qmean = Double.parseDouble(op.substring(6)); +logger.debug("qmean = "+qmean); +} else if(op.startsWith("qstddev=")) { +qstddev = Double.parseDouble(op.substring(8)); +logger.debug("qstddev = "+qstddev); } +} + +double qdelay = qmean + qstddev * r.nextGaussian(); + +Thread.sleep((long)(qdelay*1000)); +} } catch(InterruptedException ie) { System.out.println("fake queue delay interrupted for job "+jobNumber); } System.out.println("Wonky job running now"); - // TODO move away from the multi-threaded approach - JobSpecification spec = (JobSpecification) this.task - .getSpecification(); - - File dir = null; - if (spec.getDirectory() != null) { - dir = new File(spec.getDirectory()); + process = Runtime.getRuntime().exec(cmdarray, + buildEnvp(spec), dir); + if(!failDelay("active")) { + this.task.setStatus(Status.FAILED); + return; } - - process = Runtime.getRuntime().exec(buildCmdArray(spec), - buildEnvp(spec), dir); this.task.setStatus(Status.ACTIVE); // reusable byte buffer @@ -195,7 +246,11 @@ } System.err.println("Wonky job completed with exitCode "+exitCode); if (exitCode == 0) { - this.task.setStatus(Status.COMPLETED); + if(failDelay("completed")) { + this.task.setStatus(Status.COMPLETED); + } else { + this.task.setStatus(Status.FAILED); + } System.err.println("Wonky job status COMPLETED "+jobNumber); } else { throw new JobException(exitCode); @@ -274,16 +329,21 @@ } } - private String[] buildCmdArray(JobSpecification spec) { + private String[] buildCmdArray(JobSpecification spec, int jobid) { List arguments = spec.getArgumentsAsList(); String[] cmdarray = new String[arguments.size() + 1]; + logger.debug("jobid "+jobid+" :"); // this loop is a console race... cmdarray[0] = spec.getExecutable(); Iterator i = arguments.iterator(); int index = 1; while (i.hasNext()) { - cmdarray[index++] = (String) i.next(); + String s = (String)i.next(); + logger.debug(s); + cmdarray[index++] = s; + } + logger.debug("end of args"); return cmdarray; } @@ -307,4 +367,36 @@ } return envp; } + + boolean failDelay(String name) { + double failRate = getWonkyParam(name+"fail"); + double delayTime = getWonkyParam(name+"delay"); + System.out.println("Fail probability is: "+failRate); + if(Math.random()

site
$site
$site$count$count