aboutsummaryrefslogtreecommitdiff
path: root/utils/submit-grid-jobs
diff options
context:
space:
mode:
Diffstat (limited to 'utils/submit-grid-jobs')
-rwxr-xr-xutils/submit-grid-jobs35
1 files changed, 30 insertions, 5 deletions
diff --git a/utils/submit-grid-jobs b/utils/submit-grid-jobs
index 1ada09f..18c6e37 100755
--- a/utils/submit-grid-jobs
+++ b/utils/submit-grid-jobs
@@ -21,6 +21,34 @@ from os.path import split, splitext, join
import uuid
from subprocess import check_call
+CONDOR_TEMPLATE = \
+"""
+# We need the job to run our executable script, with the
+# input.txt filename as an argument, and to transfer the
+# relevant input and output files:
+executable = @executable
+arguments = @args
+transfer_input_files = @transfer_input_files
+
+transfer_output_files = @transfer_output_files
+
+error = @error
+output = @output
+log = @log
+
+# The below are good base requirements for first testing jobs on OSG,
+# if you don't have a good idea of memory and disk usage.
+requirements = (OSGVO_OS_STRING == "RHEL 7") && (OpSys == "LINUX")
+request_cpus = 1
+request_memory = 1 GB
+request_disk = 1 GB
+
+# Queue one job with the above specifications.
+queue 1
+
++ProjectName = "SNOplus"
+""".strip()
+
# all files required to run the fitter (except the DQXX files)
INPUT_FILES = ["muE_water_liquid.txt","pmt_response_qoca_d2o_20060216.dat","rsp_rayleigh.dat","e_water_liquid.txt","pmt_pcath_response.dat","pmt.txt","muE_deuterium_oxide_liquid.txt","pmt_response.dat","proton_water_liquid.txt"]
@@ -54,10 +82,7 @@ def submit_job(filename, run, gtid, dir, dqxx_dir, min_nhit, max_particles):
condor_output = "%s.output" % prefix
condor_log = "%s.log" % prefix
- with open("submit_template.submit") as f:
- s = f.read()
-
- template = MyTemplate(s)
+ template = MyTemplate(CONDOR_TEMPLATE)
submit_string = template.safe_substitute(
executable=executable,
@@ -97,5 +122,5 @@ if __name__ == '__main__':
gtid = ev['gtid']
nhit = ev['nhit']
- if nhit >= 100:
+ if nhit >= args.min_nhit:
submit_job(filename, run, gtid, args.dir, args.dqxx_dir, args.min_nhit, args.max_particles)