Commit 4ee49917 authored by Richard O'Shaughnessy's avatar Richard O'Shaughnessy add init stage

parent d5a1a8cf
......@@ -834,3 +834,40 @@ def write_plot_sub(tag='converge', exe=None,samples_files=None, base=None,target
def write_init_sub(tag='gridinit', exe=None,arg_str=None,log_dir=None, use_eos=False,ncopies=1, **kwargs):
Write a submit file for launching a grid initialization job.
Note this routine MUST create whatever files are needed by the ILE iteration
exe = exe or which("")
ile_job = pipeline.CondorDAGJob(universe="vanilla", executable=exe)
ile_sub_name = tag + '.sub'
ile_job.add_opt(arg_str[2:],'') # because we must be idiotic in how we pass arguments, I strip off the first two elements of the line
# Logging options
uniq_str = "$(macromassid)-$(cluster)-$(process)"
ile_job.set_log_file("%s%s-%s.log" % (log_dir, tag, uniq_str))
ile_job.set_stderr_file("%s%s-%s.err" % (log_dir, tag, uniq_str))
ile_job.set_stdout_file("%s%s-%s.out" % (log_dir, tag, uniq_str))
ile_job.add_condor_cmd('getenv', 'True')
# To change interactively:
# condor_qedit
# for example:
# for i in `condor_q -hold | grep oshaughn | awk '{print $1}'`; do condor_qedit $i RequestMemory 30000; done; condor_release -all
print " LIGO accounting information not available. You must add this manually to integrate.sub !"
return ile_job, ile_sub_name
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment