Skip to content

Commit 62872a5

Browse files
authored
Merge pull request #3709 from mauriliogenovese/fix/updatehash
fix: Resolve crashes when running workflows with updatehash=True
2 parents bc456dd + 88e30f8 commit 62872a5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

nipype/pipeline/engine/nodes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ def run(self, updatehash=False):
452452
cached, updated = self.is_cached()
453453

454454
# If the node is cached, check on pklz files and finish
455-
if not force_run and (updated or (not updated and updatehash)):
455+
if cached and not force_run and (updated or updatehash):
456456
logger.debug("Only updating node hashes or skipping execution")
457457
inputs_file = op.join(outdir, "_inputs.pklz")
458458
if not op.exists(inputs_file):

nipype/pipeline/plugins/multiproc.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
336336
if self._local_hash_check(jobid, graph):
337337
continue
338338

339+
cached, updated = self.procs[jobid].is_cached()
339340
# updatehash and run_without_submitting are also run locally
340-
if updatehash or self.procs[jobid].run_without_submitting:
341+
if (cached and updatehash and not updated) or self.procs[jobid].run_without_submitting:
341342
logger.debug("Running node %s on master thread", self.procs[jobid])
342343
try:
343344
self.procs[jobid].run(updatehash=updatehash)

0 commit comments

Comments
 (0)