Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake configure failure for CUDA build on Polaris #823

Open
wyphan opened this issue Jul 5, 2024 · 1 comment
Open

CMake configure failure for CUDA build on Polaris #823

wyphan opened this issue Jul 5, 2024 · 1 comment

Comments

@wyphan
Copy link

wyphan commented Jul 5, 2024

On the latest development branch (commit cd601a2), 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 ..
@baperry2
Copy link
Contributor

baperry2 commented Jul 11, 2024

To enable CUDA with cmake, use cmake -DPELE_ENABLE_CUDA=ON .. rather than cmake -DENABLE_CUDA=ON ...

However, for most use cases, it may be more convenient to build with GNU Make rather than cmake: https://github.com/AMReX-Combustion/PeleC?tab=readme-ov-file#getting-started

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants