CEA-LIST / N2D2

N2D2 is an open source CAD framework for Deep Neural Network simulation and full DNN-based applications building.
Other
146 stars 36 forks source link

Could not find NVML during CMake on a Jetson Orin (iGPU) #121

Open Veccoy opened 1 year ago

Veccoy commented 1 year ago

Environment

Problem

While making cmake to build N2D2 :

CMake Deprecation Warning at CMakeLists.txt:20 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at cmake/cotire.cmake:40 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  CMakeLists.txt:182 (include)

-- cotire 1.8.0 loaded.
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /usr/local (found version "4.7.0")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found Gnuplot: /usr/bin/gnuplot (found version "5.2.8")
-- MongoDB not found.
-- Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)
-- CXX target n2d2_lib cotired without unity build.
CMake Warning (dev) at CMakeLists.txt:324 (find_package):
  Policy CMP0146 is not set: The FindCUDA module is removed.  Run "cmake
  --help-policy CMP0146" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found CUDA: /usr/local/cuda-11.4 (found version "11.4")
-- Found CuDNN: /usr/include  
-- CuDNN library status:
--  version: 8..
--  include path: /usr/include
--  libraries: /usr/lib/aarch64-linux-gnu/libcudnn.so
-- Autodetected CUDA architecture(s):  8.7
-- Could NOT find NVML (missing: NVML_LIBRARIES) (found version "11")
-- NVML package not found
-- Using third_party/pybind11.
CMake Error at CMakeLists.txt:147 (add_subdirectory):
  The source directory

    /home/.../N2D2-master/third_party/pybind11

  does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
  CMakeLists.txt:391 (add_n2d2_pybind)

-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring incomplete, errors occurred!

I think the problem comes from the integrated GPU (iGPU) used in the Jetson. There's no nvidia-smi command nor nvml library.

Is there a way to bypass this error ? For example by replacing nvml by jetson-stats to use equivalent monitoring tools for GPU, CPU, Mem, swap, Disk usage, Power, clocks, etc

vtemplier commented 1 year ago

Hi @Veccoy,

I think your problem comes from pybind11. N2D2 needs this module to compile its Python API and it seems it cannot find the CMakeLists.txt of this submodule.

Can you run this command

git submodule update --remote

and restart the compilation of N2D2 in your environment ?

Veccoy commented 1 year ago

Hi! Thank you for your answer @vtemplier

After git submodule update --remote the error is the same. I've copied PyBind11 github repo into the folder ./third_party/pybind11 and it's working