AMGX icon indicating copy to clipboard operation
AMGX copied to clipboard

Doesn't compile with CUDA 12.6.77 using conda environment

Open Maccy-Z opened this issue 1 year ago • 3 comments

Describe the issue

Doesn't compile with CUDA 12.6.77

Environment information:

  • OS: Ubuntu 24.10
  • Compiler version: gcc 14.2
  • CMake version: 3.30.3
  • CUDA used for AMGX compilation: CUDA 12.6.77
  • MPI version (if applicable):
  • AMGX version or commit hash 69e625e99b8788ac7b259c6b217ad4453cc69464

Configuration information

cmake ../

Compilation information

Issue information

cmake ../ runs fine, until it returns an error:

CMake Error at CMakeLists.txt:272 (target_link_libraries): Target "amgx" links to:

CUDA::nvToolsExt

but the target was not found. Possible reasons include:

  • There is a typo in the target name.
  • A find_package call is missing for an IMPORTED target.
  • An ALIAS target is missing.

CMake Error at CMakeLists.txt:273 (target_link_libraries): Target "amgxsh" links to:

CUDA::nvToolsExt

but the target was not found. Possible reasons include:

  • There is a typo in the target name.
  • A find_package call is missing for an IMPORTED target.
  • An ALIAS target is missing.

Additional context Compiling in Conda environment. Compiles fine when I install older CUDA 11.7. Doesn't work with the cuda version 12.6 from: conda install cuda -c nvidia

Im not too familar with cuda, but nvToolsExt seems to be modified in CUDA 12 to be header only and not linkable and changed to nvtx3:

https://gitlab.kitware.com/cmake/cmake/-/issues/22893

https://github.com/pytorch/pytorch/issues/116242

Maccy-Z avatar Oct 19 '24 22:10 Maccy-Z

Hi @Maccy-Z I see linked issues are all referring Windows, just wanted to confirm if you experienced this on Ubuntu. I can't repro it on Linux + CMake 3.20 + CUDA 12.6, it seems on linux CUDA has both old nvtx + lib and nvtx3, and old nvtx is being used.

marsaev avatar Oct 22 '24 16:10 marsaev

Yes this is on Ubuntu

However, Im using it in a conda env, is probably why then. The conda package only has the newer version and I don't have cuda installed on the main system.

Maccy-Z avatar Oct 28 '24 17:10 Maccy-Z

@Maccy-Z In general - we should support conda environment, so we should chase it down. Let me leave this issue open for future reference.

marsaev avatar Oct 28 '24 20:10 marsaev