# Eddy\_cuda was unsuccesful attempting openmp

**URL:** <https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992>\
**Category:** Uncategorized\
**Tags:** connectomics, preprocessing, tractography\
**Created:** [August 30, 2022, 11:59pm UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992 "2022-08-30T23:59:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![andraderenew](https://community.mrtrix.org/user_avatar/community.mrtrix.org/andraderenew/32/3665_2.png) [@andraderenew](https://community.mrtrix.org/u/andraderenew)\
**Post date:** [August 30, 2022, 11:59pm UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/1 "2022-08-30T23:59:56Z")

</div>

Dear community:

I have run dwifslpreproc but I can’t make it work with eddy\_cuda. Although I can run eddy\_cuda (cuda 9.1) with no other arguments and it works. I can’t even try to run from the temporary directory of dwifslpreproc. Openmp does work. It has worked before with another ubuntu 20.04 I believe. Now 22.04 fresh install.

Command: eddy\_cuda --imain=eddy\_in.nii --mask=eddy\_mask.nii --acqp=eddy\_config.txt --index=eddy\_indices.txt --bvecs=bvecs --bvals=bvals --slm=linear --data\_is\_shelled --out=dwi\_post\_eddy --verbose  
dwifslpreproc: CUDA version of ‘eddy’ was not successful; attempting OpenMP version

thanks for the help in advance!

---

<div class="post-metadata">

**Author:** ![NicDC](https://community.mrtrix.org/user_avatar/community.mrtrix.org/nicdc/32/1779_2.png) [@NicDC](https://community.mrtrix.org/u/NicDC)\
**Post date:** [August 31, 2022, 2:25pm UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/2 "2022-08-31T14:25:02Z")

</div>

Hello @andraderenew,

This is most likely due to a CUDA library/driver issue.

What happens if you execute the eddy command in the temporary directory created by dwifslpreproc?

> [@andraderenew](#):
>
> eddy\_cuda --imain=eddy\_in.nii --mask=eddy\_mask.nii --acqp=eddy\_config.txt --index=eddy\_indices.txt --bvecs=bvecs --bvals=bvals --slm=linear --data\_is\_shelled --out=dwi\_post\_eddy --verbose

Nick

---

<div class="post-metadata">

**Author:** ![andraderenew](https://community.mrtrix.org/user_avatar/community.mrtrix.org/andraderenew/32/3665_2.png) [@andraderenew](https://community.mrtrix.org/u/andraderenew)\
**Post date:** [August 31, 2022, 5:39pm UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/3 "2022-08-31T17:39:33Z")

</div>

It doens’t work I’ll show you the error.

```auto
Reading images
Performing volume-to-volume registration
Running Register
EDDY::: EddyCudaHelperFunctions::InitGpu: cudaGetDevice returned an error: cudaError_t = 30, cudaErrorName = cudaErrorUnknown, cudaErrorString = unknown error
EDDY::: cuda/EddyCudaHelperFunctions.cu::: static void EDDY::EddyCudaHelperFunctions::InitGpu(bool): Exception thrown
EDDY::: cuda/EddyGpuUtils.cu::: static std::shared_ptr<EDDY::DWIPredictionMaker> EDDY::EddyGpuUtils::LoadPredictionMaker(const EDDY::EddyCommandLineOptions&, EDDY::ScanType, const EDDY::ECScanManager&, unsigned int, float, NEWIMAGE::volume<float>&, bool): Exception thrown
EDDY::: eddy.cpp::: EDDY::ReplacementManager* EDDY::Register(const EDDY::EddyCommandLineOptions&, EDDY::ScanType, unsigned int, const std::vector<float, std::allocator<float> >&, EDDY::SecondLevelECModel, bool, EDDY::ECScanManager&, EDDY::ReplacementManager*, NEWMAT::Matrix&, NEWMAT::Matrix&): Exception thrown
EDDY::: Eddy failed with message EDDY::: eddy.cpp::: EDDY::ReplacementManager* EDDY::DoVolumeToVolumeRegistration(const EDDY::EddyCommandLineOptions&, EDDY::ECScanManager&): Exception thrown

```

---

<div class="post-metadata">

**Author:** ![NicDC](https://community.mrtrix.org/user_avatar/community.mrtrix.org/nicdc/32/1779_2.png) [@NicDC](https://community.mrtrix.org/u/NicDC)\
**Post date:** [September 1, 2022, 8:05am UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/4 "2022-09-01T08:05:53Z")

</div>

Yeah, you need to make sure your NVIDIA drivers and cuda library are set up properly.

I would recommend uninstalling the existing NVIDIA drivers and libraries, reinstalling the latest driver for your graphics card, and then install cuda library 10.2 without the driver to avoid any conflicts.

Hope this helps,  
Nick

---

<div class="post-metadata">

**Author:** ![andraderenew](https://community.mrtrix.org/user_avatar/community.mrtrix.org/andraderenew/32/3665_2.png) [@andraderenew](https://community.mrtrix.org/u/andraderenew)\
**Post date:** [September 2, 2022, 1:43am UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/5 "2022-09-02T01:43:10Z")

</div>

I can’t install NVIDIA drivers 10.2. There are unmet dependencies and I can’t find a way to make it work. Believe me I have tried many options and none seem to work. Perhaps is ubuntu 22.04. Still I understand perhaps thats my only option. It seems odd to me that 9.1 can be installed while 10.2 cannot. For the mean time I use openmp. It’s a shame I can’t use my GPU for the moment. Thanks for the help either way!

---

<div class="post-metadata">

**Author:** ![andraderenew](https://community.mrtrix.org/user_avatar/community.mrtrix.org/andraderenew/32/3665_2.png) [@andraderenew](https://community.mrtrix.org/u/andraderenew)\
**Post date:** [September 4, 2022, 7:53pm UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/6 "2022-09-04T19:53:49Z")

</div>

I think I know what seems to be the issue. I run nvidia-smi and there seems to be an issue with the driver. Then I try sudo apt-get install nvidia-driver-390 ( for cuda toolkit 9.1) or sudo apt-get install nvidia-driver-440 (for cuda toolkit 10.2) or sudo apt-get install nvidia-driver-515 (latest up to date ) and none seems to install correctly. Issues related to dkms and driver itself. I have done sudo apt-get purge _nvidia_ and sudo apt autoremove. And none allows me to install. I try to configure to --fix-broken dependences to -f (force) installation and nothing works. For R390 there seems to be an issue with libraries related to xserver-xorg-video-nvidia and other cfg1 that seem to install and uninstall one another when both needs to be installed. I know it seems contradictory and difficult to understand but this is what I had to face.

---

<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:** [September 5, 2022, 8:40pm UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/7 "2022-09-05T20:40:11Z")

</div>

Yes, getting the NVIDIA drivers installed correctly can sometimes be a bit of a headache, unfortunately. I did however just spot that there has been a [hiccup in Ubuntu’s handling of the 390 driver](https://www.phoronix.com/news/Ubuntu-20.04.5-NVIDIA-Issue), though I have no idea whether that’s actually relevant to your situation… That said, if this is the issue, there’s a good chance that it might magically work if you try again now or in the near future when they’ve sorted out the packages…

---

<div class="post-metadata">

**Author:** ![NicDC](https://community.mrtrix.org/user_avatar/community.mrtrix.org/nicdc/32/1779_2.png) [@NicDC](https://community.mrtrix.org/u/NicDC)\
**Post date:** [September 6, 2022, 7:43am UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/8 "2022-09-06T07:43:55Z")

</div>

> [@jdtournier](#):
>
> Yes, getting the NVIDIA drivers installed correctly can sometimes be a bit of a headache

+1

Or you revert back to Ubuntu 20.04 since that seems to work alright… 🙂

---

<div class="post-metadata">

**Author:** ![andraderenew](https://community.mrtrix.org/user_avatar/community.mrtrix.org/andraderenew/32/3665_2.png) [@andraderenew](https://community.mrtrix.org/u/andraderenew)\
**Post date:** [September 11, 2022, 10:37am UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/9 "2022-09-11T10:37:07Z")

</div>

thanks I will try my best to see if it works.

---

<div class="post-metadata">

**Author:** ![andraderenew](https://community.mrtrix.org/user_avatar/community.mrtrix.org/andraderenew/32/3665_2.png) [@andraderenew](https://community.mrtrix.org/u/andraderenew)\
**Post date:** [September 11, 2022, 10:37am UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/10 "2022-09-11T10:37:35Z")

</div>

thanks for the heads up!!! Eventually driver 390 is part of the problem.

---

<div class="post-metadata">

**Author:** ![andraderenew](https://community.mrtrix.org/user_avatar/community.mrtrix.org/andraderenew/32/3665_2.png) [@andraderenew](https://community.mrtrix.org/u/andraderenew)\
**Post date:** [September 21, 2022, 4:20pm UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/11 "2022-09-21T16:20:23Z")

</div>

I have a new error.

eddy\_cuda: error while loading shared libraries: libcublas.so.9.1: cannot open shared object file:No such file or directory

---

<div class="post-metadata">

**Author:** ![andraderenew](https://community.mrtrix.org/user_avatar/community.mrtrix.org/andraderenew/32/3665_2.png) [@andraderenew](https://community.mrtrix.org/u/andraderenew)\
**Post date:** [September 21, 2022, 4:24pm UTC](https://community.mrtrix.org/t/eddy-cuda-was-unsuccesful-attempting-openmp/5992/12 "2022-09-21T16:24:05Z")

</div>

I just needed to uncomment the library for cuda 9.1

thanks anyways!!
