[CMake] FindMPI
Chuck Atkins
chuck.atkins at kitware.com
Mon Nov 28 10:21:54 EST 2016
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/20161128/293cc267/attachment.html>
More information about the CMake
mailing list