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

adjusted for mpi other than openmpi

parent 1d1a19a2
......@@ -25,30 +25,39 @@ if(XDMF_BUILD_FORTRAN)
ERROR_VARIABLE MPI_TYPE_ERROR
)
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 "")
STRING(REGEX MATCH "[0-9]+[.][0-9]+[.][0-9]+" MPI_VERSION "${MPI_TYPE_OUTPUT}")
STRING(REGEX MATCH "Open" IS_OPENMPI "${MPI_TYPE_OUTPUT}")
endif ()
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}")
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
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}")
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")
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")
endif (("${MPI_VERSION_MAJOR}" EQUAL 1) OR ("${MPI_VERSION_MAJOR}" LESS 1))
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