Skip to content

Commit 8d9fb50

Browse files
committed
fix: avoid stopping of nipype-workflow caused by temporarily suspended LSF-jobs, And changed logfile of lsf-jobs from <lsf_jobid>.out to <scriptname>.log
1 parent d323b92 commit 8d9fb50

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

nipype/pipeline/plugins/lsf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ def _is_pending(self, taskid):
5252
result = cmd.run(ignore_exception=True)
5353
iflogger.setLevel(oldlevel)
5454
# logger.debug(result.runtime.stdout)
55-
if 'PEND' in result.runtime.stdout or 'RUN' in result.runtime.stdout:
56-
return True
57-
else:
55+
if 'DONE' in result.runtime.stdout or 'EXIT' in result.runtime.stdout:
5856
return False
57+
else:
58+
return True
5959

6060
def _submit_batchtask(self, scriptfile, node):
6161
cmd = CommandLine('bsub', environ=os.environ.data,
@@ -71,9 +71,9 @@ def _submit_batchtask(self, scriptfile, node):
7171
else:
7272
bsubargs += (" " + node.plugin_args['bsub_args'])
7373
if '-o' not in bsubargs: # -o outfile
74-
bsubargs = '%s -o %s' % (bsubargs, path)
74+
bsubargs = '%s -o %s' % (bsubargs, scriptfile + ".log")
7575
if '-e' not in bsubargs:
76-
bsubargs = '%s -e %s' % (bsubargs, path) # -e error file
76+
bsubargs = '%s -e %s' % (bsubargs, scriptfile + ".log") # -e error file
7777
if node._hierarchy:
7878
jobname = '.'.join((os.environ.data['LOGNAME'],
7979
node._hierarchy,

0 commit comments

Comments
 (0)