[Swift-commit] r3185 - trunk/libexec

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Fri Oct 30 19:48:43 CDT 2009


Author: hategan
Date: 2009-10-30 19:48:42 -0500 (Fri, 30 Oct 2009)
New Revision: 3185

Modified:
   trunk/libexec/vdl-int.k
Log:
removed useless check if workflow dir exists

Modified: trunk/libexec/vdl-int.k
===================================================================
--- trunk/libexec/vdl-int.k	2009-10-30 05:45:41 UTC (rev 3184)
+++ trunk/libexec/vdl-int.k	2009-10-31 00:48:42 UTC (rev 3185)
@@ -126,6 +126,16 @@
 			)
 		)
 		
+		element(initDDir, []
+			ddir := "{VDL:SCRIPTNAME}-{VDL:RUNID}.d"
+			once(ddir
+				if(sys:not(file:exists(ddir))
+					task:dir:make(ddir)
+				)
+			)
+			ddir
+		)
+		
 		element(inFileDirs, [stageins]
 			for(file, stageins
 		 		reldirname(file)
@@ -360,9 +370,6 @@
 		)
 		
 		element(transferKickstartRec, [rhost, wfdir, jobid, jobdir]
-			if(sys:not(file:exists("{VDL:SCRIPTNAME}-{VDL:RUNID}.d"))
-				task:dir:make("{VDL:SCRIPTNAME}-{VDL:RUNID}.d")
-			)
 			recfile := "{jobid}-kickstart.xml"
 			srcdir := dircat(concat(wfdir, "/kickstart/"), jobdir)
 			try(
@@ -376,9 +383,6 @@
 		)
 
 		element(transferWrapperLog, [rhost, wfdir, jobid, jobdir]
-			if(sys:not(file:exists("{VDL:SCRIPTNAME}-{VDL:RUNID}.d"))
-				task:dir:make("{VDL:SCRIPTNAME}-{VDL:RUNID}.d")
-			)
 			recfile := "{jobid}-info"
 			srcdir := dircat(concat(wfdir, "/info/"), jobdir)
 			try(
@@ -398,6 +402,7 @@
 			stageout := list(unique(each(stageout)))
 			allocateHost(rhost, constraints=vdl:jobConstraints(tr, stagein=stagein)
 				
+				ddir := initDDir()
 				[wfdir, sharedDir] := try(
 					initSharedDir(rhost)
 					throw(exception("Could not initialize shared directory on {rhost}", exception))
@@ -412,10 +417,6 @@
 				statusMode := configProperty("status.mode",host=rhost)
 				wrapperMode := configProperty("wrapper.parameter.mode",host=rhost)
 
-				ddir := "{VDL:SCRIPTNAME}-{VDL:RUNID}.d"
-				if(sys:not(file:exists(ddir))
-					task:dir:make(ddir)
-				)
 				wrapfile := "{ddir}/param-{jobid}"
 
 				stdout := try(stdout, "stdout.txt")




More information about the Swift-commit mailing list