caffe2 icon indicating copy to clipboard operation
caffe2 copied to clipboard

Could NOT find CUDA: Found unsuitable version "9.1", but required is exact

Open apiszcz opened this issue 7 years ago • 14 comments

If this is a build issue, please fill out the template below.

System information

  • Operating system: Ubuntu 16.04
  • Compiler version: 5.4
  • CMake version: 3.10.2
  • CMake arguments:
  • Relevant libraries/versions (e.g. CUDA): 9.1

CMake summary output

CMake Warning at cmake/public/gflags.cmake:2 (find_package): By not providing "Findgflags.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "gflags", but CMake did not find one.

Could not find a package configuration file provided by "gflags" with any of the following names:

gflagsConfig.cmake
gflags-config.cmake

Add the installation prefix of "gflags" to CMAKE_PREFIX_PATH or set "gflags_DIR" to a directory containing one of the above files. If "gflags" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): cmake/Dependencies.cmake:87 (include) CMakeLists.txt:81 (include)

-- Cannot find gflags with config files. Using legacy find.

apiszcz avatar Jan 28 '18 20:01 apiszcz

This isn't an error yet. cmake tries to find gflags in several ways, and this is warning you that the first way failed. Your last line of output is cmake falling back to another way to find gflags.

If you encountered an error later in the build then please reopen this issue and paste the error you get, along with cmake output (should be a two column list of settings with lines like USE_GFLAGS : ON)

pjh5 avatar Jan 29 '18 15:01 pjh5

cmake halts with configuring incomplete, errors occurred!

CMake Error at /usr/local/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find CUDA: Found unsuitable version "9.1", but required is exact version "8.0" (found /usr/local/cuda) Call Stack (most recent call first): /usr/local/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:376 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake-3.10/Modules/FindCUDA.cmake:1080 (find_package_handle_standard_args) /usr/local/share/OpenCV/OpenCVConfig.cmake:45 (find_package) /usr/local/share/OpenCV/OpenCVConfig.cmake:242 (find_host_package) cmake/Dependencies.cmake:213 (find_package) CMakeLists.txt:88 (include)

-- Configuring incomplete, errors occurred!

apiszcz avatar Feb 04 '18 11:02 apiszcz

Ah I see. Looks like this is a CUDA error; your gflags is fine (gflags is recommended but no required to use Caffe2).

Can you share what version of CUDA you have installed and where it is installed?

I'm not sure why it's looking exactly for version 8. Are you installing with Anaconda? Are you on the most up-to-date code?

pjh5 avatar Feb 04 '18 19:02 pjh5

Yes, CUDA version is in first message of this post, 9.1, it is installed at /usr/local/cuda-9.1 and linked to /usr/local/cuda per the installer.

I am not using Anaconda.

The build steps were followed using the recursive git pull from this morning, 'latest'==Yes.

Thank you.

https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile

apiszcz avatar Feb 04 '18 19:02 apiszcz

Did you follow these additional steps for setting up your GPU? If so, did you run these commands exactly? These installation instructions are hardcoded to CUDA 8, so you would have to change them to handle CUDA 9.1

Can you share your entire cmake output? Delete the build folder (by default it's caffe2/build) and then run this from your root caffe2 folder mkdir build && cd build && cmake ..

pjh5 avatar Feb 05 '18 17:02 pjh5

CMakeError.log CMakeOutput.log cuda.txt cudnn.txt

  1. No, the first time I installed from the NVIDIA binary.
  2. I followed the attached steps and compiled, installed and rebooted.
  3. cmake output attached.
  4. The failure message is the same, Could NOT find CUDA: Found unsuitable version "9.1", but required version is "8.0". Most likely something is incorrect in my config/environment.

apiszcz avatar Feb 05 '18 18:02 apiszcz

You have downloaded the cuDNN library that is only compatible with CUDA 8. There are different cuDNN libraries for every CUDA version. It should be located under the " Download cuDNN v7.0.5 (Dec 11, 2017), for CUDA 9.1 " section of https://developer.nvidia.com/rdp/cudnn-download

The cuDNN binary you installed is called "cudnn-8.0-linux-x64-v5.1.tgz ", but the one you should be using is called "cudnn-9.1-linux-x64-v7.tgz "

pjh5 avatar Feb 05 '18 19:02 pjh5

cudnn-9.1-linux-x64-v7.tgz the .txt file was not updated.

Download 7.0.5 for Linux https://developer.nvidia.com/rdp/cudnn-download sudo tar -xzf cudnn-9.1-linux-x64-v7.tgz -C /usr/local rm cudnn-9.1-linux-x64-v7.tgz && sudo ldconfig

||/ Name Version Architecture Description +++-==============================-====================-====================-================================================================= ii cuda 9.1.85-1 amd64 CUDA meta-package

$ nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2017 NVIDIA Corporation Built on Fri_Nov__3_21:07:56_CDT_2017 Cuda compilation tools, release 9.1, V9.1.85

$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 7 
#define CUDNN_MINOR 0 
#define CUDNN_PATCHLEVEL 5
--
#define CUDNN_VERSION    (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#include "driver_types.h"

apiszcz avatar Feb 05 '18 19:02 apiszcz

Looking at your output again, it looks like this requirement on CUDA 8.0 might be coming from OpenCV. Can you give your OpenCV version and how it was installed?

pjh5 avatar Feb 07 '18 18:02 pjh5

Are you able to compile with CUDA 9.1? I am unable to.

yxchng avatar Apr 21 '18 06:04 yxchng

not on windows

On Sat, Apr 21, 2018 at 2:58 AM, yxchng [email protected] wrote:

Are you able to compile with CUDA 9.1? I am unable to.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/caffe2/caffe2/issues/1829#issuecomment-383273109, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXVTQvWXnz6bsdyjMfm6F3KRlkKsyNqks5tqtiigaJpZM4Rv2G_ .

apiszcz avatar Apr 21 '18 09:04 apiszcz

I am facing the same problem, are you solve it? @apiszcz

chenyiyong1990 avatar May 09 '18 14:05 chenyiyong1990

Use 9.0

On Wed, May 9, 2018, 10:17 AM ianchan1990 [email protected] wrote:

I am facing the same problem, are you solve it? @apiszcz https://github.com/apiszcz

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/caffe2/caffe2/issues/1829#issuecomment-387753837, or mute the thread https://github.com/notifications/unsubscribe-auth/ABXVTWuMBdyTNVJfjUNEn76Esl0QUYaJks5twvpfgaJpZM4Rv2G_ .

apiszcz avatar May 09 '18 16:05 apiszcz

I encountered this issue and the fix was to install OpenCV again. I am using Anaconda so the command was simply conda install opencv.

varunagrawal avatar Sep 04 '18 18:09 varunagrawal