CUDNN_STATUS_BAD_PARAM
Ubuntu 14.04LTS Clean install nvidia dpkg install
$ sudo apt-get install cuda
$ sudo apt-get install digits
$ gedit .bashrc
add to endline next.
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
$ sudo reboot
$ nvidia-smi
Tue May 31 13:32:37 2016
+------------------------------------------------------+
| NVIDIA-SMI 352.93 Driver Version: 352.93 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 960 Off | 0000:01:00.0 On | N/A |
| 20% 37C P8 10W / 160W | 289MiB / 4095MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GTX 960 Off | 0000:02:00.0 Off | N/A |
| 20% 43C P8 9W / 160W | 13MiB / 4095MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_14:27:32_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17
----digits run and create Dataset----
MNIST Image Size28x28 Image Type GRAYSCALE
run Image Classification Model
select Caffe and LeNet
run, and rize next error
ERROR: Check failed: status == CUDNN_STATUS_SUCCESS (3 vs. 0) CUDNN_STATUS_BAD_PARAM
That all looks pretty good to me so far.
Can you look in the caffe_output.log file to see if there's any more information about what's going wrong?
Thank you for response. caffe_output.log.txt
prease show this file.
E0531 13:25:31.162212 12391 common.cpp:121] Cannot create cuDNN handle. cuDNN won't be available.
I seem to error of cuDNN, do I need an additional installation of cuDNN?
You can check that CuDNN is installed and that the library file exists on your system:
$ dpkg -s libcudnn4
Package: libcudnn4
Status: install ok installed
...
$ ldconfig -p | grep cudnn
libcudnn.so.4 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcudnn.so.4
libcudnn.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcudnn.so
$ ls -l /usr/lib/x86_64-linux-gnu/libcudnn.so.4.0.7
-rw-r--r-- 1 root root 61453024 févr. 9 08:47 /usr/lib/x86_64-linux-gnu/libcudnn.so.4.0.7
Package libcudnn4 is a dependency of package digits so you should already have it.
Thank you comment. ... $ dpkg -s libcudnn4 #this result is "not install"
$ ldconfig -p | grep cudnn libcudnn.so.5 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libcudnn.so.5
$ ls -l /usr/lib/x86_64-linux-gnu/libcudnn.so.5 lrwxrwxrwx 1 root root 17 4月 28 17:45 /usr/lib/x86_64-linux-gnu/libcudnn.so.5 -> libcudnn.so.5.0.5
$ ls -l /usr/lib/x86_64-linux-gnu/libcudnn.so.4.0.7 #this result is "do not accsess, no such file:not find file and directory."
Ok, then you didn't install DIGITS or Caffe with a deb package, correct? Which version of Caffe are you using? For example, you might be using NVcaffe v0.14.5.
Installation of the package, and the nvidia installation guide will help.
$ su
$ CUDA_REPO_PKG=cuda-repo-ubuntu1404_7.5-18_amd64.deb
$ wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/$CUDA_REPO_PKG
$ dpkg -i $CUDA_REPO_PKG
$ ML_REPO_PKG=nvidia-machine-learning-repo_4.0-2_amd64.deb
$ wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64/$ML_REPO_PKG
$ dpkg -i $ML_REPO_PKG
$ exit
$ sudo apt-get update
Oh right, we updated the Caffe package online. That should work ...
@gheinrich can you do a quick smoketest with the packages (since you're on 14.04) and make sure it isn't broken for you? I'll do it tomorrow if you don't get to it. Surely the public packages aren't broken ...
I experienced the same issue. Would it do any harm to digits' system integrity, if I would manually install cudnn4 side-by-side with cudnn5?
Would it do any harm to digits' system integrity, if I would manually install cudnn4 side-by-side with cudnn5?
Not at all. The deb packages for cuDNN >= v4 use alternatives, so you can have multiple versions at the same time.
I installed cudnn4 with ubuntu software center and rebooted, so
dpkg -s libcudnn4 reveals v4.0.7 installed
I then dropped and recreated the mnist model according to
instructions
but training still dies with
ip2_ip2_0_split needs backward computation. ip2 needs backward computation. relu1 needs backward computation. ip1 needs backward computation. pool2 needs backward computation. conv2 needs backward computation. pool1 needs backward computation. conv1 needs backward computation. scale does not need backward computation. label_mnist_1_split does not need backward computation. mnist does not need backward computation. This network produces output accuracy This network produces output loss Network initialization done. Solver scaffolding done. Starting Optimization Solving Learning Rate Policy: step Iteration 0, Testing net (#0) Check failed: status == CUDNN_STATUS_SUCCESS (3 vs. 0) CUDNN_STATUS_BAD_PARAM
Yeah, well your Caffe build is still going to load cuDNN v5 even though both are installed.
I'll switch back over to my Ubuntu 14.04 machine and try to verify this ...
So, caffe needs cudnn4 but gets cudnn5 - can you give an advice, a workaround maybe, to make it run? Is it possible to convince caffe only to use cuda without cudnn - without recompiling from source?
@shinfo001 I installed the latest DIGITS and Caffe packages on Ubuntu 14.04 and successfully trained a model on both a 980 and a TitanX. So I can't reproduce your issue.
@JRGit4UE the NVcaffe v0.14.5 deb package is built against cuDNN v5 - it doesn't care whether you have v4 installed or not. Try it yourself and see:
$ ldd `which caffe` | grep cudnn
libcudnn.so.5 => /usr/lib/x86_64-linux-gnu/libcudnn.so.5 (0x00007f59d8d0c000)
@lukeyeager I have just reinstalled ubuntu 14.04 and have the same error on digits: Check failed: status == CUDNN_STATUS_SUCCESS (3 vs. 0) CUDNN_STATUS_BAD_PARAM
Here is everything I did to this point:
First I Installed cuda-toolkit 7.5 (deb)
sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb`
sudo apt-get update`
sudo apt-get install cuda`
restart At this point, the nvidia-smi shows my gtx980 with driver 352.63 Now I installed digits according to Ubuntu Install
CUDA_REPO_PKG=cuda-repo-ubuntu1404_7.5-18_amd64.deb &&
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/$CUDA_REPO_PKG &&
sudo dpkg -i $CUDA_REPO_PKG
ML_REPO_PKG=nvidia-machine-learning-repo_4.0-2_amd64.deb &&
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64/$ML_REPO_PKG &&
sudo dpkg -i $ML_REPO_PKG
apt-get update
apt-get install digits
At this point I can access http://localhost/
Then I followed the Getting Started guide, and I got the CUDNN_STATUS_BAD_PARAM error when the training begins.
Is there any difference between this and what you did to reproduce the issue? Am I missing something?
Seems like there's a problem with the 0.14.5-2+cuda7.5 caffe packages. As far as I know the 0.14.2-1 didn't have this problem.
I still haven't been able to reproduce the issue, but I'm escalating this internally.
@lukeyeager I managed to make it work by uninstalling everything and using cuda8.0 instead (driver 361.62)
@FBernuy Thanks for letting me know!
If you're still using the deb packages to install DIGITS, then Caffe is going to use CUDA 7.5 regardless of whether you've also installed CUDA 8.0 on your machine. It's possible that upgrading the driver would solve the problem, but unlikely.
To clarify - you didn't build Caffe from source after installing CUDA 8.0, right? You're still using the deb package installs of Caffe and DIGITS?
I had same problem at Ubuntu 14.04 with GTX960 and nvidia-352. This problem was solved by updating driver to nvidia-361. I think that cudnn5, GTX960, and nvidia-352 are incompatible.
http://askubuntu.com/questions/770092/is-it-a-good-idea-to-install-nvidia-361-drivers-in-14-04
@lukeyeager Yes, reinstalled using deb packages.
What I did to make it work:
- uninstall cudnn4 using "ubuntu software center" - @gheinrich as it is not used in digits 3.0
- uninstall cudnn5 using "ubuntu software center"
From terminal: sudo apt-get --purge remove digits sudo apt-get update
sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt-get update sudo apt-get install nvidia-361 sudo reboot
CUDA_REPO_PKG=cuda-repo-ubuntu1404_7.5-18_amd64.deb && wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/$CUDA_REPO_PKG && sudo dpkg -i $CUDA_REPO_PKG
ML_REPO_PKG=nvidia-machine-learning-repo_4.0-2_amd64.deb && wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64/$ML_REPO_PKG && sudo dpkg -i $ML_REPO_PKG
!!! Don't install cuda 7.5 as it removes libcuda1-361 (361.45.11-0ubuntu0~gpu14.04.1) … and switches back to driver version 352.93
I was not aware, that installing a cuda version changes the driver as well...
In the “system settings \ software & updates” “additional drivers” tab make sure, that driver 361.45.11 is selected.
btw, @lukeyeager there is driver version 364.19 appearing as well, can we also use that?
In terminal sudo apt-get install digits
then the MNIST example runs like a charm...