Skip to content

Commit d8c23b1

Browse files
committed
Merge pull request #1330 from wtriplett/fix/slurmgraph-jobid-parsing
Improve sbatch stdout parsing for JobID.
2 parents d1211be + 8e84e62 commit d8c23b1

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)