[gmx-developers] toolchains and MPI interoperability
Joe Jordan
e.jjordan12 at gmail.com
Fri Aug 19 10:30:48 CEST 2022
HI Eric,
As to the first question, do we have any evidence that the information we
get from FindMPI.cmake is insufficient for our purposes? My default
position would be that we should change our cmake to be more in line with
standard usage rather than try to warp the standard usage to fit our legacy
approach.
Since MPI_COMM_WORLD is no longer directly exposed, it might be the case
that the answer to your second question involves making utility module an
OBJECT so that MPI can be linked privately. Then we could just expose an
API call that gives the MPI version/compiler info for the utility module. I
am a bit out of my depth here, so let me know if this solution is way off
base.
Joe
On Wed, Aug 17, 2022 at 2:03 PM Eric Irrgang <ericirrgang at gmail.com> wrote:
> 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
> --
> Gromacs Developers mailing list
>
> * Please search the archive at https://www.gromacs.org/gmx-devel.html
> before posting!
>
> * Can't post? Read https://www.gromacs.org/gmx-devel.html
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
> or send a mail to gmx-developers-request at gromacs.org.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20220819/c2cb9404/attachment.html>
More information about the gromacs.org_gmx-developers
mailing list