Skip to content

Conversation

@mtaillefumier
Copy link

The detection of mpi can fail when cray-mpich is installed with cuda enabled.

gtl is needed even at runtime
cuda and rocm are needed at runtime
libstdc++.so is missing on daint but present on beverin
@bcumming
Copy link
Member

How does making CUDA a runtime dependency instead of link time help with detection of MPI?

Is there an example of why this matters (I imagine that there are some applications that want to find nvcc in PATH to enable GPU+MPI support, or something similarly annoying)

@mtaillefumier
Copy link
Author

The problem is not MPI per say but the fact that the mpi detection fails because the cuda runtime library is not found (related to the gtl library). I might be inclined to close my own PR because it is not really a good solution.

@bcumming
Copy link
Member

bcumming commented Aug 19, 2025

I see: the configure/cmake phase for an application runs some "compile an MPI application" test that fails?

edit: Thinking about this some more, the error might be elsewhere, because we link CUDA against GTL using RPATH, so it should be found.

Can you provide the compilation command and it's output, for me to look into further.

bcumming pushed a commit that referenced this pull request Aug 27, 2025
In the migration to spack 1.0 with #30 we inadvertently switch from
using spack compiler wrappers (with all their support for correctly
setting build flags) to using the "plain" regular compiler.

This ended up with build problems (see
spack/spack-packages#1193) because not using the
spack compiler wrapper means not using `SPACK_STORE_*` variables that
contains information about include/libs of all dependencies. This was
more damaging for some build systems than others, but it might be that
this triggered also subtle problems (possibly #51?).
@bcumming
Copy link
Member

@mtaillefumier : could you please check the latest version of main?

#57 introduced a key fix for cray-mpich compiler integration which might fix your problem.

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.

2 participants