eschnett / MPItrampoline

A forwarding MPI implementation that can use any other MPI implementation via an MPI ABI
MIT License
44 stars 4 forks source link

Supporting `MPIX_Query_cuda_support()` #16

Closed ocaisa closed 2 years ago

ocaisa commented 2 years ago

While not part of the standard, MPIX_Query_cuda_support() is available in a number of MPI implementations (see https://github.com/pmodels/mpich/pull/4741). It's also being used by a number of applications (and hopefully that will grow, see my issue at https://github.com/lammps/lammps/issues/3140 which links back to the support in GROMACS). This would be a valuable inclusion in MPItrampoline since it would then be able to handle the runtime detection of CUDA support in the MPI implementation.

ocaisa commented 2 years ago

This is also an issue for MPIwrapper as to find the function in Open MPI you need to use mpi-ext.h

eschnett commented 2 years ago

Are you aware of a cmake module to auto-detect whether mpi-ext.h exists, and if so, whether MPIX_Query_cuda_support and friends exist? It seems there are MPI implementations which don't support this, and MPIwrapper will need to detect at compile time whether this feature is present.

MPItrampoline can obviously only offer run-time detection.

ocaisa commented 2 years ago

Afraid not, I only saw how they did it in https://gitlab.com/gromacs/gromacs/-/commit/ae95fd7004aa5f4fbf6685a315f35b2dd58fe436

ocaisa commented 2 years ago

Even just to be able to set the return value for that function via a CMake option to MPIwrapper would be enough for a first implementation (with a default return value of 0)

eschnett commented 2 years ago

See https://github.com/eschnett/MPIwrapper/pull/4. Currently waiting for an error in Github actions to resolve itself.

eschnett commented 2 years ago

Done.