diff --git a/nipype/pipeline/plugins/multiproc.py b/nipype/pipeline/plugins/multiproc.py index bc66a026e5..f40dd49e02 100644 --- a/nipype/pipeline/plugins/multiproc.py +++ b/nipype/pipeline/plugins/multiproc.py @@ -223,7 +223,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None): # Check to see if a job is available (jobs with all dependencies run) # See https://github.com/nipy/nipype/pull/2200#discussion_r141605722 - jobids = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1] + # See also https://github.com/nipy/nipype/issues/2372 + jobids = np.flatnonzero(~self.proc_done & + (self.depidx.sum(axis=0) == 0).__array__()) # Check available resources by summing all threads and memory used free_memory_gb, free_processors = self._check_resources(