<div dir="ltr">Hi,<div><br></div><div>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 &quot;GROMACS sometimes can&#39;t build&quot; because users often won&#39;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).</div><div><br></div><div>So yes, it&#39;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&#39;s better for GROMACS users. It&#39;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.</div><div><br></div><div>Mark</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 22 Oct 2020 at 21:27, Eric Irrgang &lt;<a href="mailto:ericirrgang@gmail.com">ericirrgang@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Devs,<br>
<br>
Is there a reason not to encourage CMake configuration with e..g. `-DCMAKE_CXX_COMPILER=mpicxx`?<br>
<br>
The GROMACS install guide says &quot;it is neither necessary nor recommended&quot; but then gives this as the example syntax.<br>
<a href="https://gitlab.com/gromacs/gromacs/-/blob/release-2021/docs/install-guide/index.rst#L226" rel="noreferrer" target="_blank">https://gitlab.com/gromacs/gromacs/-/blob/release-2021/docs/install-guide/index.rst#L226</a><br>
<br>
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.<br>
<br>
I&#39;d like to get feedback so that I can proceed with <a href="https://gitlab.com/gromacs/gromacs/-/issues/3672" rel="noreferrer" target="_blank">https://gitlab.com/gromacs/gromacs/-/issues/3672</a> and related tasks, but it would be good to resolve <a href="https://gitlab.com/gromacs/gromacs/-/issues/3671" rel="noreferrer" target="_blank">https://gitlab.com/gromacs/gromacs/-/issues/3671</a> so that we can have less confusing documentation for the 2021 release.<br>
<br>
Thanks in advance for any insight.<br>
<br>
Cheers!<br>
Eric<br>
-- <br>
Gromacs Developers mailing list<br>
<br>
* Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List</a> before posting!<br>
<br>
* Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" rel="noreferrer" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
* For (un)subscribe requests visit<br>
<a href="https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers" rel="noreferrer" target="_blank">https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers</a> or send a mail to <a href="mailto:gmx-developers-request@gromacs.org" target="_blank">gmx-developers-request@gromacs.org</a>.<br>
</blockquote></div>