From 0b21b7f3db1d7d0e80a81ab6b6c17714682e771d Mon Sep 17 00:00:00 2001 From: lukemartinlogan Date: Fri, 16 Feb 2024 01:19:21 -0600 Subject: [PATCH] Allow sbatch to run without cd --- bin/jarvis | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/jarvis b/bin/jarvis index ff56396d..7bee439e 100755 --- a/bin/jarvis +++ b/bin/jarvis @@ -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', @@ -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}')