[CMake] FindMPI.cmake in 3.11.4

Burlen Loring burlen.loring at gmail.com
Mon Sep 17 18:17:51 EDT 2018


Hi Chuck,

I have a an install of mpi that has no compiler wrappers. I know the 
include dir and the list of libraries to use. How do I tell the new 
cmake module? Is it no longer supported to tell the module what to use 
for these?

Burlen

On 09/17/2018 06:46 AM, Chuck Atkins wrote:
> Hi Burlen
>
>     Of course I read the documentation.
>
>
> I certainly didn't mean for that to come off as an "rtfm", so my 
> appologies if it did, that wasn't my intent.
>
>     why did they MPI_C_LIBRARIES and MPI_C_INCLUDE_DIRS/PATH get
>     changed from cache variables to not chached variables? that seems
>     to be the cause of the issue.
>
>
> There was a completere-write of FindMPI from scratch to address a wide 
> range of issues with it.  In general many of the "old" behaviors were 
> in opposition to other established "best practices" so it was 
> re-written with many of these in mind.  As such, much of the old 
> behavior w.r.t. variable names may not have been preserved in an 
> attemnt to bring the behavior more inline with recommended current 
> CMake practices.  So in some scenarios it should be considdered a 
> breaking change.
>
>
>     Alas after trying various settings described there in, nothing
>     worked. my settings are ignored and erased.
>
>       Now how does one override the detection and tell it what to use
>     in the new module?
>
>
> There's several different scenarios to try to detect MPI and I believe 
> they happen in this order:
>
>  1. Using the mpicc compiler wrapper as your "regular compiler"
>       * libraries and includes should remain empty as nothing needs to
>         be added for MPI to work
>       * This is the case when using the CrayPE wrappers
>  2. Locating mpicc in your path and interrogating it
>       * Determined the set of includes and libraries to be added to
>         the regular compiler to make MPI work
>       * This is the typical behavior that get's used in *most* mpi
>         environments.
>  3. Falling back to manually searching for headers and libraries
>
> Can you describe your environment and scenario more specifically so I 
> can try to reproduce it?
>
> Thanks
> - Chuck
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180917/099f6fd3/attachment.html>


More information about the CMake mailing list