Commit 94e66e03 authored by Andrew J. Burns (Cont's avatar Andrew J. Burns (Cont
Browse files

adjusted for mpi other than openmpi

parent 1d1a19a2
......@@ -24,11 +24,18 @@ if(XDMF_BUILD_FORTRAN)
OUTPUT_VARIABLE MPI_TYPE_OUTPUT
ERROR_VARIABLE MPI_TYPE_ERROR
)
if (NOT "${MPI_TYPE_ERROR}" STREQUAL "")
STRING(REGEX MATCH "Open" IS_OPENMPI "${MPI_TYPE_ERROR}")
elseif (NOT "${MPI_TYPE_OUTPUT}" STREQUAL "")
STRING(REGEX MATCH "Open" IS_OPENMPI "${MPI_TYPE_OUTPUT}")
endif ()
IF (NOT "${IS_OPENMPI}" STREQUAL "")
if (NOT "${MPI_TYPE_ERROR}" STREQUAL "")
STRING(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" MPI_VERSION "${MPI_TYPE_ERROR}")
elseif (NOT "${MPI_TYPE_OUTPUT}" STREQUAL "")
STRING(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" MPI_VERSION "${MPI_TYPE_OUTPUT}")
endif ()
if (NOT "${MPI_VERSION}" STREQUAL "")
STRING(REGEX MATCH "^[0-9]+" MPI_VERSION_MAJOR "${MPI_VERSION}")
STRING(REGEX MATCH "[0-9]+[.][0-9]+$" MPI_VERSION_CUT "${MPI_VERSION}")
STRING(REGEX MATCH "^[0-9]+" MPI_VERSION_MINOR "${MPI_VERSION_CUT}")
......@@ -49,6 +56,8 @@ if(XDMF_BUILD_FORTRAN)
# Major version is greater than 1
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -lmpi_mpifh")
endif (("${MPI_VERSION_MAJOR}" EQUAL 1) OR ("${MPI_VERSION_MAJOR}" LESS 1))
endif (NOT "${MPI_VERSION}" STREQUAL "")
ENDIF (NOT "${IS_OPENMPI}" STREQUAL "")
endif (NOT "${IS_GFORTRAN}" STREQUAL "")
endif (XDMF_BUILD_DSM)
endif(XDMF_BUILD_FORTRAN)
......
Markdown is supported
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