Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9348f49

Browse filesBrowse files
force 1 thread if eddy run on gpu
1 parent 2f9aa4b commit 9348f49
Copy full SHA for 9348f49

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎nipype/interfaces/fsl/epi.py

Copy file name to clipboardExpand all lines: nipype/interfaces/fsl/epi.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,8 @@ def __init__(self, **inputs):
960960
self._use_cuda()
961961

962962
def _num_threads_update(self):
963+
if self.inputs.use_cuda and gpu_count()>0:
964+
self.inputs.num_threads = 1
963965
self._num_threads = self.inputs.num_threads
964966
if not isdefined(self.inputs.num_threads):
965967
if "OMP_NUM_THREADS" in self.inputs.environ:
@@ -969,12 +971,13 @@ def _num_threads_update(self):
969971

970972
def _use_cuda(self):
971973
if self.inputs.use_cuda and gpu_count()>0:
974+
self.inputs.num_threads = 1
972975
# eddy_cuda usually link to eddy_cudaX.X but some versions miss the symlink
973976
# anyway in newer fsl versions eddy automatically use cuda on cuda-capable systems
974977
self._cmd = "eddy_cuda" if which("eddy_cuda") else "eddy"
975978
else:
976979
# older fsl versions has cuda_openmp, newer versions has eddy_cpu
977-
_cmd = "eddy_openmp" if which("eddy_openmp") else "eddy_cpu"
980+
self._cmd = "eddy_openmp" if which("eddy_openmp") else "eddy_cpu"
978981

979982
def _run_interface(self, runtime):
980983
# If selected command is missing, use generic 'eddy'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.