Commit 5ec61c4e authored by THIBAULT Samuel's avatar THIBAULT Samuel

Fix building with mpi version of starpu-simgrid

parent 05ded544
......@@ -465,11 +465,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
# -DMPI_C_COMPILER=path/to/mpicc -DMPI_Fortran_COMPILER=path/to/mpif90
# at cmake configure
if(NOT MPI_C_COMPILER)
if(NOT CHAMELEON_SIMULATION)
set(MPI_C_COMPILER mpicc)
else(NOT CHAMELEON_SIMULATION)
set(MPI_C_COMPILER smpicc)
endif()
set(MPI_C_COMPILER mpicc)
endif()
find_package(MPI REQUIRED)
......@@ -521,6 +517,34 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
"numerical correctness of algorithms and kernels.${ColourReset}")
endif ()
# CHAMELEON depends on MPI
#-------------------------
if (CHAMELEON_USE_MPI)
# allows to use an external mpi compilation by setting compilers with
# -DMPI_C_COMPILER=path/to/mpicc -DMPI_Fortran_COMPILER=path/to/mpif90
# at cmake configure
if(NOT MPI_C_COMPILER)
set(MPI_C_COMPILER smpicc)
endif()
if(NOT MPI_C_LIBRARIES)
set(MPI_C_LIBRARIES -lsimgrid)
endif()
find_package(MPI REQUIRED)
if (MPI_C_FOUND)
message("-- ${Blue}Add definition CHAMELEON_USE_MPI"
" - Activate MPI in Chameleon${ColourReset}")
add_definitions(-DCHAMELEON_USE_MPI)
list(APPEND EXTRA_LIBRARIES ${MPI_C_LIBRARIES} )
include_directories( ${MPI_C_INCLUDE_PATH} )
if(MPI_C_LINK_FLAGS)
list(APPEND CMAKE_EXE_LINKER_FLAGS "${MPI_C_LINK_FLAGS}")
endif()
endif (MPI_C_FOUND)
endif (CHAMELEON_USE_MPI)
endif(NOT CHAMELEON_SIMULATION)
......
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