Commit f1c2d4c4 authored by Vivien Raymond's avatar Vivien Raymond

Added option for condor notification of engine job.

Original: 1185e2f411284a1d5c3b35b7d7f7897313d26b33
parent 99da3ad5
......@@ -170,6 +170,10 @@ pos_to_sim_inspiral=/home/albert.einstein/bin/cbcBayesPosToSimInspiral.py
# Set specific nodes requirements if needed, for instance:
#Requirements = regexp(“Intel”, TARGET.cpuinfo_model_name)
# Uncomment to get condor notifications for the engine job
# this will use the email address from the [resultspage] section
#notification=Complete
#####################################################################################
# Section used by the datafind jobs (not used with simulated noise)
[datafind]
......
......@@ -1829,6 +1829,10 @@ class EngineJob(pipeline.CondorDAGJob,pipeline.AnalysisJob):
# For LALInferenceNest demand only 1 thread (to be tuned later)
if self.engine=='lalinferencenest':
self.add_condor_cmd('environment','OMP_NUM_THREADS=1')
if cp.has_option('condor','notification'):
self.set_notification(cp.get('condor','notification'))
if cp.has_option('resultspage','email'):
self.add_condor_cmd('notify_user',cp.get('resultspage','email'))
def set_grid_site(self,site=None):
"""
......
......@@ -374,8 +374,10 @@ if not opts.dax:
if opts.condor_submit:
import subprocess
from subprocess import Popen
x = subprocess.Popen(['condor_submit_dag',outerdag.get_dag_file()])
if cp.has_option('condor','notification'):
x = subprocess.Popen(['condor_submit_dag','-dont_suppress_notification',outerdag.get_dag_file()])
else:
x = subprocess.Popen(['condor_submit_dag',outerdag.get_dag_file()])
x.wait()
if x.returncode==0:
print 'Submitted DAG file'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment