[CMake] CMake + MPI

Tim Gallagher tim.gallagher at gatech.edu
Tue Sep 8 11:41:08 EDT 2015


The only exception to that (which I am aware of) is if you are on a CRAY system where the MPI (and BLAS and LAPACK) are baked into the compiler wrappers (cc, ftn, etc). In those situations, you actually do not want to run find_package(MPI) or it will throw errors.

Tim

----- Original Message -----
From: "Andreas Naumann" <Andreas-Naumann at gmx.net>
To: cmake at cmake.org
Sent: Tuesday, September 8, 2015 8:07:38 AM
Subject: Re: [CMake] CMake + MPI

Hi Nico,

I just use find_package(MPI REQUIRED) and use the given 
MPI_CXX_LIBRARIES and MPI_CXX_INCLUDE_PATH.
Recent mpi wrappers should support support interspection.

Regards,
Andreas

Am 08.09.2015 um 13:01 schrieb Nico Schlömer:
> Hi everyone,
>
> When it comes to compiling and linking, the MPI world is quite a mess. 
> Sometimes, vendors make you link and include certain 
> libraries/directories, sometimes you are supposed to simply use a 
> compiler wrapper, often both.
>
> What's the recommended way of dealing with MPI in CMake? Do you 
> `find_package(MPI REQUIRED)` and set LINK_LIBRARIES and INCLUDE_DIRS? 
> Do you select a compiler wrapper from within the CMake file? From outside?
>
> Cheers,
> Nico
>
>

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


More information about the CMake mailing list