Hi,
I encountered an issue about the "cuDNN not found".
When I installed the openpose, I followed the instructions.
“ sudo ubuntu/install_cuda.sh
sudo ubuntu/install_cudnn.sh
sudo bash ./ubuntu/install_cmake.sh“
all these steps are successful.
but when I cmake the project, I got the below errors.
ubuntu_version="$(lsb_release -r)"
CUDNN_URL="http://developer.download.nvidia.com/compute/redist/cudnn/v5.1/cudnn-8.0-linux-x64-v5.1.tgz"
wget -c ${CUDNN_URL}
sudo tar -xzf cudnn-8.0-linux-x64-v5.1.tgz -C /usr/local
rm cudnn-8.0-linux-x64-v5.1.tgz && sudo ldconfig
CMake Error at CMakeLists.txt:279 (message):
Install cuDNN using the above commands. or turn off cuDNN by setting
USE_CUDNN to OFF.
-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/openpose/CMakeFiles/CMakeOutput.log".
See also "/home/ubuntu/openpose/CMakeFiles/CMakeError.log".
But the cuDNN is already there, which is under the /usr/local/cuda path.
I also added the
"export CUDNN_INCLUDE_DIR=/usr/local/cuda/include
export CUDNN_LIBRARY=/usr/local/cuda/lib64/libcudnn.so"
to the .bashsrc file and source it.
But still doesn't work.
Regards,
CN
Instead of exporting the variables, have you tried using cmake-gui or directly in the cmake command (-DCUDNN_....)? Just to make sure
Yes, I also tried below command
cmake -DCUDNN_INCLUDE_DIR=/usr/local/cuda/include -DCUDNN_LIBRARY=/usr/local/cuda/lib64/libcudnn.so ./CMakeLists.txt
Still had same exception.
Silly question but did you confirm that cudnn is there? Can you paste the output of ls -l /usr/local/cuda/lib64/libcudnn* ?
Hi,
below is the output:
lrwxrwxrwx 1 ubuntu users 13 Nov 7 2016 /usr/local/cuda/lib64/libcudnn.so -> libcudnn.so.5
lrwxrwxrwx 1 ubuntu users 18 Nov 7 2016 /usr/local/cuda/lib64/libcudnn.so.5 -> libcudnn.so.5.1.10
-rwxr-xr-x 1 ubuntu users 84163560 Nov 7 2016 /usr/local/cuda/lib64/libcudnn.so.5.1.10
-rw-r--r-- 1 ubuntu users 70364814 Nov 7 2016 /usr/local/cuda/lib64/libcudnn_static.a
I encountered this exact issue today. Workaround to solve it that worked for me was to manually edit cmake/Modules/FindCuDNN.cmake with the include and library paths:
find_path(CUDNN_INCLUDE cudnn.h
PATHS ${CUDNN_ROOT} $ENV{CUDNN_ROOT} ${CUDA_TOOLKIT_INCLUDE} /usr/local/cuda/include
DOC "Path to cuDNN include directory." )
find_library(CUDNN_LIBRARY NAMES ${CUDNN_LIB_NAME}
PATHS ${CUDNN_ROOT} $ENV{CUDNN_ROOT} ${CUDNN_INCLUDE} ${__libpath_hist} ${__libpath_hist}/../lib /usr/local/cuda/lib64
DOC "Path to cuDNN library.")
Thanks for your reply, I solved my solution. but when I cmake it successfully, my "build" file is still empty. Below is the info after I cmake.
-- GCC detected, adding compile flags
-- Building with CUDA.
-- CUDA detected: 8.0
-- Added CUDA NVCC flags for: sm_30
-- Found cuDNN: ver. 5.1.10 found (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64)
-- Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Found glog (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
-- Caffe will be downloaded from source now. NOTE: This process might take several minutes depending
on your internet connection.
Submodule '3rdparty/caffe' (https://github.com/CMU-Perceptual-Computing-Lab/caffe.git) registered for path '../3rdparty/caffe'
Cloning into '3rdparty/caffe'...
Submodule path '../3rdparty/caffe': checked out '569352cc8e6a3ce8e8b03c12c975779235522f19'
Previous HEAD position was 569352c... Merge https://github.com/BVLC/caffe
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
-- Caffe will be built from source now.
-- Download the models.
-- Downloading body (COCO) model...
-- NOTE: This process might take several minutes depending on your internet connection.
-- Not downloading body (MPI) model
-- Downloading face model...
-- NOTE: This process might take several minutes depending on your internet connection.
-- Downloading hand model...
-- NOTE: This process might take several minutes depending on your internet connection.
-- Models Downloaded.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/openpose
But it's empty in my build file
good
Most helpful comment
I encountered this exact issue today. Workaround to solve it that worked for me was to manually edit cmake/Modules/FindCuDNN.cmake with the include and library paths: