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

Compilation failure on pangea-3 if ENABLE_CUDA is OFF #3128

Open
Algiane opened this issue May 16, 2024 · 0 comments · May be fixed by #3129 or GEOS-DEV/thirdPartyLibs#264
Open

Compilation failure on pangea-3 if ENABLE_CUDA is OFF #3128

Algiane opened this issue May 16, 2024 · 0 comments · May be fixed by #3129 or GEOS-DEV/thirdPartyLibs#264
Labels
type: bug Something isn't working type: new A new issue has been created and requires attention

Comments

@Algiane
Copy link

Algiane commented May 16, 2024

Describe the bug
Configuring and compiling geos with the TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake host-config file and the -DENABLE_CUDA=OFF option fails.

As the cuda compilation is very slow, it is sometimes useful to be able to be able to quickly disable it without changing anything else in your configuration.

To Reproduce
Steps to reproduce the behavior:

  1. Log on pangea 3
  2. load the modules needed to build the TPls and GEOS ( 1) gcc/8.4.1 2) cuda/11.5.0 3) ompi/4.1.2 4) openblas/0.3.18 5) cmake/3.26.4)
  3. Configure and build the TPLs with TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake host-config file and the -DENABLE_CUDA=OFF option
  4. Configure and build Geos with the same arguments (the TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake host-config file and the -DENABLE_CUDA=OFF option)
  5. The Geos build fails due :
    • to the HYPRE solver setted to "CUDA" in the host-config file of the TPLs: the ENABLE_CUDA variable sould be tested and the setting of HYPRE to CUDA should be done only if ENABLE_CUDA is ON
    • to the CUDA::nvToolsExt added inconsistently in CMake (ENABLE_CUDA flag sometimes tested and sometimes not). As this module cannot work if ENABLE_CUDA is OFF, it makes sense (and would be easier for the user) to test the ENABLE_CUDA variable everywhere.

Expected behavior
As a user, I have tried to configure and build the project without looking at the host-config file and the exposed ENABLE_CUDA variable make me think that I could disable cuda with this single command line argument, which would be very convenient.

In fact it fails because:

  • dependencies to cuda are added by the host-config file of the TPLs without checking if cuda has been explicitely disabled
  • the nvtools cannot work without cuda but for now, the ENABLE_CUDA_NVTOOLSEXT has to be setted explicitely to OFF too.

I think that the cmake of the project should avoid failing combination of options. I will try to propose PRs accordingly.

Platform (please complete the following information):

  • Machine : Pangea
  • Compiler: gcc / cuda
  • GEOSX Version : develop branch (commit a1fec52)
  • host-config file: TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake

Additional context

  • -DENABLE_CUDA=OFF cmake option

Linked to : #3129, GEOS-DEV/thirdPartyLibs#264

@Algiane Algiane added type: bug Something isn't working type: new A new issue has been created and requires attention labels May 16, 2024
@Algiane Algiane changed the title Your Title Compilation failure on pangea-3 if ENABLE_CUDA is OFF May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: new A new issue has been created and requires attention
Projects
None yet
1 participant