[gmx-developers] Whether or not to specify MPI compiler wrapper for MPI builds

Mark Abraham mark.j.abraham at gmail.com
Fri Oct 23 16:41:36 CEST 2020


Hi,

I think the chief reason to discourage the use of wrapper compilers is that
they may depend on other things in the environment. CMake is built around
the assumption that things that were detected remain the same, in order
that it can compile, link, and depend on the result being immutable. If
mpicc would respond to an environment variable, then e.g. linking might now
be different and that would risk violating the assumptions CMake makes. In
turn, that will look like "GROMACS sometimes can't build" because users
often won't be aware of why their environment is different today (e.g. they
loaded a new module and now the former mpicc does a different thing).

So yes, it's the simplest approach in a sane world. But if FindMPI is
capable of getting the compilation and linking working with the underlying
compiler right, then that's better for GROMACS users. It's also better for
GROMACS developers in that something else that wants to be a compiler
wrapper can still work with MPI, to help drive a debugger, analysis tool,
etc.

Mark

On Thu, 22 Oct 2020 at 21:27, Eric Irrgang <ericirrgang at gmail.com> wrote:

> Hi Devs,
>
> Is there a reason not to encourage CMake configuration with e..g.
> `-DCMAKE_CXX_COMPILER=mpicxx`?
>
> The GROMACS install guide says "it is neither necessary nor recommended"
> but then gives this as the example syntax.
>
> https://gitlab.com/gromacs/gromacs/-/blob/release-2021/docs/install-guide/index.rst#L226
>
> It seems like providing the compiler wrapper to CMAKE_CXX_COMPILER would
> be the simplest and most robust way to get a self-consistent tool chain and
> to correctly hint the CMake FindMPI module.
>
> I'd like to get feedback so that I can proceed with
> https://gitlab.com/gromacs/gromacs/-/issues/3672 and related tasks, but
> it would be good to resolve
> https://gitlab.com/gromacs/gromacs/-/issues/3671 so that we can have less
> confusing documentation for the 2021 release.
>
> Thanks in advance for any insight.
>
> Cheers!
> Eric
> --
> Gromacs Developers mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * 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/20201023/72ba3047/attachment.html>


More information about the gromacs.org_gmx-developers mailing list