Skip to content

Commit 03c6140

Browse files
committed
[submit_mdt_analyses_lintf2_ether.py]: Use Absolute Path to Slurm Script
So far, the Python submit script did not submit the Slurm job script from the same directory as the Python submit script but from the `${PATH}` variable. Now, absolute paths are used to submit the Slurm job scripts that lie within the same directory as the Python submit script.
1 parent 7fdb569 commit 03c6140

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

analysis/lintf2_ether/mdt/submit_mdt_analyses_lintf2_ether.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,8 @@ def _assemble_submit_cmd(sbatch_opts, job_script):
476476
if "output" not in sbatch_opts and "o" not in sbatch_opts:
477477
sbatch_output = " --output " + gmx_infile_pattern + "_"
478478
submit += sbatch_output + job_script + "_slurm-%j.out"
479-
submit += " " + job_script + ".sh " + posargs[job_script]
479+
job_script_path = os.path.abspath(os.path.join(FILE_ROOT, job_script))
480+
submit += " " + job_script_path + ".sh " + posargs[job_script]
480481
return submit
481482

482483

@@ -559,7 +560,8 @@ def _submit_discretized(sbatch_opts, job_script, bins):
559560
posargs_tmp = opthandler.posargs2str(
560561
posargs[job_script] + slab, prec=ARG_PREC
561562
)
562-
submit += " " + job_script + ".sh " + posargs_tmp
563+
job_script_path = os.path.abspath(os.path.join(FILE_ROOT, job_script))
564+
submit += " " + job_script_path + ".sh " + posargs_tmp
563565
subproc.check_output(shlex.split(submit))
564566
n_jobs_submitted += 1
565567
return n_jobs_submitted

0 commit comments

Comments
 (0)