mirror of
https://github.com/JHUAPL/kaiju.git
synced 2026-01-08 18:37:53 -05:00
Trying new compiler flags for MPI
This commit is contained in:
@@ -130,10 +130,14 @@ if(ENABLE_MPI)
|
||||
add_definitions(${MPI_Fortran_COMPILE_DEFINITIONS})
|
||||
include_directories(${MPI_Fortran_INCLUDE_DIRS})
|
||||
link_directories(${MPI_Fortran_LIBRARIES})
|
||||
string(APPEND CMAKE_Fortran_FLAGS ${MPI_Fortran_LINK_FLAGS})
|
||||
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
|
||||
#Using Intel Compiler, use thread safe mpi compiler flag
|
||||
if(CMAKE_Fortran_COMPILER_ID MATCHES Intel AND MPI_Fortran_COMPILER MATCHES mpiifort)
|
||||
#Using Intel Compiler and Intel MPI, use thread safe mpi compiler flag
|
||||
string(APPEND CMAKE_Fortran_FLAGS " -mt_mpi")
|
||||
else()
|
||||
#use different MPI link command
|
||||
string(APPEND CMAKE_Fortran_FLAGS " -lmpi")
|
||||
endif()
|
||||
|
||||
set(CMAKE_Fortran_COMPILER ${MPI_Fortran_COMPILER})
|
||||
|
||||
Reference in New Issue
Block a user