[CMake] FindMPI: finding openmpi libs and includes
Hicham Mouline
hicham at mouline.org
Wed Dec 1 03:23:16 EST 2010
You have this snippet in there:
set(_MPI_PREFIX_PATH)
if(WIN32)
list(APPEND _MPI_PREFIX_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..")
list(APPEND _MPI_PREFIX_PATH
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]")
endif()
foreach(SystemPrefixDir ${CMAKE_SYSTEM_PREFIX_PATH})
foreach(MpiPackageDir ${_MPI_PREFIX_PATH})
MESSAGE(STATUS "${SystemPrefixDir}/${MpiPackageDir}")
if(EXISTS ${SystemPrefixDir}/${MpiPackageDir})
list(APPEND _MPI_PREFIX_PATH "${SystemPrefixDir}/${MpiPackageDir}")
endif()
endforeach(MpiPackageDir)
endforeach(SystemPrefixDir)
For openmpi for e.g, a possible install path is c:\program
files\openmpi\bin, lib, include, share
Should _MPI_PREFIX_PATH include "openmpi" then?
_MPI_PREFIX_PATH is appended to inside the foreach loops, but is used at
the same time as the index of the iteration?
From: Dave Partyka [mailto:dave.partyka at kitware.com]
Sent: 30 November 2010 22:42
To: Hicham Mouline
Cc: CMake mailing list
Subject: Re: [CMake] FindMPI: finding openmpi libs and includes
It will search standard locations (/usr/include & /usr/lib) for the headers
and libs. Set MPI_LIBRARY and MPI_INCLUDE_PATH if it doesn't locate them for
you automatically. The FindMPI module does interrogate the mpicc compiler
for some of this information but I am not sure if that is the case on
Windows.
On Tue, Nov 30, 2010 at 5:26 PM, Hicham Mouline <hicham at mouline.org> wrote:
Hi,
I have built debug and release win32 and x64 openmpi libs for windows, and I
have them installed on linux x64.
How does FindMPI work for auto detecting If I don't set any MPI_ variable at
all?
Does it search for mpic++ in the %PATH% or $PATH?
What MPI_ variables is the user required to define?
regards,
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101201/7c1bebb8/attachment.htm>
More information about the CMake
mailing list