Skip to content

Commit

Permalink
Allow sbatch to run without cd
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemartinlogan committed Feb 16, 2024
1 parent 8f07068 commit 0b21b7f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion bin/jarvis
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,13 @@ class JarvisArgs(ArgParse):
# jarvis pipeline sbatch
self.add_cmd('pipeline sbatch', msg="Run the current pipeline through sbatch")
self.add_args([
{
'name': 'pipeline_name',
'msg': 'The pipeline to run',
'required': False,
'pos': True,
'default': None
},
{
'name': 'job_name',
'msg': 'The name given to this job',
Expand Down Expand Up @@ -1409,7 +1416,9 @@ class JarvisArgs(ArgParse):
exit(pipeline.exit_code)

def pipeline_sbatch(self):
pipeline_name = Pipeline().load().global_id
pipeline_name = self.kwargs['pipeline_name']
pipeline = Pipeline().load(pipeline_name)
pipeline_name = pipeline.global_id
if not self.kwargs['job_name']:
job_name = f'{pipeline_name}_{self.kwargs["nnodes"]}'
print(f'No name set for the job. Setting it to {job_name}')
Expand Down

0 comments on commit 0b21b7f

Please sign in to comment.