Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nipype/pipeline/plugins/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):

if len(jobids) > 0:
# send all available jobs
logger.info('Pending[%d] Submitting[%d] jobs Slots[%d]',
logger.info('Pending[%d] Submitting[%d] jobs Slots[%s]',
num_jobs, len(jobids[:slots]), slots or 'inf')

for jobid in jobids[:slots]:
Expand Down
10 changes: 6 additions & 4 deletions nipype/pipeline/plugins/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,20 @@ def __init__(self, **kwargs):
super(PBSPlugin, self).__init__(template, **kwargs)

def _is_pending(self, taskid):
result = CommandLine('qstat {}'.format(taskid),
result = CommandLine('qstat -f {}'.format(taskid),
environ=dict(os.environ),
terminal_output='allatonce',
Copy link
Contributor

@oesteban oesteban Dec 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest changing terminal_output to 'file_split'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oesteban why? & where can I read about file_split, it seems to be not documented yet (http://nipype.readthedocs.io/en/latest/interfaces/generated/interfaces.base/core.html#parameters)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resource_monitor=False,
ignore_exception=True).run()

stdout = result.runtime.stdout
stderr = result.runtime.stderr
errmsg = 'Unknown Job Id' # %s' % taskid
errmsg = 'Unknown Job Id'
success = 'Job has finished'
if success in e: # Fix for my PBS
if (success in stderr) or ('job_state = C' in stdout):
return False
else:
return errmsg not in e
return errmsg not in stderr

def _submit_batchtask(self, scriptfile, node):
cmd = CommandLine('qsub', environ=dict(os.environ),
Expand Down