Skip to content

Commit a01f38b

Browse files
committed
submit_gmx_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 03c6140 commit a01f38b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

analysis/lintf2_ether/gmx/submit_gmx_analyses_lintf2_ether.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ def _assemble_submit_cmd(sbatch_opts, job_script):
281281
if "output" not in sbatch_opts and "o" not in sbatch_opts:
282282
sbatch_output = " --output " + gmx_infile_pattern + "_"
283283
submit += sbatch_output + job_script + "_slurm-%j.out"
284-
submit += " " + job_script + ".sh " + posargs[job_script]
284+
job_script_path = os.path.abspath(os.path.join(FILE_ROOT, job_script))
285+
submit += " " + job_script_path + ".sh " + posargs[job_script]
285286
return submit
286287

287288

@@ -348,7 +349,8 @@ def _submit_discretized(sbatch_opts, job_script, bins):
348349
posargs_tmp = opthandler.posargs2str(
349350
posargs[job_script] + slab, prec=ARG_PREC
350351
)
351-
submit += " " + job_script + ".sh " + posargs_tmp
352+
job_script_path = os.path.abspath(os.path.join(FILE_ROOT, job_script))
353+
submit += " " + job_script_path + ".sh " + posargs_tmp
352354
subproc.check_output(shlex.split(submit))
353355
n_jobs_submitted += 1
354356
return n_jobs_submitted

0 commit comments

Comments
 (0)