NCAR / ParallelIO

A high-level Parallel I/O Library for structured grid applications
Apache License 2.0
134 stars 52 forks source link

Be explicit about components needed when finding MPI #1907

Closed bartgol closed 2 years ago

bartgol commented 2 years ago

The reason behind this is subtle. If COMPONENTS is not specified, cmake will proceed to look for the corresponding component for each language that has a compiler enabled. Now, that's usually ok, but on GPU machines, this is causing issues, likely related with the fact that we have CUDA flags, but the MPI finding process is not picking up the kokkos compile launcher (which takes care of separating nvcc flags from host compiler flags), so the compiler check fails since CUDA flags are not recognized.

Beside that, I noticed that find_package (MPISERIAL ...) is always called specifying the needed components, so this mod also makes MPI-MPISERIAL more symmetrical. And also, it's always a good idea to specify the components you need, if they are known.

bartgol commented 2 years ago

Sorry, Github puts PRs in the upstream by default. My apologies.