Skip to content
Snippets Groups Projects
Commit 0e65a1dd authored by Izzard, Robert Dr (Maths & Physics)'s avatar Izzard, Robert Dr (Maths & Physics)
Browse files

add batchname to condor script

parent b0c53017
No related branches found
No related tags found
No related merge requests found
......@@ -174,7 +174,7 @@ class condor():
# run a grid of stars only, leaving the results
# in the appropriate outfile
return False
elif self.grid_options['condor'] == 3:
# joining : set the evolution type to "join" and return
# False to continue
......@@ -184,7 +184,7 @@ class condor():
elif self.grid_options['condor'] == 1:
# if condor=1, we should have no evolution type, we
# set up the Condor scripts and get them evolving
# in a Condor queue
# in a Condor queue
self.grid_options['evolution_type'] = None
# make dirs
......@@ -202,18 +202,18 @@ class condor():
# get job array index
Process = self.grid_options['condor_Process'] if self.grid_options['condor_Process'] != "" else '$Process'
if self.grid_options['condor_njobs'] == 0:
print("binary_c-python Condor : You must set grid_option condor_njobs to be non-zero")
self.exit(code=1)
# find the path to the Python script that we are running
pyscriptpath = str(lib_programname.get_path_executed_script())
# set the condor initial dir to be our current working directory
if not self.grid_options['condor_initial_dir']:
self.grid_options['condor_initial_dir'] = os.getcwd()
# build the grid command
grid_command = [
os.path.join("/usr","bin","env"),
......@@ -306,7 +306,7 @@ echo {condor_dir}/results/$ClusterID.$Process.gz >> {condor_dir}/results/$Cluste
key=key,
value=self.grid_options['condor_extra_settings'][key]
)
jobid = '$(Cluster).$(Process)'
condor_submit_script = """
executable = {usr_bin_env}
......@@ -324,8 +324,9 @@ request_cpus = {request_cpus}
should_transfer_files = {should_transfer_files}
when_to_transfer_output = {when_to_transfer_output}
requirements = {requirements}
JobBatchName = {batchname}
{extra_settings}
queue {njobs}
queue {njobs}
""".format(
usr_bin_env = self.grid_options['condor_usr_bin_env'],
bash = self.grid_options['condor_bash'],
......@@ -349,6 +350,7 @@ queue {njobs}
should_transfer_files = self.grid_options['condor_should_transfer_files'],
when_to_transfer_output = self.grid_options['when_to_transfer_output'],
requirements = self.grid_options['condor_requirements'],
batchname = self.grid_options['condor_batchname'],
extra_settings = extra_settings,
njobs = self.grid_options['condor_njobs'],
)
......@@ -400,7 +402,5 @@ queue {njobs}
print("Condor jobs launched.")
print("All done in condor_grid().")
# return True so we exit immediately
# return True so we exit immediately
return True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment