[gmx-developers] toolchains and MPI interoperability

Eric Irrgang ericirrgang at gmail.com
Wed Aug 17 14:03:23 CEST 2022


Hi Devs.

I'm writing to ask for input on improving support for integrating gromacs libraries into external MPI-aware code.

Background: I'm trying to finish up the Python bindings to allow an MPI communicator to be passed to libgromacs (to be used instead of MPI_COMM_WORLD).

Here are some questions that need to be answered. If you have any input, please let me know.

If you prefer to log your responses in the issue tracking system, please see https://gitlab.com/gromacs/gromacs/-/issues/3777 and https://gitlab.com/gromacs/gromacs/-/issues/4447


Questions:

* What should we add to https://gitlab.com/gromacs/gromacs/-/blob/main/src/gromacs/gromacs-hints.in.cmake to help hint `find_package(MPI ...)`? (https://cmake.org/cmake/help/latest/module/FindMPI.html)

* If a user of a client project has difficulty determining the actual compiler path associated with the MPI compiler wrapper they are advised to use, how might we provide better feedback from our `gromacs_check_compiler()` CMake function? https://gitlab.com/gromacs/gromacs/-/blob/main/src/gromacs/gromacs-config.cmake.cmakein#L128


Additional background:

With https://gitlab.com/gromacs/gromacs/-/issues/3671, we resolved that the appropriate way to configure CMake is to provide the non-wrapper compilers to CMAKE_CXX_COMPILER and to provide the MPI-wrapper paths only to MPI_CXX_COMPILER (if necessary).

However, FindMPI only reports the compiler wrapper path by setting MPI_<lang>_COMPILER. It does not gain or report any additional insight on the path to the wrapped compiler, as far as I can tell. It _does_ find and use the appropriate "showme" option and does its best to confirm that the wrapped compiler and the CMAKE_<LANG>_COMPILER is that same or compatible, but it FindMPI.cmake does not return the MPI_COMPILE_CMDLINE that it calculates, and it may not have an absolute path to the compiler, anyway.

Best,
Eric


More information about the gromacs.org_gmx-developers mailing list