Skip to content

Commit 154f5e2

Browse files
committed
fix: set default number of threads for ITK programs to 1
1 parent ccc7e95 commit 154f5e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nipype/interfaces/ants/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# the computer (when running MultiProc) by forcing everything to
1616
# single threaded. This can be a severe penalty for registration
1717
# performance.
18-
LOCAL_DEFAULT_NUMBER_OF_THREADS=-1
18+
LOCAL_DEFAULT_NUMBER_OF_THREADS=1
1919
# -Using NSLOTS has the same behavior as ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS
2020
# as long as ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS is not set. Otherwise
2121
# ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS takes precidence.
@@ -28,8 +28,8 @@ class ANTSCommandInputSpec(CommandLineInputSpec):
2828
"""Base Input Specification for all ANTS Commands
2929
"""
3030

31-
num_threads = traits.Int(LOCAL_DEFAULT_NUMBER_OF_THREADS, usedefault=True, nohash=True,
32-
desc="Number of ITK threads to use")
31+
num_threads = traits.Int(LOCAL_DEFAULT_NUMBER_OF_THREADS, usedefault=True,
32+
nohash=True, desc="Number of ITK threads to use")
3333

3434

3535
class ANTSCommand(CommandLine):

0 commit comments

Comments
 (0)