2 # This module looks for MPI (Message Passing Interface) support
3 # it will define the following values
4 # MPI_INCLUDE_PATH = where mpi.h can be found
5 # MPI_LIBRARY = the library to link in (mpi mpich etc)
7 FIND_PATH(MPI_INCLUDE_PATH NAMES mpi.h
8 PATH_SUFFIXES mpi mpi/include
10 "$ENV{ProgramFiles}/MPICH/SDK/Include"
11 "$ENV{ProgramFiles}/MPICH2/include"
12 "C:/Program Files/MPICH/SDK/Include"
15 FIND_LIBRARY(MPI_LIBRARY
16 NAMES mpich2 mpi mpich mpich.rts
19 "$ENV{ProgramFiles}/MPICH/SDK/Lib"
20 "$ENV{ProgramFiles}/MPICH2/Lib"
21 "C:/Program Files/MPICH/SDK/Lib"
24 FIND_LIBRARY(MPI_EXTRA_LIBRARY
28 "$ENV{ProgramFiles}/MPICH/SDK/Lib"
29 "C:/Program Files/MPICH/SDK/Lib"
30 DOC "If a second mpi library is necessary, specify it here.")
32 # on BlueGene/L the MPI lib is named libmpich.rts.a, there also these additional libs are required
33 IF("${MPI_LIBRARY}" MATCHES "mpich.rts")
34 SET(MPI_EXTRA_LIBRARY msglayer.rts devices.rts rts.rts devices.rts CACHE STRING "Additional MPI libs" FORCE)
35 ENDIF("${MPI_LIBRARY}" MATCHES "mpich.rts")
37 INCLUDE(FindPackageHandleStandardArgs)
39 # handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if
40 # all listed variables are TRUE
41 FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPI DEFAULT_MSG MPI_LIBRARY MPI_INCLUDE_PATH)
43 MARK_AS_ADVANCED(MPI_INCLUDE_PATH MPI_LIBRARY MPI_EXTRA_LIBRARY)