Skip to content

Commit 7ce5bb4

Browse files
authored
Merge pull request #2378 from effigies/fix/jobids
FIX: Collect jobids in a numpy 1.9 compatible manner
2 parents 6dd7703 + e92ffa4 commit 7ce5bb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nipype/pipeline/plugins/multiproc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ def _send_procs_to_workers(self, updatehash=False, graph=None):
223223

224224
# Check to see if a job is available (jobs with all dependencies run)
225225
# See https://github.com/nipy/nipype/pull/2200#discussion_r141605722
226-
jobids = np.nonzero(~self.proc_done & (self.depidx.sum(0) == 0))[1]
226+
# See also https://github.com/nipy/nipype/issues/2372
227+
jobids = np.flatnonzero(~self.proc_done &
228+
(self.depidx.sum(axis=0) == 0).__array__())
227229

228230
# Check available resources by summing all threads and memory used
229231
free_memory_gb, free_processors = self._check_resources(

0 commit comments

Comments
 (0)