We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ae3fd02 + eff7b43 commit 6dd7703Copy full SHA for 6dd7703
.zenodo.json
@@ -568,6 +568,11 @@
568
"affiliation": "University College London",
569
"name": "Mancini, Matteo",
570
"orcid": "0000-0001-7194-4568"
571
+ },
572
+ {
573
+ "affiliation": "Donders Institute for Brain, Cognition and Behavior, Center for Cognitive Neuroimaging",
574
+ "name": "Chetverikov, Andrey",
575
+ "orcid": "0000-0003-2767-6310"
576
}
577
],
578
"keywords": [
nipype/pipeline/plugins/pbs.py
@@ -49,18 +49,20 @@ def __init__(self, **kwargs):
49
super(PBSPlugin, self).__init__(template, **kwargs)
50
51
def _is_pending(self, taskid):
52
- result = CommandLine(
53
- 'qstat {}'.format(taskid),
54
- environ=dict(os.environ),
55
- terminal_output='allatonce',
56
- resource_monitor=False,
57
- ignore_exception=True).run()
58
- 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
59
+ stderr = result.runtime.stderr
60
+ errmsg = 'Unknown Job Id'
61
success = 'Job has finished'
- if success in e: # Fix for my PBS
62
+ if (success in stderr) or ('job_state = C' in stdout):
63
return False
64
else:
- return errmsg not in e
65
+ return errmsg not in stderr
66
67
def _submit_batchtask(self, scriptfile, node):
68
cmd = CommandLine(
0 commit comments