Skip to content

CMAKE test_installation failure with GPU #3015

Open
@borjaMinano

Description

@borjaMinano

I got an error when trying to test installation after a normal compilation using CMAKE.
Running make test_installation I got several errors, all of them seem to be related to the following message:
In file included from /opt/amrex_3D/include/AMReX.H:6, from /opt/amrex_3D/include/AMReX_Array.H:5, from /opt/amrex_3D/include/AMReX_IntVect.H:8, from /opt/amrex_3D/include/AMReX_ParticleContainerBase.H:7, from /opt/amrex_3D/include/AMReX_Particles.H:4, from /opt/amrex_3D/include/AMReX_AmrParticles.H:5, from /home/bminano/amrex_22.11/Tests/Amr/Advection_AmrCore/Source/AmrCoreAdv.H:6, from /home/bminano/amrex_22.11/Tests/Amr/Advection_AmrCore/Source/AdvancePhiAllLevels.cpp:1: /opt/amrex_3D/include/AMReX.H:100:5: error: ‘__host__’ does not name a type 100 | AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
AMReX_Config.H seem to be correctly generated, AMREX_USE_CUDA and AMREX_USE_GPU are defined.

My CMAKE command is:
cmake -DAMReX_SPACEDIM=3 -DAMReX_GPU_BACKEND=CUDA -DAMReX_PARTICLES=YES -DAMReX_HDF5=YES -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/amrex_3D -DBUILD_SHARED_LIBS=ON -DAMReX_PROBINIT=NO -DAMReX_TINY_PROFILE=YES ..

I am using cuda 11.8 and g++ 11.3. Also failed in a machine with cuda 11.5 and g++ 8.3 machine.
In the last machine I could run examples and tutorials with GNU Make compilation. The problem seems to be related to CMAKE building system.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions