AMGX icon indicating copy to clipboard operation
AMGX copied to clipboard

Problems with Cmake compilation

Open holdpromise opened this issue 1 year ago • 2 comments

Describe the issue

Environment information:

  • OS: [e.g. Windows 11, ]
  • Compiler version: [vs 2022]
  • CMake version: [3.31]
  • CUDA used for AMGX compilation: [CUDA 12.4]
  • MPI version (if applicable): [unclear,vs 2022 comes with`]
  • AMGX version or commit hash [e.g. v2.3.0, ]

Configuration information PS D:\amgx\build> cmake .. -DCUDA_ARCH="60 70" CMake Warning: Ignoring extra path from command line:

-- Building for: Visual Studio 17 2022 -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631. -- The C compiler identification is MSVC 19.41.34123.0 -- The CXX compiler identification is MSVC 19.41.34123.0 -- The CUDA compiler identification is NVIDIA 12.4.99 with host compiler MSVC 19.41.34123.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - 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: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.4/bin/nvcc.exe - skipped -- Detecting CUDA compile features -- Detecting CUDA compile features - done -- Found OpenMP_C: -openmp (found version "2.0") -- Found OpenMP_CXX: -openmp (found version "2.0") CMake Error at D:/CMake/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233 (message): Could NOT find OpenMP_CUDA (missing: OpenMP_CUDA_FLAGS OpenMP_CUDA_LIB_NAMES) Call Stack (most recent call first): D:/CMake/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE) D:/CMake/share/cmake-3.31/Modules/FindOpenMP.cmake:616 (find_package_handle_standard_args) CMakeLists.txt:35 (find_package)

I used the above software to compile this, but kept coming up with the error missing: OpenMP_CUDA_FLAGS

OpenMP_CUDA_LIB_NAMES), I still can't find a way to solve it, someone can help me.

holdpromise avatar Oct 23 '24 17:10 holdpromise

I changed the contents of the txt file, only changed find_package(MPI REQUIRED) find_package(OpenMP REQUIRED), I don't think this is the key to the problem

holdpromise avatar Oct 23 '24 17:10 holdpromise

Hi, Dear author, may I ask if you have solved this problem? I have encountered the same problem as you

Yangshen-bot avatar Aug 07 '25 09:08 Yangshen-bot