AMReX-Fluids / AMReX-Hydro

AMReX-based hydro routines
https://amrex-fluids.github.io/amrex-hydro/docs_html
Other
11 stars 24 forks source link

CMake failure: set_target_properties called with incorrect number of arguments #88

Closed markstock closed 2 years ago

markstock commented 2 years ago

I built AMReX 22.04 in 2D double precision, CUDA and OpenMP but no MPI, on a Fedora 31 machine with GCC 9.3.1 and CUDA 11.2 - no problems.

Pulled the latest AMReX-Hydro today and tried to build against it. CMake 3.17.4 reports:

CMake Error at /opt/amrex/22.04-2d/Tools/CMake/AMReXTargetHelpers.cmake:126 (set_target_properties):
   set_target_properties called with incorrect number of arguments.
 Call Stack (most recent call first):
   CMakeLists.txt:105 (setup_target_for_cuda_compilation)

That line is

set_target_properties( ${_target}
      PROPERTIES
      CUDA_SEPARABLE_COMPILATION ${AMReX_GPU_RDC}      # This adds -dc
   )

I'll try with the latest AMReX.

Also, please note in the compilation guide that AMReX_PRECISION has to be DOUBLE for AMReX-Hydro to configure.

markstock commented 2 years ago

Using AMReX 22.06 fixed the CMake bug. If time allows, versioning AMReX-Hydro alongside AMReX would help potential users. Thanks!

etpalmer63 commented 2 years ago

Thanks for the feedback Mark and sorry about the trouble. I'll look into requiring a specific version of AMReX with later updates of AMReX-Hydro.

Erik