Skip to content

Commit 6b67797

Browse files
committed
fixed missing str() in batch submission of osg run ranges
1 parent c853b0c commit 6b67797

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

MCwrapper/gluex_MC.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ def OSG_add_job(VERBOSE, WORKFLOW, RUNNUM, FILENUM, indir, COMMAND, NCORES, DAT
186186

187187
if COMMAND_parts[21] == "Random" or COMMAND_parts[21][:4] == "loc:":
188188
formattedRUNNUM=""
189-
for i in range(len(RUNNUM),6):
189+
for i in range(len(str(RUNNUM)),6):
190190
formattedRUNNUM+="0"
191-
formattedRUNNUM=formattedRUNNUM+RUNNUM
191+
formattedRUNNUM=formattedRUNNUM+str(RUNNUM)
192192
if COMMAND_parts[21] == "Random":
193193
#print "/cache/halld/Simulation/random_triggers/"+RANDBGTAG+"/run"+formattedRUNNUM+"_random.hddm"
194194
additional_passins+="/cache/halld/gluex_simulations/random_triggers/"+RANDBGTAG+"/run"+formattedRUNNUM+"_random.hddm"+", "
@@ -255,8 +255,8 @@ def OSG_add_job(VERBOSE, WORKFLOW, RUNNUM, FILENUM, indir, COMMAND, NCORES, DAT
255255
f.write("initialdir = "+RUNNING_DIR+"\n")
256256
#f.write("transfer_input_files = "+ENVFILE+"\n")
257257
f.write("transfer_input_files = "+indir+", "+ENVFILE+additional_passins+"\n")
258-
f.write("transfer_output_files = "+RUNNUM+"_"+str(FILENUM)+"\n")
259-
f.write("transfer_output_remaps = "+"\""+RUNNUM+"_"+str(FILENUM)+"="+DATA_OUTPUT_BASE_DIR+"\""+"\n")
258+
f.write("transfer_output_files = "+str(RUNNUM)+"_"+str(FILENUM)+"\n")
259+
f.write("transfer_output_remaps = "+"\""+str(RUNNUM)+"_"+str(FILENUM)+"="+DATA_OUTPUT_BASE_DIR+"\""+"\n")
260260

261261
f.write("queue\n")
262262
f.close()
@@ -315,7 +315,7 @@ def main(argv):
315315

316316
print "*********************************"
317317
print "Welcome to v1.14 of the MCwrapper"
318-
print "Thomas Britton 5/24/18"
318+
print "Thomas Britton 6/6/18"
319319
print "*********************************"
320320

321321
#load all argument passed in and set default options
@@ -689,7 +689,8 @@ def main(argv):
689689
break
690690
event_sum = event_sum + runs[1]
691691

692-
#print event_sum
692+
print event_sum
693+
exit
693694
sum2=0.
694695
for runs in table: #do for each job
695696
#print runs[0]

0 commit comments

Comments
 (0)