<div dir="ltr">I downloaded and installed MS-MPI from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=44990">http://www.microsoft.com/en-us/download/details.aspx?id=44990</a><div><br></div><div>This implementation does not work with FindMPI.cmake.</div><div><br></div><div>The includes and libs are found in:</div><div>C:/Program Files (x86)/Microsoft SDKs/MPI/<br></div><div>and mpiexec.exe is in: C:/Program Files/Microsoft MPI/Bin/</div><div><br></div><div>I had to do the following changes to get it working. Perhaps you would like to edit FIndMPI.cmake to incorporate these changes:</div><div>----------</div><div><div># Require MPI for this project:</div><div>if(WIN32)</div><div>  #This is for finding MS-MPI.</div><div>  #set(_MPI_PREFIX_PATH)</div><div>  #list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;Path]/..")</div><div>  set(MPIEXEC "C:/Program Files/Microsoft MPI/Bin/mpiexec.exe")</div><div>  # For building MPI programs the selected Visual Studio compiler is used, namely cl.exe.</div><div>  # So there is no need to set a specific MPI compiler.</div><div>  #set(MPI_CXX_COMPILER "${CMAKE_CXX_COMPILER}")</div><div>  set(MPI_CXX_INCLUDE_PATH "C:/Program Files (x86)/Microsoft SDKs/MPI/Include")</div><div>  # Make sure the correct libraries (64-bit or 32-bit) are selected.</div><div>  # Decide between 32-bit and 64-bit libraries for Microsoft's MPI</div><div>  if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)</div><div>    set(MS_MPI_ARCH_DIR x64)</div><div>  else()</div><div>    set(MS_MPI_ARCH_DIR x86)</div><div>  endif()</div><div>  set(MPI_CXX_LIBRARIES "C:/Program Files (x86)/Microsoft SDKs/MPI/Lib/${MS_MPI_ARCH_DIR}/msmpi.lib")</div><div>  set(MPI_C_INCLUDE_PATH "${MPI_CXX_INCLUDE_PATH}")</div><div>  set(MPI_C_LIBRARIES "{${MPI_CXX_LIBRARIES}")</div><div>  set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.")</div><div>else()</div><div>    find_package(MPI REQUIRED)</div><div>endif()</div><div>--------</div><div>Some of this is taken from FindMPI.cmake.</div><div><br></div><div>Attached is a zipped up file of the working CMakeLists.txt file and a test file for you.</div><div><br></div><div>I looked at FindMPI.cmake but I think you guys are better placed to make the changes.</div><div><br></div><div>Also in the case of FindMPI.cmake, you will need to fix the following warning message:</div><div><br></div><div><span style="color:rgb(255,0,0)">CMake Warning (dev) at C:/Program Files (x86)/CMake/share/cmake-3.1/Modules/FindMPI.cmake:163 (if):<br>  Policy CMP0054 is not set: Only interpret if() arguments as variables or<br>  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy<br>  details.  Use the cmake_policy command to set the policy and suppress this<br>  warning.<br><br>  Quoted variables like "MSVC" will no longer be dereferenced when the policy<br>  is set to NEW.  Since the policy is not set the OLD behavior will be used.<br>Call Stack (most recent call first):<br>  CMakeLists.txt:5 (find_package)<br>This warning is for project developers.  Use -Wno-dev to suppress it.</span><span style="color:rgb(255,0,0)">CMake Warning (dev) at C:/Program Files (x86)/CMake/share/cmake-3.1/Modules/FindMPI.cmake:163 (if):</span><br></div><span style="color:rgb(255,0,0)">  Policy CMP0054 is not set: Only interpret if() arguments as variables or<br>  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy<br>  details.  Use the cmake_policy command to set the policy and suppress this<br>  warning.<br><br>  Quoted variables like "MSVC" will no longer be dereferenced when the policy<br>  is set to NEW.  Since the policy is not set the OLD behavior will be used.<br>Call Stack (most recent call first):<br>  CMakeLists.txt:5 (find_package)<br>This warning is for project developers.  Use -Wno-dev to suppress it.</span><div><br></div><div><br></div><div>Regards</div><div>   Andrew</div><div><br></div>-- <br><div class="gmail_signature">___________________________________________<br>Andrew J. P. Maclean<br><br>___________________________________________</div>
</div></div>