Skip to content

Commit e914a92

Browse files
committed
Make skipping job submissions optional and turned off by default.
1 parent 34c6674 commit e914a92

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

doc/users/plugins.rst

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,28 @@ particular node might use more resources than other nodes in a workflow.
136136
this local configuration::
137137

138138
node.plugin_args = {'qsub_args': '-l nodes=1:ppn=3', 'overwrite': True}
139+
140+
SGEGraph
141+
~~~~~~~~
142+
SGEGraph_ is a exuction plugin working with Sun Grid Engine that allows for
143+
submitting entire graph of dependent jobs at once. This way Nipype does not
144+
need to run a monitoring process - SGE takes care of this.
145+
146+
.. note::
147+
148+
When rerunning unfinished workflows using SGEGraph you may decide not to
149+
submit jobs for Nodes that previously finished running. This can speed up
150+
execution, but new or modified inputs that would previously trigger a Node
151+
to rerun will be ignored. The following option turns on this functionality::
152+
153+
workflow.run(plugin='SGEGraph', plugin_args = {'dont_resubmit_completed_jobs': True})
139154

140155
LSF
141156
---
142157

143-
Submitting via LSF is almost identical to SGE above:
158+
Submitting via LSF is almost identical to SGE above::
144159

145-
workflow.run(plugin='LSF')
160+
workflow.run(plugin='LSF')
146161

147162
Optional arguments::
148163

@@ -156,7 +171,7 @@ DAGMan
156171
~~~~~~
157172

158173
With its DAGMan_ component HTCondor_ (previously Condor) allows for submitting
159-
entire graphs of dependent jobs at once. With the ``CondorDAGMan`` plug-in
174+
entire graphs of dependent jobs at once (similar to SGEGraph_). With the ``CondorDAGMan`` plug-in
160175
Nipype can utilize this functionality to submit complete workflows directly and
161176
in a single step. Consequently, and in contrast to other plug-ins, workflow
162177
execution returns almost instantaneously -- Nipype is only used to generate the

nipype/pipeline/plugins/sgegraph.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ def __init__(self, **kwargs):
5555
self._template = open(self._template).read()
5656
if 'qsub_args' in plugin_args:
5757
self._qsub_args = plugin_args['qsub_args']
58+
if 'dont_resubmit_completed_jobs' in plugin_args:
59+
self._dont_resubmit_completed_jobs = plugin_args['dont_resubmit_completed_jobs']
60+
else:
61+
self._dont_resubmit_completed_jobs = False
5862
super(SGEGraphPlugin, self).__init__(**kwargs)
5963

6064
def _submit_graph(self, pyfiles, dependencies, nodes):
@@ -72,7 +76,7 @@ def make_job_name(jobnumber, nodeslist):
7276
submitjobsfile = os.path.join(batch_dir, 'submit_jobs.sh')
7377

7478
cache_doneness_per_node = dict()
75-
if True: ## A future parameter for controlling this behavior could be added here
79+
if self._dont_resubmit_completed_jobs: ## A future parameter for controlling this behavior could be added here
7680
for idx, pyscript in enumerate(pyfiles):
7781
node = nodes[idx]
7882
node_status_done = node_completed_status(node)

nipype/utils/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
stop_on_unknown_version = false
4949
write_provenance = false
5050
parameterize_dirs = true
51+
sge_dont_resubmit_completed_jobs = false
5152
5253
[check]
5354
interval = 1209600

0 commit comments

Comments
 (0)