Skip to content

Commit 8e84e62

Browse files
author
William Triplett
committed
Improve sbatch stdout parsing for JobID.
For systems with a submit message that cannot be ignored using --quiet option to sbatch.
1 parent a9e2b51 commit 8e84e62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nipype/pipeline/plugins/slurmgraph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def make_job_name(jobnumber, nodeslist):
135135
if self._sbatch_args.count('-o ') == 0:
136136
stdoutFile = '-o {outFile}'.format(
137137
outFile=batchscriptoutfile)
138-
full_line = '{jobNm}=$(sbatch {outFileOption} {errFileOption} {extraSBatchArgs} {dependantIndex} -J {jobNm} {batchscript} | awk \'{{print $4}}\')\n'.format(
138+
full_line = '{jobNm}=$(sbatch {outFileOption} {errFileOption} {extraSBatchArgs} {dependantIndex} -J {jobNm} {batchscript} | awk \'/^Submitted/ {{print $4}}\')\n'.format(
139139
jobNm=jobname,
140140
outFileOption=stdoutFile,
141141
errFileOption=stderrFile,

0 commit comments

Comments
 (0)