Skip to content

Conversation

@mjschmidt271
Copy link
Contributor

This removes the find(cuda_toolkit) call from cmake/haero.cmake.in that was failing and crashing builds in the AT2 container.

@odiazib Was this explicitly required for your pm-gpu builds? Would you mind running a quick test from this branch? I haven't run on PM for a while so I haven't gotten my environment solved yet

Similarly to the PR in Skywalker, this also adds a tiny fix for a cmake dev warning about project() and enable_language()

@jeff-cohere
Copy link
Collaborator

Unfortunately that find(CUDAToolkit) line is what we added yesterday to fix the Kokkos CUDA-related linking errors on our local computers and on Perlmutter. Can you paste a link to the failing AT2 stuff here?

@odiazib
Copy link
Collaborator

odiazib commented Apr 24, 2025

Unfortunately that find(CUDAToolkit) line is what we added yesterday to fix the Kokkos CUDA-related linking errors on our local computers and on Perlmutter. Can you paste a link to the failing AT2 stuff here?

-- Configuring with build type: Debug
-- Found CUDAToolkit: /spack-installs/cuda/12.1.1/gcc/12.3.0/base/n7arh6k/targets/x86_64-linux/include (found version "12.1.105")
CMake Error at /spack-installs/cmake/3.30.5/gcc/12.3.0/base/ylogtgu/share/cmake-3.30/Modules/FindThreads.cmake:66 (message):
  FindThreads only works if either C or CXX language is enabled
Call Stack (most recent call first):
  /spack-installs/cmake/3.30.5/gcc/12.3.0/base/ylogtgu/share/cmake-3.30/Modules/FindCUDAToolkit.cmake:1185 (find_package)
  haero_install/share/haero.cmake:69 (find_package)
  CMakeLists.txt:13 (include)

@odiazib
Copy link
Collaborator

odiazib commented Apr 24, 2025

@jeff-cohere @mjschmidt271 on pm-gpu, we only need to add cuda to HAERO_LIBRARIES.

@jeff-cohere
Copy link
Collaborator

Ah, okay! Thanks @odiazib . I think this means that the include(haero) line in the CMakeLists.txt file in mam4xx has to be moved below the enable_language(CXX) line in that same file. Worth a shot? This might require shuffling things around a bit.

@jeff-cohere
Copy link
Collaborator

And, of course, if we don't need the offending line, that's even easier. :-)

@mjschmidt271
Copy link
Contributor Author

Thank you for the feedback!

To recap, @odiazib, does this work without cuda-toolkit on pm-gpu? From you comment above, it sounds like maybe the line set(HAERO_LIBRARIES @HAERO_LIBRARIES@;kokkos;cuda;m) is sufficient. Is that correct?

@odiazib
Copy link
Collaborator

odiazib commented Apr 24, 2025

Thank you for the feedback!

To recap, @odiazib, does this work without cuda-toolkit on pm-gpu? From you comment above, it sounds like maybe the line set(HAERO_LIBRARIES @HAERO_LIBRARIES@;kokkos;cuda;m) is sufficient. Is that correct?

Yes, we only need set(HAERO_LIBRARIES @HAERO_LIBRARIES@;kokkos;cuda;m)

@mjschmidt271 mjschmidt271 merged commit 02a4a4c into main Apr 24, 2025
5 checks passed
@mjschmidt271 mjschmidt271 deleted the mjs/f/cuda-toolkit-rm branch April 24, 2025 23:06
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

Successfully merging this pull request may close these issues.

4 participants