Skip to content

Commit 6ae0083

Browse files
committed
enh: allow node specific plugin args for sge and pbs
1 parent 33a71f4 commit 6ae0083

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

nipype/pipeline/engine.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,7 @@ def __init__(self, interface, iterables=None, overwrite=None,
973973
self.run_without_submitting = run_without_submitting
974974
self.input_source = {}
975975
self.needed_outputs = []
976+
self.plugin_args = {}
976977
if needed_outputs:
977978
self.needed_outputs = sorted(needed_outputs)
978979

nipype/pipeline/plugins/pbs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ def _submit_batchtask(self, scriptfile, node):
5252
qsubargs = ''
5353
if self._qsub_args:
5454
qsubargs = self._qsub_args
55+
if 'qsub_args' in node.plugin_args:
56+
if 'overwrite' in node.plugin_args and \
57+
node.plugin_args['overwrite']:
58+
qsubargs = node.plugin_args['qsub_args']
59+
else:
60+
qsubargs += (" " + node.plugin_args['qsub_args'])
5561
if '-o' not in qsubargs:
5662
qsubargs = '%s -o %s' % (qsubargs, path)
5763
if '-e' not in qsubargs:

nipype/pipeline/plugins/sge.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ def _submit_batchtask(self, scriptfile, node):
5353
qsubargs = ''
5454
if self._qsub_args:
5555
qsubargs = self._qsub_args
56+
if 'qsub_args' in node.plugin_args:
57+
if 'overwrite' in node.plugin_args and\
58+
node.plugin_args['overwrite']:
59+
qsubargs = node.plugin_args['qsub_args']
60+
else:
61+
qsubargs += (" " + node.plugin_args['qsub_args'])
5662
if '-o' not in qsubargs:
5763
qsubargs = '%s -o %s' % (qsubargs, path)
5864
if '-e' not in qsubargs:

0 commit comments

Comments
 (0)