Eddy_cuda was unsuccesful attempting openmp

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!

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?


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

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

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,

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!

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.

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, 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…


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

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

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

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

I just needed to uncomment the library for cuda 9.1

thanks anyways!!

1 Like