Skip to content

Commit 7e45d2e

Browse files
committed
fix generate_job_submit_template so that test_job_template does not include max_array
1 parent e4fbe73 commit 7e45d2e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

babs/babs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2882,7 +2882,10 @@ def generate_job_submit_template(self, yaml_path, babs, system, test=False):
28822882
eo_args = "-e " + babs.analysis_path + f"/logs/{job_name}.e%A_%a " \
28832883
+ "-o " + babs.analysis_path + f"/logs/{job_name}.o%A_%a"
28842884
# array task id starts from 0 so that max_array == count
2885-
array_args = "--array=1-${max_array}"
2885+
if test: # no max_array for `submit_test_job_template.yaml`
2886+
array_args = "--array=1"
2887+
else: # need max_array for for `submit_job_template.yaml`
2888+
array_args = "--array=1-${max_array}"
28862889

28872890
# Generate the job submission command, with sub ID and ses ID as placeholders:
28882891
cmd = submit_head + " " + env_flags + name_flag_str + job_name + " " + \

0 commit comments

Comments
 (0)