diff --git a/.zenodo.json b/.zenodo.json index 509f8342cc..a625eb2669 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -568,6 +568,11 @@ "affiliation": "University College London", "name": "Mancini, Matteo", "orcid": "0000-0001-7194-4568" + }, + { + "affiliation": "Donders Institute for Brain, Cognition and Behavior, Center for Cognitive Neuroimaging", + "name": "Chetverikov, Andrey", + "orcid": "0000-0003-2767-6310" } ], "keywords": [ diff --git a/nipype/pipeline/plugins/base.py b/nipype/pipeline/plugins/base.py index f37bcff883..c757c3859c 100644 --- a/nipype/pipeline/plugins/base.py +++ b/nipype/pipeline/plugins/base.py @@ -284,7 +284,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]: diff --git a/nipype/pipeline/plugins/pbs.py b/nipype/pipeline/plugins/pbs.py index 3c0667605c..437c901a00 100644 --- a/nipype/pipeline/plugins/pbs.py +++ b/nipype/pipeline/plugins/pbs.py @@ -49,18 +49,20 @@ def __init__(self, **kwargs): super(PBSPlugin, self).__init__(template, **kwargs) def _is_pending(self, taskid): - result = CommandLine( - 'qstat {}'.format(taskid), - environ=dict(os.environ), - terminal_output='allatonce', - resource_monitor=False, - ignore_exception=True).run() - errmsg = 'Unknown Job Id' # %s' % taskid + result = CommandLine('qstat -f {}'.format(taskid), + environ=dict(os.environ), + terminal_output='file_split', + resource_monitor=False, + ignore_exception=True).run() + + stdout = result.runtime.stdout + stderr = result.runtime.stderr + 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(