[CMake] FindMPI
Zaak Beekman
zbeekman at gmail.com
Thu Dec 1 00:31:21 EST 2016
OK, upon more careful reading of the documentation for FindMPI, and
realizing that I am using CMake 3.6 not 3.7 I have adjusted my approach to
be consistent with the documentation and your suggestions. I don't know if
the documentation actually needs expanding upon... I think I just failed to
fully comprehend it.
As far as enhancements to FindMPI go, It might be worthwhile to check if
FC, CC,CXX match any obvious MPI wrappers, and then set MPI_<lang>_compiler
and select the MPI version from there: If the user set the compiler
explicitly to an MPI wrapper, that's likely the MPI they intend to use....
If I find some time maybe I'll work up a pull request for this.
On Mon, Nov 28, 2016 at 10:22 AM Chuck Atkins <chuck.atkins at kitware.com>
wrote:
> Hi Zaak,
>
> Sorry for the first mail being so abrupt, I didn't mean to hit "send" so
> soon.
>
>
>
> I took a look at the FindMPI CMake module, and it seems as though you can
> set MPI_HOME to a list of directories to search.
>
>
> That's also another way of doing it, which would probably be easier than
> what I iniitially suggested; the former has just become my own habbit since
> MPI_HOME isn't always set. MPI_HOME is used as a hint to search for
> mpiexec. If mpiexec is found, it then uses it's location as a basis for
> locating the compiler wrappers.
>
> That being said, if using MPI through an environment module (as is the
> typical use case) then FindMPI should "just work" as the wrappers generally
> end up in the path when the appropriate MPI module is loaded. If you need
> to point to an entirely external MPI not part of your environment at all
> though, then using the MPI_HOME env var or MPI_<lang>_COMPILER CMake vars
> is the way to do it.
>
>
>
> Would KitWare accept a pull request or a patch that expands the
> documentation of FindMPI
>
>
> Of course :-). Expanding the "Usage" section in FindMPI to include using
> the MPI_HOME environment variable would be a good place for that.
>
>
>
> and/or adds some clearer additional features to the call signature (like
> HINTS and PATHS)?
>
>
> Could you clarify what you mean by this? To which call signature?
>
>
> - Chuck
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161201/85f291c6/attachment-0001.html>
More information about the CMake
mailing list