Install Error(Ubuntu) `make` cannot detect the cudnn but `cmake-gui` can do this
Posting rules
- Fill all the Your System Configuration section if you are facing an error or unexpected behavior. Some posts (e.g., feature requests) might not require it.
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Sun_Aug_15_21:14:11_PDT_2021
Cuda compilation tools, release 11.4, V11.4.120
Build cuda_11.4.r11.4/compiler.30300941_0
==>cat /usr/local/cuda/include/cudnn_version.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 8
#define CUDNN_MINOR 2
#define CUDNN_PATCHLEVEL 4
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#endif /* CUDNN_VERSION_H */
Issue Summary
Follow the Installation, cmake-gui can detect the updated CUDNN_INCLUDE_PATH and configure with success, but make cannot.
cmake-gui:
Building with CUDA.
CUDA detected: 11.4
Found cuDNN: ver. 8.2.4 found (include: /usr/local/cuda-11.4/include, library: /usr/local/cuda-11.4/lib64/libcudnn.so)
Added CUDA NVCC flags for: sm_86
Found cuDNN: ver. 8.2.4 found (include: /usr/local/cuda-11.4/include, library: /usr/local/cuda-11.4/lib64/libcudnn.so)
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.
Caffe has already been downloaded.
HEAD is now at 1807aada Added Ampere arch's (CUDA11)
Caffe will be built from source now.
Download the models.
Downloading BODY_25 model...
Model already exists.
Downloading body (COCO) model...
Model already exists.
Downloading body (MPI) model...
Model already exists.
Downloading face model...
Model already exists.
Downloading hand model...
Model already exists.
Models Downloaded.
Configuring done
Generating done
make -j12:
[ 62%] Performing configure step for 'openpose_lib'
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) at cmake/Misc.cmake:32 (set):
implicitly converting 'BOOLEAN' to 'STRING' type.
Call Stack (most recent call first):
CMakeLists.txt:25 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.54") found components: system thread filesystem
-- Found Threads: TRUE
-- Found GFlags: /usr/include
-- Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Found Glog: /usr/include
-- Found glog (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread (found version "3.6.1")
-- Found PROTOBUF Compiler: /usr/bin/protoc
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_cpp.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.4") found components: HL
-- CUDA detected: 11.4
-- Found cuDNN: ver. ??? found (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)
CMake Error at cmake/Cuda.cmake:262 (message):
cuDNN version >3 is required.
Call Stack (most recent call first):
cmake/Cuda.cmake:290 (detect_cuDNN)
cmake/Dependencies.cmake:85 (include)
CMakeLists.txt:49 (include)
-- Configuring incomplete, errors occurred!
Executed Command (if any)
Note: add --logging_level 0 --disable_multi_thread to get higher debug information.
OpenPose Output (if any)
Errors (if any)
Type of Issue
Select the topic(s) on your post, delete the rest:
- Compilation/installation error
- Execution error
- Help wanted
- Question
- Enhancement / offering possible extensions / pull request / etc
- Other (type your own type)
Fixed. There is also a CMakeList in the downloaded caffe directory, which should be modified manually.
Hi @xyyeah , I am having the same issue where cmake detects my cudnn but make does not. What do you mean by 'CMakeList in the downloaded caffe directory'? I cannot find any CMakeList under 'caffe'. Please guide me as to how I would fix this. Thank you Edit: I have found the caffe download under 3rdparty/caffe and found the CMakeList. Can you tell me what I need to modify to point it to my cudnn.h and libcudnn.so files?
@AlyanQ For me, the cmakelist locates $openpoe/build/caffe/src/openpose_lib-build
Thanks! I changed the directory location of CUDNN_INCLUDE and CUDNN_LIBRARY in openpose/build/caffe/src/openpose_lib-build/CMakeCache.txt to the correct location. The old error has been fixed but now I have some new errors to fix.
Let me know what you exactly changed in the cmakelist file to fix your issue.
-- General:
-- Version : 1.0.0
-- Git : unknown
-- System : Linux
-- C++ compiler : /usr/bin/c++
-- Release CXX flags : -O3 -DNDEBUG -fPIC -Wall -std=c++11 -Wno-sign-compare -Wno-uninitialized
-- Debug CXX flags : -g -fPIC -Wall -std=c++11 -Wno-sign-compare -Wno-uninitialized
-- Build type : Release
--
-- BUILD_SHARED_LIBS : ON
-- BUILD_python : OFF
-- BUILD_matlab : OFF
-- BUILD_docs : OFF
-- CPU_ONLY : OFF
-- USE_OPENCV : OFF
-- USE_LEVELDB : OFF
-- USE_LMDB : OFF
-- USE_NCCL : OFF
-- ALLOW_LMDB_NOLOCK : OFF
-- USE_HDF5 : ON
--
-- Dependencies:
-- BLAS : Yes (Atlas)
-- Boost : Yes (ver. 1.65)
-- glog : Yes
-- gflags : Yes
-- protobuf : Yes (ver. ..)
-- CUDA : Yes (ver. 11.1)
--
-- NVIDIA CUDA:
-- Target GPU(s) : Manual
-- GPU arch(s) : sm_86 compute_50
-- cuDNN : Yes (ver. 8.3.0)
--
-- Install:
-- Install path : /home/arash/Desktop/SMPLX/openpose/build/caffe`
Caffe is now picking up the correct cuDNN version but the wrong CUDA version.
` CUDA : Yes (ver. 11.1)`
My nvcc
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_Sep_13_19:13:29_PDT_2021
Cuda compilation tools, release 11.5, V11.5.50
Build cuda_11.5.r11.5/compiler.30411180_0
I've set the correct flags in the cmake-gui as well as in the CMakeCache.txt, but it is still using the wrong CUDA version
Thanks! I changed the directory location of CUDNN_INCLUDE and CUDNN_LIBRARY in openpose/build/caffe/src/openpose_lib-build/CMakeCache.txt to the correct location. The old error has been fixed but now I have some new errors to fix.
Hi @AlyanQ ,can you tell me how to change the directory location of CUDNN_INCLUDE and CUDNN_LIBRARY?