[Swift-commit] r7972 - trunk/libexec
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Fri Jul 4 13:28:22 CDT 2014
Author: hategan
Date: 2014-07-04 13:28:21 -0500 (Fri, 04 Jul 2014)
New Revision: 7972
Modified:
trunk/libexec/_swiftwrap
trunk/libexec/swift-int.k
trunk/libexec/swift.k
Log:
removed kickstart
Modified: trunk/libexec/_swiftwrap
===================================================================
--- trunk/libexec/_swiftwrap 2014-07-04 18:09:43 UTC (rev 7971)
+++ trunk/libexec/_swiftwrap 2014-07-04 18:28:21 UTC (rev 7972)
@@ -480,73 +480,49 @@
if [ ! -x "$EXEC" ]; then
fail 254 "The executable $EXEC does not have the executable bit set"
fi
-if [ "$KICKSTART" == "" ]; then
- TIMEARGS=(-o swiftapp.resources -f APP_RESOURCES=real_secs:%e,kernel_secs:%S,user_secs:%U,percent_cpu:%P,max_rss:%M,avg_rss:%t,avg_tot_vm:%K,avg_priv_data:%D,avg_priv_stack:%p,avg_shared_text:%X,page_size:%Z,major_pgfaults:%F,minor_pgfaults:%R,swaps:%W,invol_context_switches:%c,vol_waits:%w,fs_reads:%I,fs_writes:%O,sock_recv:%r,sock_send:%s,signals:%k,exit_status:%x)
+TIMEARGS=(-o swiftapp.resources -f APP_RESOURCES=real_secs:%e,kernel_secs:%S,user_secs:%U,percent_cpu:%P,max_rss:%M,avg_rss:%t,avg_tot_vm:%K,avg_priv_data:%D,avg_priv_stack:%p,avg_shared_text:%X,page_size:%Z,major_pgfaults:%F,minor_pgfaults:%R,swaps:%W,invol_context_switches:%c,vol_waits:%w,fs_reads:%I,fs_writes:%O,sock_recv:%r,sock_send:%s,signals:%k,exit_status:%x)
- if [[ "$OSTYPE" == *darwin* ]]; then
- TIMECMD=
- TIMEARGS=
- elif [ -x /usr/bin/time ]; then
- TIMECMD="/usr/bin/time"
- elif [ -x $HOME/swift.time ]; then
- TIMECMD="$HOME/swift.time"
- else
- TIMECMD=""
- TIMEARGS=""
- fi
- if [ "$STDIN" == "" ]; then
- if [ "$SWIFT_GEN_SCRIPTS" != "" ]; then
- genScripts
- fi
-
- if [ -n "$TIMECMD" ] && [ -n "$TIMEARGS" ]; then
- "$TIMECMD" "${TIMEARGS[@]}" "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR"
- else
- "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR"
- fi
- else
- if [ "$SWIFT_GEN_SCRIPTS" != "" ]; then
- genScripts
- fi
-
- if [ -n "$TIMECMD" ] && [ -n "$TIMEARGS" ]; then
- "$TIMECMD" "${TIMEARGS[@]}" "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR" <"$STDIN"
- else
- "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR" <"$STDIN"
- fi
+if [[ "$OSTYPE" == *darwin* ]]; then
+ TIMECMD=
+ TIMEARGS=
+elif [ -x /usr/bin/time ]; then
+ TIMECMD="/usr/bin/time"
+elif [ -x $HOME/swift.time ]; then
+ TIMECMD="$HOME/swift.time"
+else
+ TIMECMD=""
+TIMEARGS=""
+fi
+if [ "$STDIN" == "" ]; then
+ if [ "$SWIFT_GEN_SCRIPTS" != "" ]; then
+ genScripts
fi
-
- TIME_EC=$?
- if [ "_$TIMECMD" != _ ]; then
- log "$(cat swiftapp.resources)"
- fi
- sh -c "exit $TIME_EC"
- checkError $? "Application $EXEC failed with an exit code of $?"
+
+ if [ -n "$TIMECMD" ] && [ -n "$TIMEARGS" ]; then
+ "$TIMECMD" "${TIMEARGS[@]}" "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR"
+ else
+ "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR"
+ fi
else
- if [ ! -f "$KICKSTART" ]; then
- log "Kickstart executable ($KICKSTART) not found"
- fail 254 "The Kickstart executable ($KICKSTART) was not found"
- elif [ ! -x "$KICKSTART" ]; then
- log "Kickstart executable ($KICKSTART) is not executable"
- fail 254 "The Kickstart executable ($KICKSTART) does not have the executable bit set"
- else
- mkdir -p $WFDIR/kickstart/$JOBDIR
- log "Using Kickstart ($KICKSTART)"
- if [ "$STDIN" == "" ]; then
- "$KICKSTART" -H -o "$STDOUT" -e "$STDERR" "$EXEC" "$@" 1>kickstart.xml 2>>"$STDERR"
- else
- "$KICKSTART" -H -o "$STDOUT" -i "$STDIN" -e "$STDERR" "$EXEC" "$@" 1>kickstart.xml 2>>"$STDERR"
- fi
- export APPEXIT=$?
- mv -f kickstart.xml "$WFDIR/kickstart/$JOBDIR/$ID-kickstart.xml" 2>&1 >& "$INFO"
- checkError 254 "Failed to copy Kickstart record to shared directory"
- if [ "$APPEXIT" != "0" ]; then
- fail $APPEXIT "Application $EXEC failed with an exit code of $APPEXIT"
- fi
+ if [ "$SWIFT_GEN_SCRIPTS" != "" ]; then
+ genScripts
fi
+
+ if [ -n "$TIMECMD" ] && [ -n "$TIMEARGS" ]; then
+ "$TIMECMD" "${TIMEARGS[@]}" "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR" <"$STDIN"
+ else
+ "$EXEC" "${CMDARGS[@]}" 1>>"$STDOUT" 2>>"$STDERR" <"$STDIN"
+ fi
fi
+TIME_EC=$?
+if [ "_$TIMECMD" != _ ]; then
+ log "$(cat swiftapp.resources)"
+fi
+sh -c "exit $TIME_EC"
+checkError $? "Application $EXEC failed with an exit code of $?"
+
if [[ $MPI_RANK == "" || $MPI_RANK == 0 ]]; then
if [ "$COLLECT" != "" ]; then
logstate "COLLECT"
Modified: trunk/libexec/swift-int.k
===================================================================
--- trunk/libexec/swift-int.k 2014-07-04 18:09:43 UTC (rev 7971)
+++ trunk/libexec/swift-int.k 2014-07-04 18:28:21 UTC (rev 7972)
@@ -85,7 +85,6 @@
dir:make(SHARED_DIR, host = rhost)
transfer(siteProfile(rhost, "wrapperScript"), srcdir="{SWIFT:HOME}/libexec/", destdir=SHARED_DIR, desthost=rhost)
transfer("_swiftseq", srcdir="{SWIFT:HOME}/libexec/", destdir=SHARED_DIR, desthost=rhost)
- dir:make(dircat(RUN_DIR, "kickstart"), host=rhost)
statusMode := configProperty("status.mode", host=rhost)
if (statusMode == "files") {
Modified: trunk/libexec/swift.k
===================================================================
--- trunk/libexec/swift.k 2014-07-04 18:09:43 UTC (rev 7971)
+++ trunk/libexec/swift.k 2014-07-04 18:28:21 UTC (rev 7972)
@@ -87,59 +87,13 @@
* all the data in memory until the workflow is done
*/
export(mainp,
- CBFFunction(channel(graph), channel(cleanup)) {
+ CBFFunction(channel(cleanup)) {
parallel(
- if(configProperty("pgraph") != "false") {
- generateProvenanceGraph(graph)
- }
to(cleanup, unique(for(c, cleanup, c)))
)
}
- )
+ )
- graphStuff := function(tr, stagein, stageout, err, args = null) {
- if (configProperty("pgraph") != "false") {
- errprops := if(err, ",color=lightsalmon", ",color=lightsteelblue1")
- tp := currentThread()
- to (graph) {
- concat(str:quote(tp), " [label=", str:quote(tr), "{errprops}]")
- }
- for (si, stagein) {
- si := basename(si)
- to(graph) {
- concat(str:quote(si), " [shape=parallelogram]")
- concat(str:quote(si), " -> ", str:quote(tp))
- }
- }
- for (pv, stageout) {
- (path, var) := each(pv)
- file := fileName(getField(var, path=path))
- file := basename(file)
- label := niceName(var, path = path)
- to(graph) {
- concat(str:quote(file), " [shape=parallelogram,label=", str:quote(label), "]")
- concat(str:quote(tp), " -> ", str:quote(file))
- }
- }
- }
- }
-
- generateProvenanceGraph := function(gdata) {
- pgraph := configProperty("pgraph")
- gname := if(pgraph == "true", "{SWIFT:SCRIPT_NAME}-{SWIFT:RUN_ID}.dot", pgraph)
- file:write(gname) {
- "digraph SwiftProvenance \{\n",
- " graph [", configProperty("pgraph.graph.options"), "];\n",
- " node [", configProperty("pgraph.node.options"), "];\n",
-
- for(i, gdata) {
- " ", i, "\n"
- }
- "}\n"
- }
- log(LOG:INFO, "Provenance graph saved in ", gname)
- }
-
export(execute,
function(
tr, arguments = null,
@@ -223,7 +177,6 @@
log(LOG:INFO, exception)
echo(exception)
mark(stageout, true, mapping=false)
- graphStuff(tr, stagein, stageout, true, maybe(args=arguments))
}
}
}
@@ -245,7 +198,6 @@
log(LOG:INFO, exception)
}
mark(stageout, true, mapping=merr)
- graphStuff(tr, stagein, stageout, true, maybe(args=arguments))
}
}
)
More information about the Swift-commit
mailing list