Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 5ec61c4e authored by THIBAULT Samuel's avatar THIBAULT Samuel
Browse files

Fix building with mpi version of starpu-simgrid

parent 05ded544
No related branches found
No related tags found
No related merge requests found
...@@ -465,11 +465,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -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 # -DMPI_C_COMPILER=path/to/mpicc -DMPI_Fortran_COMPILER=path/to/mpif90
# at cmake configure # at cmake configure
if(NOT MPI_C_COMPILER) if(NOT MPI_C_COMPILER)
if(NOT CHAMELEON_SIMULATION) set(MPI_C_COMPILER mpicc)
set(MPI_C_COMPILER mpicc)
else(NOT CHAMELEON_SIMULATION)
set(MPI_C_COMPILER smpicc)
endif()
endif() endif()
find_package(MPI REQUIRED) find_package(MPI REQUIRED)
...@@ -521,6 +517,34 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -521,6 +517,34 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
"numerical correctness of algorithms and kernels.${ColourReset}") "numerical correctness of algorithms and kernels.${ColourReset}")
endif () 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) endif(NOT CHAMELEON_SIMULATION)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment