PeleC icon indicating copy to clipboard operation
PeleC copied to clipboard

CMake configure failure for CUDA build on Polaris

Open wyphan opened this issue 7 months ago • 1 comments

On the latest development branch (commit cd601a2b4b92118d659fd11ca90a4775e24ff707), configuring a PeleC build using CMake with CUDA enabled fails due to a build target name clash between AMReX and SUNDIALS. This happens regardless of compiler toolchain (tested both NVHPC and GCC, with and without Cray wrapper) and CUDA toolkit version.

CMake Error at Submodules/PelePhysics/Submodules/sundials/cmake/SundialsSetupTesting.cmake:167 (add_custom_target):
  add_custom_target cannot create target "test_install" because another
  target with the same name already exists.  The existing target is a custom
  target created in source directory
  "/home/wyphan/work/PeleC/Submodules/PelePhysics/Submodules/amrex".  See
  documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  Submodules/PelePhysics/Submodules/sundials/CMakeLists.txt:210 (include)

Minimal reproducer:

module reset
git clone --recursive https://github.com/AMReX-Combustion/PeleC.git
mkdir -p PeleC/build && cd PeleC/build
cmake -DENABLE_CUDA=ON ..

wyphan avatar Jul 05 '24 16:07 wyphan