File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -439,7 +439,7 @@ def parse_args(args=None, namespace=None):
439
439
config .nipype .plugin = _plugin
440
440
config .nipype .plugin_args = plugin_settings .get ("plugin_args" , {})
441
441
config .nipype .nprocs = config .nipype .plugin_args .get (
442
- "nprocs " , config .nipype .nprocs
442
+ "n_procs " , config .nipype .nprocs
443
443
)
444
444
445
445
# Resource management options
Original file line number Diff line number Diff line change @@ -279,12 +279,17 @@ class nipype(_Config):
279
279
@classmethod
280
280
def get_plugin (cls ):
281
281
"""Format a dictionary for Nipype consumption."""
282
+ nprocs = int (cls .nprocs )
283
+ if nprocs == 1 :
284
+ cls .plugin = "Linear"
285
+ return {"plugin" : "Linear" }
286
+
282
287
out = {
283
288
"plugin" : cls .plugin ,
284
289
"plugin_args" : cls .plugin_args ,
285
290
}
286
291
if cls .plugin in ("MultiProc" , "LegacyMultiProc" ):
287
- out ["plugin_args" ]["nprocs " ] = int (cls .nprocs )
292
+ out ["plugin_args" ]["n_procs " ] = int (cls .nprocs )
288
293
if cls .memory_gb :
289
294
out ["plugin_args" ]["memory_gb" ] = float (cls .memory_gb )
290
295
return out
You can’t perform that action at this time.
0 commit comments