DIGITS icon indicating copy to clipboard operation
DIGITS copied to clipboard

Check failed: status == CUDNN_STATUS_SUCCESS (3 vs. 0) CUDNN_STATUS_BAD_PARAM

Open mongoose54 opened this issue 11 years ago • 21 comments

I have installed DIGITS 2.0RC using the webinstaller. I have installed CUDA 7.0.28. I am following the instructions to run MNIST dataset here: https://github.com/NVIDIA/DIGITS/blob/master/docs/GettingStarted.md#creating-a-dataset . When running LeNet network I get the following error:

Setting up mnist
Cannot create cuDNN handle. cuDNN won't be available.
Opened lmdb /home/alex/digits/digits/digits/jobs/20150901-134106-de89/train_db
Decoding Datum
output data size: 64,1,28,28
Top shape: 64 1 28 28 (50176)
Top shape: 64 (64)
Creating layer scale
Creating Layer scale
scale <- data
scale -> scale
Setting up scale
Cannot create cuDNN handle. cuDNN won't be available.
Top shape: 64 1 28 28 (50176)
Creating layer conv1
Creating Layer conv1
conv1 <- scale
conv1 -> conv1
Setting up conv1
Check failed: status == CUDNN_STATUS_SUCCESS (3 vs. 0)  CUDNN_STATUS_BAD_PARAM

I have seen others reporting about this issue but I have not seen an answer yet. Is it possible that CUDA has not been installed properly? How can verify that CUDNN is installed? Or is it perhaps some configuration I have to perform to the network before running? Thanks.

mongoose54 avatar Sep 01 '15 18:09 mongoose54

CUDA and cuDNN come with the web installer - there's no need to install them yourself. Look in digits-2.0/lib/. the runme.sh script should set your path to CUDA and cuDNN automatically (open it up and look if you like). Are you trying to do anything clever with your PATH?

lukeyeager avatar Sep 01 '15 18:09 lukeyeager

@lukeyeager So my runme.sh files contains the following:

#!/bin/bash

CAFFE_HOME=$(pwd)/caffe
CUDA_LIBS=$(pwd)/lib/cuda
BOOST_LIBS=$(pwd)/lib/boost
CNMEM_LIBS=$(pwd)/lib/cnmem
VENV_PATH=$(pwd)/venv

cd digits

CAFFE_HOME=$CAFFE_HOME LD_LIBRARY_PATH=$CUDA_LIBS:$BOOST_LIBS:$CNMEM_LIBS \
    $VENV_PATH/bin/python digits-devserver $@

And the libs folder contains the following folders: "boost", "cnmem" and "cuda". Inside "cuda" I can see the CuDNN libraries: "libcudnn.so", "libcudnn.so.7.0", "libcudnn.so.7.0.58".

mongoose54 avatar Sep 01 '15 18:09 mongoose54

@mongoose Yes, that looks correct. Can you tell me what LD_LIBRARY_PATH is set to on your machine? You must have some weird path setup that is affecting which library gets loaded.

$ echo $LD_LIBRARY_PATH
/usr/local/cuda/lib64

lukeyeager avatar Sep 01 '15 18:09 lukeyeager

Returns nothing. How can I fix this? Thanks

mongoose54 avatar Sep 01 '15 18:09 mongoose54

Ok so I fixed the library path problem by following instructions here: http://www.r-tutor.com/gpu-computing/cuda-installation/cuda7.0-ubuntu However the problem still persists. When I run ./runtests.sh I get the following output:

digits.webapp: INFO: Train Caffe Model task started.
digits.webapp: ERROR: Train Caffe Model: Cannot create cuDNN handle. cuDNN won't be available.
digits.webapp: ERROR: Train Caffe Model: Cannot create cuDNN handle. cuDNN won't be available.
digits.webapp: ERROR: Train Caffe Model: Cannot create cuDNN handle. cuDNN won't be available.
digits.webapp: ERROR: Train Caffe Model: Cannot create cuDNN handle. cuDNN won't be available.
digits.webapp: ERROR: Train Caffe Model: Cannot create cuDNN handle. cuDNN won't be available.
digits.webapp: ERROR: Train Caffe Model: Check failed: status == CUDNN_STATUS_SUCCESS (3 vs. 0)  CUDNN_STATUS_BAD_PARAM
digits.webapp: ERROR: Train Caffe Model task failed with error code -6

mongoose54 avatar Sep 01 '15 19:09 mongoose54

Can you check a few more things for me please?

  1. Driver version - nvidia-smi
  2. Caffe version - ls -l digits-2.0/caffe/build/lib/
  3. CUDA / cuDNN version - ls -l digits-2.0/lib/cuda/

lukeyeager avatar Sep 01 '15 19:09 lukeyeager

@lukeyeager Here is the information you requested:

  1. NVIDIA-SMI 346.82 Driver Version: 346.82
total 21060
-rw-r--r-- 1 alex alex 15663938 Jul 23 21:02 libcaffe-nv.a
lrwxrwxrwx 1 alex alex       16 Jul 23 21:02 libcaffe-nv.so -> libcaffe-nv.so.0
lrwxrwxrwx 1 alex alex       21 Jul 23 21:02 libcaffe-nv.so.0 -> libcaffe-nv.so.0.13.1
-rwxr-xr-x 1 alex alex  5898062 Jul 23 21:02 libcaffe-nv.so.0.13.1

total 128084
lrwxrwxrwx 1 alex alex       16 Jun 18 16:11 libcublas.so -> libcublas.so.7.0
lrwxrwxrwx 1 alex alex       19 Jun 18 16:11 libcublas.so.7.0 -> libcublas.so.7.0.28
-rwxr-xr-x 1 alex alex 31160168 Jun 18 16:11 libcublas.so.7.0.28
lrwxrwxrwx 1 alex alex       16 Jun 18 16:11 libcudart.so -> libcudart.so.7.0
lrwxrwxrwx 1 alex alex       19 Jun 18 16:11 libcudart.so.7.0 -> libcudart.so.7.0.28
-rwxr-xr-x 1 alex alex   377896 Jun 18 16:11 libcudart.so.7.0.28
lrwxrwxrwx 1 alex alex       15 Jul 19 23:46 libcudnn.so -> libcudnn.so.7.0
lrwxrwxrwx 1 alex alex       18 Jul 19 23:46 libcudnn.so.7.0 -> libcudnn.so.7.0.58
-rwxr-xr-x 1 alex alex 47865640 Jul 19 23:46 libcudnn.so.7.0.58
lrwxrwxrwx 1 alex alex       16 Jun 18 16:11 libcurand.so -> libcurand.so.7.0
lrwxrwxrwx 1 alex alex       19 Jun 18 16:11 libcurand.so.7.0 -> libcurand.so.7.0.28
-rwxr-xr-x 1 alex alex 51746464 Jun 18 16:11 libcurand.so.7.0.28

mongoose54 avatar Sep 02 '15 15:09 mongoose54

Thanks! That all looks OK so far ...

What GPUs do you have on your machine? (nvidia-smi will tell you that, too)

lukeyeager avatar Sep 02 '15 16:09 lukeyeager

Here is the output of nvidia-smi :

+------------------------------------------------------+                       
| NVIDIA-SMI 346.82     Driver Version: 346.82         |                       
|-------------------------------+----------------------+----------------------+
| 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 GT 630      Off  | 0000:03:00.0     N/A |                  N/A |
| 65%   39C    P0    N/A /  N/A |    173MiB /  2047MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0              C   Not Supported                                         |
+-----------------------------------------------------------------------------+

Side note: I am running DIGITS-2.0.0-RC. I am wondering if there is an issue with Caffe and DIGITS-2.0.0-RC.

mongoose54 avatar Sep 02 '15 16:09 mongoose54

Ah, there's your problem. The GeForce GT 630 is a Fermi card, with compute capability 2.1. https://en.wikipedia.org/wiki/CUDA#Supported_GPUs

Section 2.5 of the cuDNN v3 User Guide says:

2.5. Requirements cuDNN v3.0 supports NVIDIA GPUs of compute capability 3.0 and higher and requires an NVIDIA Driver compatible with CUDA Toolkit 7.0.

Not that I would expect you to have read that. I'll see if I can fix Caffe's error reporting or at least improve their documentation.

lukeyeager avatar Sep 02 '15 17:09 lukeyeager

I'll close this issue now as we have discovered the source of your problem. You have three options going forward:

  1. Run digits-devserver with the --config flag and select "N" for 'None` in the GPUs section - that should let you run in CPU-only mode.
  2. Build Caffe from source with CUDA support (but without cuDNN) - that might work, no promises (see here).
  3. Upgrade your graphics card.

lukeyeager avatar Sep 02 '15 17:09 lukeyeager

Hi, I seem to have this error, Im in OS X 10.10.5 and my GPU is the GeForce GT 750M

JPaulMora avatar Apr 16 '16 05:04 JPaulMora

@JPaulMora what versions do you have for cuDNN, CUDA toolkit, and CUDA driver?

lukeyeager avatar Apr 18 '16 20:04 lukeyeager

$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Thu_Sep_24_00:26:39_CDT_2015
Cuda compilation tools, release 7.5, V7.5.19

CuDNN v4

GPU Driver Version: 10.4.2 310.41.35f01 CUDA Driver Version: 7.5.26

JPaulMora avatar Apr 22 '16 04:04 JPaulMora

i have a GeForce 710M (compute capability 2.1). I had the same issue. Compiling nv-caffe without cnDNN works for me. Thanks for the suggestion.

anoopkatti avatar May 04 '16 13:05 anoopkatti

Yes, it's really a parameter setting issue, you could attempt to change the parameter value in your *.prototxt. I change new_length from 8 to 16 in my c3d_ucf101_train_test.prototxt , and solve this issue. Just for reference.

junmuzi avatar Sep 05 '16 15:09 junmuzi

Hi, I also get Check failed: status == CUDNN_STATUS_SUCCESS (3 vs. 0) CUDNN_STATUS_BAD_PARAM cuda 8.0; cudnn 5.0; GTX 960;

when I change batch_size from 1 to 32, it can run more time and also check failed。

Do you have any other ideal?

yuyadanyadan avatar Sep 09 '16 07:09 yuyadanyadan

@mongoose54 did you solve the problem? i have met the same problem ,and if you make it ,please tell me how to handle it .Thank you very much.

xuqintao avatar Jan 04 '17 11:01 xuqintao

my caffe is not the BVLC! Its code of CUDNN in caffe have been changed. Then I use the caffe of BVLC. It is OK!

在 2017-01-04 19:30:45,"xuqintao" [email protected] 写道:

@mongoose54 did you solve the problem? i have met the same problem ,and if you make it ,please tell me how to handle it .Thank you very much.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

yuyadanyadan avatar Jan 05 '17 01:01 yuyadanyadan

I also got this problem and it is just because my GPU is out of use, close the apps that are using GPU and make some memory for this, it can run.

CCChenfei avatar Mar 20 '17 10:03 CCChenfei