MantisBT - CMake
View Issue Details
0013478CMakeCMakepublic2012-08-16 15:232016-06-10 14:31
Max Klimov 
Kitware Robot 
normalminoralways
closedmoved 
Windows7
CMake 2.8.9 
 
0013478: FindMPI doesn't find openMPI properly
find_package(MPI ...) doesn't define all necessary variables correctly with openMPI-1.6 and older on windows7:
- MPI_{LANG}_INCLUDE_PATH contains ';' instead of ' '(spaces), for example: "C:\Program;Files;(x86)\OpenMPI_v1.6-x64/include". But this isn't all, to fix this variable i must add ';' to the front and to the back of string (for this working result: ;"C:\Program Files (x86)\OpenMPI_v1.6-x64/include"; ) .
- MPI_LIBRARY and MPI_EXTRA_LIBRARY aren't found automatically.

OpenMPI bin directory was added to environment. Command "mpicxx --showme" has output:
"cl.exe /I"C:\Program Files (x86)\OpenMPI_v1.6-x64/include" /TP /EHsc /DOMPI_IMPORTS /DOPAL_IMPORTS /DORTE_IMPORTS /link /LIBPATH:"C:\Program Files (x86)\OpenMPI_v1.6-x64/lib" libmpi_cxx.lib libmpi.lib libopen-pal.lib libopen-rte.lib advapi32.lib Ws2_32.lib shlwapi.lib"

Other commands such as "mpicxx --showme:incdirs" have correct output too.
1. Install OpenMPI-1.6 (x86 or x64)
2. add find_package(MPI REQUIRED) to CMakeLists.txt
3. check MPI block of variables in cache
No tags attached.
patch update_openmpi_win_find.patch (4,324) 2013-06-17 01:59
https://public.kitware.com/Bug/file/4794/update_openmpi_win_find.patch
Issue History
2012-08-16 15:23Max KlimovNew Issue
2012-08-17 08:54Brad KingNote Added: 0030689
2012-08-17 08:54Brad KingStatusnew => backlog
2013-06-17 01:59Max KlimovFile Added: update_openmpi_win_find.patch
2016-06-10 14:28Kitware RobotNote Added: 0042106
2016-06-10 14:28Kitware RobotStatusbacklog => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:28Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0030689)
Brad King   
2012-08-17 08:54   
Moving to backlog because FindMPI has no module maintainer:

 http://www.cmake.org/Wiki/CMake:Module_Maintainers [^]

If anyone wants to look at fixing this the problem is probably here:

 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindMPI.cmake;hb=v2.8.9#l291 [^]

where the module parses the command line from the showme. The regular expressions used may not be working in this case. Once could use the separate_arguments command instead:

 http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:separate_arguments [^]

with either the UNIX_COMMAND or WINDOWS_COMMAND option.
(0042106)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.