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 test_installation failure with GPU #3015

Open
borjaMinano opened this issue Nov 4, 2022 · 1 comment
Open

CMAKE test_installation failure with GPU #3015

borjaMinano opened this issue Nov 4, 2022 · 1 comment
Assignees

Comments

@borjaMinano
Copy link

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.

@WeiqunZhang
Copy link
Member

I think the installation is probably fine. The issue is the test_install target does not work for a CUDA build.

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

No branches or pull requests

3 participants