Skip to content

Commit 70da04e

Browse files
committed
less verbose, update CHANGES
1 parent bcc25fd commit 70da04e

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Upcoming release (0.14.1)
22
================
33

4+
* FIX: MultiProc starting workers at dubious wd (https://github.com/nipy/nipype/pull/2368)
45
* MAINT: Cleaning / simplify ``Node`` (https://github.com/nipy/nipype/pull/#2325)
56

67
0.14.0 (November 29, 2017)

nipype/pipeline/plugins/multiproc.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ def run_node(node, updatehash, taskid):
7171
return result
7272

7373

74-
def _init_worker(cwd):
75-
os.chdir(cwd)
76-
77-
7874
class NonDaemonProcess(Process):
7975
"""A non-daemon process to support internal multiprocessing.
8076
"""
@@ -159,13 +155,13 @@ def __init__(self, plugin_args=None):
159155
self.pool = NipypePool(
160156
processes=self.processors,
161157
maxtasksperchild=maxtasks,
162-
initializer=_init_worker,
158+
initializer=os.chdir,
163159
initargs=(self._cwd,)
164160
)
165161
except TypeError:
166162
# Python < 3.2 does not have maxtasksperchild
167163
# When maxtasksperchild is not set, initializer is not to be
168-
# called.
164+
# called
169165
self.pool = NipypePool(processes=self.processors)
170166

171167
self._stats = None

0 commit comments

Comments
 (0)