Skip to content

Commit

Permalink
Merge pull request #44 from JeffersonLab/DEV
Browse files Browse the repository at this point in the history
fixed missing str() in batch submission of osg run ranges
  • Loading branch information
markito3 authored Jun 7, 2018
2 parents 9295148 + 6b67797 commit e9b5bf8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions MCwrapper/gluex_MC.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ def OSG_add_job(VERBOSE, WORKFLOW, RUNNUM, FILENUM, indir, COMMAND, NCORES, DAT

if COMMAND_parts[21] == "Random" or COMMAND_parts[21][:4] == "loc:":
formattedRUNNUM=""
for i in range(len(RUNNUM),6):
for i in range(len(str(RUNNUM)),6):
formattedRUNNUM+="0"
formattedRUNNUM=formattedRUNNUM+RUNNUM
formattedRUNNUM=formattedRUNNUM+str(RUNNUM)
if COMMAND_parts[21] == "Random":
#print "/cache/halld/Simulation/random_triggers/"+RANDBGTAG+"/run"+formattedRUNNUM+"_random.hddm"
additional_passins+="/cache/halld/gluex_simulations/random_triggers/"+RANDBGTAG+"/run"+formattedRUNNUM+"_random.hddm"+", "
Expand Down Expand Up @@ -255,8 +255,8 @@ def OSG_add_job(VERBOSE, WORKFLOW, RUNNUM, FILENUM, indir, COMMAND, NCORES, DAT
f.write("initialdir = "+RUNNING_DIR+"\n")
#f.write("transfer_input_files = "+ENVFILE+"\n")
f.write("transfer_input_files = "+indir+", "+ENVFILE+additional_passins+"\n")
f.write("transfer_output_files = "+RUNNUM+"_"+str(FILENUM)+"\n")
f.write("transfer_output_remaps = "+"\""+RUNNUM+"_"+str(FILENUM)+"="+DATA_OUTPUT_BASE_DIR+"\""+"\n")
f.write("transfer_output_files = "+str(RUNNUM)+"_"+str(FILENUM)+"\n")
f.write("transfer_output_remaps = "+"\""+str(RUNNUM)+"_"+str(FILENUM)+"="+DATA_OUTPUT_BASE_DIR+"\""+"\n")

f.write("queue\n")
f.close()
Expand Down Expand Up @@ -315,7 +315,7 @@ def main(argv):

print "*********************************"
print "Welcome to v1.14 of the MCwrapper"
print "Thomas Britton 5/24/18"
print "Thomas Britton 6/6/18"
print "*********************************"

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

#print event_sum
print event_sum
exit
sum2=0.
for runs in table: #do for each job
#print runs[0]
Expand Down

0 comments on commit e9b5bf8

Please sign in to comment.