Skip to content

Commit 681a0d6

Browse files
committed
FIX: Pass parameters to all MapNode-generated Nodes
1 parent 4358fe5 commit 681a0d6

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

nipype/pipeline/engine/nodes.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,9 +1112,15 @@ def _make_nodes(self, cwd=None):
11121112
nitems = len(filename_to_list(getattr(self.inputs, self.iterfield[0])))
11131113
for i in range(nitems):
11141114
nodename = '_' + self.name + str(i)
1115-
node = Node(deepcopy(self._interface), name=nodename)
1116-
node.overwrite = self.overwrite
1117-
node.run_without_submitting = self.run_without_submitting
1115+
node = Node(deepcopy(self._interface),
1116+
n_procs=self._interface.num_threads,
1117+
mem_gb=self._interface.estimated_memory_gb,
1118+
overwrite=self.overwrite,
1119+
needed_outputs=self.needed_outputs,
1120+
run_without_submitting=self.run_without_submitting,
1121+
config=self.config,
1122+
base_dir=op.join(cwd, 'mapflow'),
1123+
name=nodename)
11181124
node.plugin_args = self.plugin_args
11191125
node._interface.inputs.set(
11201126
**deepcopy(self._interface.inputs.get()))
@@ -1125,8 +1131,6 @@ def _make_nodes(self, cwd=None):
11251131
fieldvals = filename_to_list(getattr(self.inputs, field))
11261132
logger.debug('setting input %d %s %s', i, field, fieldvals[i])
11271133
setattr(node.inputs, field, fieldvals[i])
1128-
node.config = self.config
1129-
node.base_dir = op.join(cwd, 'mapflow')
11301134
yield i, node
11311135

11321136
def _node_runner(self, nodes, updatehash=False):

0 commit comments

Comments
 (0)