Commit 5655ac46 authored by David Cole's avatar David Cole
Browse files

Add MPICH2 and Microsoft HPC paths, add paths to find mpiexec. Now it works...

Add MPICH2 and Microsoft HPC paths, add paths to find mpiexec. Now it works better automatically on Windows. Thanks to Dave Partyka for developing the patch.
parent cdb96653
...@@ -58,8 +58,14 @@ find_program(MPI_COMPILER ...@@ -58,8 +58,14 @@ find_program(MPI_COMPILER
DOC "MPI compiler. Used only to detect MPI compilation flags.") DOC "MPI compiler. Used only to detect MPI compilation flags.")
mark_as_advanced(MPI_COMPILER) mark_as_advanced(MPI_COMPILER)
file(TO_CMAKE_PATH "$ENV{ProgramFiles}" ProgramFiles)
find_program(MPIEXEC find_program(MPIEXEC
NAMES mpiexec mpirun lamexec NAMES mpiexec mpirun lamexec
PATHS /usr/bin /usr/local/bin /usr/local/mpi/bin
"$ENV{SystemDrive}/Program Files/MPICH/SDK/Bin"
"${ProgramFiles}/MPICH2/Bin
"$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Bin"
"$ENV{SystemDrive}/Program Files/Microsoft HPC Pack 2008 SDK/Bin"
DOC "Executable for running MPI programs.") DOC "Executable for running MPI programs.")
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.") 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.")
...@@ -247,9 +253,10 @@ else (MPI_COMPILE_CMDLINE) ...@@ -247,9 +253,10 @@ else (MPI_COMPILE_CMDLINE)
/usr/include /usr/include
/usr/include/mpi /usr/include/mpi
/usr/local/mpi/include /usr/local/mpi/include
"C:/Program Files/MPICH/SDK/Include" "$ENV{SystemDrive}/Program Files/MPICH/SDK/Include"
"$ENV{SystemDrive}/Program Files/MPICH2/include" "${ProgramFiles}/MPICH2/include"
"$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Include" "$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Include"
"$ENV{SystemDrive}/Program Files/Microsoft HPC Pack 2008 SDK/Include"
) )
# Decide between 32-bit and 64-bit libraries for Microsoft's MPI # Decide between 32-bit and 64-bit libraries for Microsoft's MPI
...@@ -262,19 +269,20 @@ else (MPI_COMPILE_CMDLINE) ...@@ -262,19 +269,20 @@ else (MPI_COMPILE_CMDLINE)
find_library(MPI_LIBRARY find_library(MPI_LIBRARY
NAMES mpi mpich msmpi NAMES mpi mpich msmpi
PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
"C:/Program Files/MPICH/SDK/Lib"
"$ENV{SystemDrive}/Program Files/MPICH/SDK/Lib" "$ENV{SystemDrive}/Program Files/MPICH/SDK/Lib"
"${ProgramFiles}/MPICH2/Lib
"$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Lib/${MS_MPI_ARCH_DIR}" "$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Lib/${MS_MPI_ARCH_DIR}"
"$ENV{SystemDrive}/Program Files/Microsoft HPC Pack 2008 SDK/Lib/${MS_MPI_ARCH_DIR}"
) )
find_library(MPI_LIBRARY find_library(MPI_LIBRARY
NAMES mpich2 NAMES mpich2
PATHS PATHS
"$ENV{SystemDrive}/Program Files/MPICH2/Lib") "${ProgramFiles}/MPICH2/Lib")
find_library(MPI_EXTRA_LIBRARY find_library(MPI_EXTRA_LIBRARY
NAMES mpi++ NAMES mpi++
PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib
"C:/Program Files/MPICH/SDK/Lib" "$ENV{SystemDrive}/Program Files/MPICH/SDK/Lib"
DOC "Extra MPI libraries to link against.") DOC "Extra MPI libraries to link against.")
set(MPI_COMPILE_FLAGS "" CACHE STRING "MPI compilation flags") set(MPI_COMPILE_FLAGS "" CACHE STRING "MPI compilation flags")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment