Dwifslpreproc eddy cuda error

Dear mrtrix experts,

I’m trying to run dwifslpreproc after reinstalling mrtrix as specified here and I get the following error:

eddy_cuda

dyld: Library not loaded: @rpath/libcudart.7.5.dylib
Referenced from: /usr/local/fsl/bin/eddy_cuda
Reason: image not found

Any idea on what might be going on?

Thank you

Sure. You’re trying to run the GPU-accelerated version of eddy, which relies on nVIDIA’s CUDA framework. The message says it can’t find the necessary CUDA version 7.5 runtime library, which your specific version of eddy_cuda requires (eddy_cuda can be linked against different versions, it depends what version was installed on the system where your specific version of eddy was compiled).

At this point, there are a few options:

  1. you don’t have a nVIDIA GPU on your system (they’re quite rare on macOS systems these days). At this point, there’s no point trying to install CUDA since there’s no suitable hardware to run on. The solution here would be to remove eddy_cuda, and use eddy_openmp instead. It will be slower, but at least it’ll run.

  2. you do have a nVIDIA GPU on your system. In this case, you’ll either need to find a more up to date version of eddy_cuda compiled against the same version of CUDA as is installed on your system (if you have CUDA installed in the first place), or make sure you install the matching version of CUDA (not trivial since 7.5 is really outdated by now…).

Either way, this is a bit outside our remit, it really is an FSL issue. I’d recommend searching on the FSL forums to see if anyone has come up with quick and easy solutions for this.

I removed eddy_cuda from the FSL bin folder and added eddy_openmp. I still get an error:

eddy_openmp --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --slm=linear --out=dwi_post_eddy --verbose

dyld: Library not loaded: /opt/local/lib/libgcc/libgomp.1.dylib
Referenced from: /usr/local/fsl/bin/eddy_openmp
Reason: image not found

This has also something to do with nVIDIA?
I’m tempted to run the dwipreproc command that worked in the previous MRtrix versions. Would the output change that much?

Thank you

Nope – libgomp is the GNU openMP library.

I’m not sure where you got your FSL installation from, but it’s clearly not installed correctly… It’s expecting to find that specific library in the /opt/local/lib/libgcc/ folder, but there’s no reason to expect it to be installed there particularly (it’s a fairly unusual location for a GNU library, to be honest). I’d double check your FSL installation and try to figure that out. Where did you get the software from? Did you follow the recommended procedure for installation on macOS?

No, the issue is with your FSL installation, not MRtrix as far as I can tell. Older versions of dwipreproc would fail just the same way. But that said, if you manage to get eddy_cuda or eddy_openmp to run outside of dwifslpreproc, but not within that script, then we’d need to figure out whether there’s anything we can do to fix that. But so far, all the evidence points to a badly configured FSL installation…

I believe I followed those instructions when I first installed it two years ago. I reinstalled it yesterday following the steps described in that link and I still get the same errors…:frowning:

In case someone else has the same problem, the solution I found was:
Install a virtual machine running in Linux and run dwifslpreproc there. I could not make eddy_cuda work, but eddy_openmp worked.
It took a week to the dwifslpreproc step (which was quite annoying), but it’s better than nothing.

There should hopefully be official MRtrix3 containers in the not too distant future; I can run eddy_cuda through the Singularity container on my local HPC :speedboat: