[Swift-commit] r4734 - trunk/libexec

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Sat Jul 2 20:53:28 CDT 2011


Author: hategan
Date: 2011-07-02 20:53:28 -0500 (Sat, 02 Jul 2011)
New Revision: 4734

Modified:
   trunk/libexec/execute-default.k
   trunk/libexec/vdl-int-staging.k
   trunk/libexec/vdl-int.k
Log:
unwrap things earlier

Modified: trunk/libexec/execute-default.k
===================================================================
--- trunk/libexec/execute-default.k	2011-07-03 00:29:25 UTC (rev 4733)
+++ trunk/libexec/execute-default.k	2011-07-03 01:53:28 UTC (rev 4734)
@@ -20,7 +20,7 @@
 							parallelFor(i, replicationChannel
 								ignoreErrors(match = "^Abort$"
 									execute2(
-										tr, maybe(arguments=arguments), 
+										tr, maybe(arguments=unwrapClosedList(arguments)), 
 										maybe(stdin=stdin), maybe(stdout=stdout), maybe(stderr=stderr), 
 										stagein, stageout, restartout, replicationGroup, replicationChannel
 									)

Modified: trunk/libexec/vdl-int-staging.k
===================================================================
--- trunk/libexec/vdl-int-staging.k	2011-07-03 00:29:25 UTC (rev 4733)
+++ trunk/libexec/vdl-int-staging.k	2011-07-03 01:53:28 UTC (rev 4734)
@@ -89,8 +89,8 @@
 				wrapper := "_swiftwrap.staging"
 				wrapfile := "{ddir}/param-{jobid}"
 
-				stdout := try(stdout, "stdout.txt")
-				stderr := try(stderr, "stderr.txt")
+				stdout := try(getFieldValue(stdout), "stdout.txt")
+				stderr := try(getFieldValue(stderr), "stderr.txt")
 
 				wfdir := "{VDL:SCRIPTNAME}-{VDL:RUNID}"
 				tmpdir := dircat("{wfdir}/jobs/{jobdir}", jobid)
@@ -108,8 +108,8 @@
 								vdl:siteprofile(rhost, "swift:wrapperInterpreterOptions"),
 								wrapper,
 								"-e", vdl:executable(tr, rhost),
-								"-out", getFieldValue(stdout),
-								"-err", getFieldValue(stderr),
+								"-out", stdout,
+								"-err", stderr,
 								"-i", maybe(getFieldValue(stdin)),
 								"-d", flatten(unique(outFileDirs(stageout))),
 								"-if", flatten(infiles(stagein)),
@@ -117,7 +117,7 @@
 								"-k",
 								"-cdmfile", cdmfile,
 								"-status", "provider"
-								"-a", maybe(each(unwrapClosedList(arguments)))
+								"-a", maybe(each(arguments))
 							)
 							directory = "{wfdir}-{jobdir}-{jobid}"
 							redirect = false

Modified: trunk/libexec/vdl-int.k
===================================================================
--- trunk/libexec/vdl-int.k	2011-07-03 00:29:25 UTC (rev 4733)
+++ trunk/libexec/vdl-int.k	2011-07-03 01:53:28 UTC (rev 4734)
@@ -393,7 +393,7 @@
 				task:transfer(srchost=rhost, srcdir=srcdir, srcfile=recfile, destdir="{VDL:SCRIPTNAME}-{VDL:RUNID}.d/")
 				(
 					maybe(file:remove(recfile))
-					log(LOG:WARN, "Failed to write to {srcdir} on {rhost}. Verify that all directories specified in your sites file exist and are writable!")
+					log(LOG:WARN, "Failed to transfer wrapper log for job {jobid}")
 					log(LOG:DEBUG, "Exception for wrapper log failure from {srcdir} on {rhost}: ", exception)
 				)
 			)
@@ -424,8 +424,8 @@
 
 				wrapfile := "{ddir}/param-{jobid}"
 
-				stdout := try(stdout, "stdout.txt")
-				stderr := try(stderr, "stderr.txt")
+				stdout := try(getFieldValue(stdout), "stdout.txt")
+				stderr := try(getFieldValue(stderr), "stderr.txt")
 				kickstart := vdl:kickstart(rhost)
 				fileDirs := fileDirs(stagein, stageout)
 				os := vdl:siteprofile(rhost, "SYSINFO:OS")
@@ -435,8 +435,8 @@
 						sys:file:write(wrapfile,
 							"-scratch ", try(vdl:siteprofile(rhost, "scratch"), ""), nl(),
 							"-e ",vdl:executable(tr, rhost), nl(),
-							"-out ", getFieldValue(stdout), nl(),
-							"-err ", getFieldValue(stderr), nl(),
+							"-out ", stdout, nl(),
+							"-err ", stderr, nl(),
 							"-i ", maybe(getFieldValue(stdin)), nl(),
 							"-d ", flatten(each(fileDirs)), nl(),
 							"-if ", flatten(infiles(stagein)), nl(),
@@ -444,7 +444,7 @@
 							"-k ", kickstart, nl(),
 							"-cdmfile ", cdm:file(), nl(),
 							"-status ", statusMode, nl(),
-							for(a, unwrapClosedList(arguments), "-a ", a, nl())
+							for(a, arguments, "-a ", a, nl())
 						)
 					)
 				)
@@ -495,8 +495,8 @@
 								"-jobdir", jobdir,
 								"-scratch", try(vdl:siteprofile(rhost, "scratch"), "")
 								"-e", vdl:executable(tr, rhost),
-								"-out", getFieldValue(stdout),
-								"-err", getFieldValue(stderr),
+								"-out", stdout,
+								"-err", stderr,
 								"-i", maybe(getFieldValue(stdin)),
 								"-d", flatten(each(fileDirs)),
 								"-if", flatten(infiles(stagein)),
@@ -504,7 +504,7 @@
 								"-k", kickstart,
 								"-cdmfile", cdm:file(),
 								"-status", statusMode,
-								"-a", maybe(each(unwrapClosedList(arguments)))
+								"-a", maybe(each(arguments))
 							)
 							directory=wfdir
 							redirect=false
@@ -556,7 +556,7 @@
 					catch("^(?!Abort$).*"
 						vdl:setprogress("Failed but can retry")
 						log(LOG:DEBUG, "APPLICATION_EXCEPTION jobid={jobid} - Application exception: ", exception)
-						echo(exception)
+
 						if(matches(exception,".*executable bit.*")
      					           generateError(exception)
 						)
@@ -586,7 +586,7 @@
 							exception(
 								concat(
 									"Exception in {tr}:", nl(),
-									maybe("Arguments: ", unwrapClosedList(arguments), nl()),
+									maybe("Arguments: ", arguments, nl()),
 									"Host: {rhost}", nl(),
 									"Directory: {tmpdir}",
 									"{outs}", nl(),




More information about the Swift-commit mailing list