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

adjusted for mpi other than openmpi

parent 1d1a19a2
...@@ -25,30 +25,39 @@ if(XDMF_BUILD_FORTRAN) ...@@ -25,30 +25,39 @@ if(XDMF_BUILD_FORTRAN)
ERROR_VARIABLE MPI_TYPE_ERROR ERROR_VARIABLE MPI_TYPE_ERROR
) )
if (NOT "${MPI_TYPE_ERROR}" STREQUAL "") if (NOT "${MPI_TYPE_ERROR}" STREQUAL "")
STRING(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" MPI_VERSION "${MPI_TYPE_ERROR}") STRING(REGEX MATCH "Open" IS_OPENMPI "${MPI_TYPE_ERROR}")
elseif (NOT "${MPI_TYPE_OUTPUT}" STREQUAL "") elseif (NOT "${MPI_TYPE_OUTPUT}" STREQUAL "")
STRING(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" MPI_VERSION "${MPI_TYPE_OUTPUT}") STRING(REGEX MATCH "Open" IS_OPENMPI "${MPI_TYPE_OUTPUT}")
endif () endif ()
STRING(REGEX MATCH "^[0-9]+" MPI_VERSION_MAJOR "${MPI_VERSION}") IF (NOT "${IS_OPENMPI}" STREQUAL "")
STRING(REGEX MATCH "[0-9]+[.][0-9]+$" MPI_VERSION_CUT "${MPI_VERSION}") if (NOT "${MPI_TYPE_ERROR}" STREQUAL "")
STRING(REGEX MATCH "^[0-9]+" MPI_VERSION_MINOR "${MPI_VERSION_CUT}") STRING(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" MPI_VERSION "${MPI_TYPE_ERROR}")
if (("${MPI_VERSION_MAJOR}" EQUAL 1) OR ("${MPI_VERSION_MAJOR}" LESS 1)) elseif (NOT "${MPI_TYPE_OUTPUT}" STREQUAL "")
if ("${MPI_VERSION_MAJOR}" EQUAL 1) STRING(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" MPI_VERSION "${MPI_TYPE_OUTPUT}")
if ("${MPI_VERSION_MINOR}" LESS 8) endif ()
# Minor version is less than 1.8 if (NOT "${MPI_VERSION}" STREQUAL "")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -lmpi_f90") STRING(REGEX MATCH "^[0-9]+" MPI_VERSION_MAJOR "${MPI_VERSION}")
else ("${MPI_VERSION_MINOR}" LESS 8) STRING(REGEX MATCH "[0-9]+[.][0-9]+$" MPI_VERSION_CUT "${MPI_VERSION}")
# Version is 1.8.0 or greater STRING(REGEX MATCH "^[0-9]+" MPI_VERSION_MINOR "${MPI_VERSION_CUT}")
if (("${MPI_VERSION_MAJOR}" EQUAL 1) OR ("${MPI_VERSION_MAJOR}" LESS 1))
if ("${MPI_VERSION_MAJOR}" EQUAL 1)
if ("${MPI_VERSION_MINOR}" LESS 8)
# Minor version is less than 1.8
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -lmpi_f90")
else ("${MPI_VERSION_MINOR}" LESS 8)
# Version is 1.8.0 or greater
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -lmpi_mpifh")
endif ("${MPI_VERSION_MINOR}" LESS 8)
else ("${MPI_VERSION_MAJOR}" EQUAL 1)
# Major version is less than 1
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -lmpi_f90")
endif ("${MPI_VERSION_MAJOR}" EQUAL 1)
else (("${MPI_VERSION_MAJOR}" EQUAL 1) OR ("${MPI_VERSION_MAJOR}" LESS 1))
# Major version is greater than 1
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -lmpi_mpifh") set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -lmpi_mpifh")
endif ("${MPI_VERSION_MINOR}" LESS 8) endif (("${MPI_VERSION_MAJOR}" EQUAL 1) OR ("${MPI_VERSION_MAJOR}" LESS 1))
else ("${MPI_VERSION_MAJOR}" EQUAL 1) endif (NOT "${MPI_VERSION}" STREQUAL "")
# Major version is less than 1 ENDIF (NOT "${IS_OPENMPI}" STREQUAL "")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -lmpi_f90")
endif ("${MPI_VERSION_MAJOR}" EQUAL 1)
else (("${MPI_VERSION_MAJOR}" EQUAL 1) OR ("${MPI_VERSION_MAJOR}" LESS 1))
# 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 "${IS_GFORTRAN}" STREQUAL "") endif (NOT "${IS_GFORTRAN}" STREQUAL "")
endif (XDMF_BUILD_DSM) endif (XDMF_BUILD_DSM)
endif(XDMF_BUILD_FORTRAN) 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