# Eddy cuda works in FSL, but not in MRtrix3's dwifslpreproc

**URL:** https://community.mrtrix.org/t/eddy-cuda-works-in-fsl-but-not-in-mrtrix3s-dwifslpreproc/4174
**Category:** Uncategorized
**Tags:** preprocessing
**Created:** [October 9, 2020, 8:51pm UTC](https://community.mrtrix.org/t/eddy-cuda-works-in-fsl-but-not-in-mrtrix3s-dwifslpreproc/4174 "2020-10-09T20:51:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Lenore\_Tahara-Eckl](https://community.mrtrix.org/user_avatar/community.mrtrix.org/lenore_tahara-eckl/32/2626_2.png) [@Lenore\_Tahara-Eckl](https://community.mrtrix.org/u/Lenore_Tahara-Eckl)
#### Post date: [October 9, 2020, 8:51pm UTC](https://community.mrtrix.org/t/eddy-cuda-works-in-fsl-but-not-in-mrtrix3s-dwifslpreproc/4174/1 "2020-10-09T20:51:18Z")

</div>

Dear MRtrix experts,

I am trying to get eddy cuda to work in my processing pipeline. I am using a virtual machine with a linux environment, via ubuntu 16.04 and have installed cuda 9.1. Upon checking this, cuda is here: ![image](https://community.mrtrix.org/uploads/default/original/2X/c/cd8c377f8c72fb6abfc83b10cda653d63a36b928.png) I also have FSL version 6.0 and MRtrix3 version 3.0.2 installed.

So, running FSL’s command eddy\_cuda9.1 is working fine, and there is a symlink on ‘eddy\_cuda’, which points to eddy\_cuda9.1. However, upon running dwifslpreproc, eddy cuda fails, and it proceeds to run eddy\_openmp instead.

If it helps, I have also installed MRtrix3 via anaconda, as shown here: [https://www.mrtrix.org/download/linux-anaconda/](https://www.mrtrix.org/download/linux-anaconda/). Checking my $PATH variable shows that fsl and mrtrix3 are there -  
 ![image](https://community.mrtrix.org/uploads/default/original/2X/e/ed7b29bf37f4902cd224835b2a7b5bcba2862fee.png)

What can I do to get eddy cuda to work on dwifslpreproc?

Thank you,  
-Lenore

---

<div class="post-metadata">

### Author: ![jdtournier](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jdtournier/32/2594_2.png) [@jdtournier](https://community.mrtrix.org/u/jdtournier)
#### Post date: [October 9, 2020, 10:59pm UTC](https://community.mrtrix.org/t/eddy-cuda-works-in-fsl-but-not-in-mrtrix3s-dwifslpreproc/4174/2 "2020-10-09T22:59:05Z")

</div>

When you say `eddy_cuda`, can I just check that you’ve confirmed this by running a full run of `eddy_cuda` to completion? It looks like you’ve only checked whether the executable is present. The reason I ask is that the most likely reason for the failure is that you’re running within a virtual machine, and depending on the exact specifics of your setup, applications running in the virtual machine may not have access to the host’s GPU, in which case you would get a runtime failure when the application (in this case `eddy_cuda`) tries to access the hardware it needs (and just to check, the host system also needs to run an Nvidia GPU). `dwifslpreproc` will try to run `eddy_cuda` first, but fall back to `eddy_openmp` if that fails.

---

<div class="post-metadata">

### Author: ![Lenore\_Tahara-Eckl](https://community.mrtrix.org/user_avatar/community.mrtrix.org/lenore_tahara-eckl/32/2626_2.png) [@Lenore\_Tahara-Eckl](https://community.mrtrix.org/u/Lenore_Tahara-Eckl)
#### Post date: [October 9, 2020, 11:34pm UTC](https://community.mrtrix.org/t/eddy-cuda-works-in-fsl-but-not-in-mrtrix3s-dwifslpreproc/4174/3 "2020-10-09T23:34:58Z")

</div>

Ah, okay, I will check this with our IT, who look after the vm. Yes, I was only able to check whether the executable of eddy\_cuda was present, and so I will also try running eddy\_cuda from fsl on its own, and see if this problem persists there. Thank you 🙂

---

<div class="post-metadata">

### Author: ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)
#### Post date: [October 12, 2020, 6:36am UTC](https://community.mrtrix.org/t/eddy-cuda-works-in-fsl-but-not-in-mrtrix3s-dwifslpreproc/4174/4 "2020-10-12T06:36:27Z")

</div>

Even if not specifically relevant to your case, I’ll mention here for anyone that comes across this thread based on search terms:

On an up-to-date _MRtrix3_, if you run `dwifslpreproc` with the `-nocleanup` option, then within the retained scratch directory, you will find a file `eddy_cuda_failure_output.txt`. This contains whatever information `eddy_cuda` wrote as its output but did not appear on the terminal due to its having been executed within _MRtrix3_’s `dwifslpreproc` (which superseded it by running `eddy_openmp` as a backup). So if `eddy_cuda` fails but `eddy_openmp` succeeds, that’s where to look. 👍

(The superseding with `eddy_openmp` is necessary because some people may install FSL but never set up CUDA, and I don’t think that `dwifslpreproc` should fail in that case)

---

<div class="post-metadata">

### Author: ![Lenore\_Tahara-Eckl](https://community.mrtrix.org/user_avatar/community.mrtrix.org/lenore_tahara-eckl/32/2626_2.png) [@Lenore\_Tahara-Eckl](https://community.mrtrix.org/u/Lenore_Tahara-Eckl)
#### Post date: [October 15, 2020, 8:56pm UTC](https://community.mrtrix.org/t/eddy-cuda-works-in-fsl-but-not-in-mrtrix3s-dwifslpreproc/4174/5 "2020-10-15T20:56:42Z")

</div>

Thank you Dr. Tournier and Dr. Smith for all of your information.

Just an update on my end in case others might run into something similar - we got eddy cuda to work on both MRtrix and FSL, and I think the main problem was that the GPU was not set up properly on the virtual machine (VM), and so an ‘extra step’ was implemented to fool NVIDIA from knowing it’s running in a VM. I am not too sure on what was exactly done though, as this was done by the VM support staff; I am using something called the ‘Nectar Research Cloud’ from our University for this 🙂
