Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 143e3551 authored by PRUVOST Florent's avatar PRUVOST Florent
Browse files

adapt chameleon to bu used with starpu+simgrid+mpi

parent ff9c6a27
No related branches found
No related tags found
No related merge requests found
...@@ -523,6 +523,9 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -523,6 +523,9 @@ 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 ()
# Simulation mode: we depend on SimGrid
find_package(SIMGRID REQUIRED)
# CHAMELEON depends on MPI # CHAMELEON depends on MPI
#------------------------- #-------------------------
if (CHAMELEON_USE_MPI) if (CHAMELEON_USE_MPI)
...@@ -534,7 +537,11 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -534,7 +537,11 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
set(MPI_C_COMPILER smpicc) set(MPI_C_COMPILER smpicc)
endif() endif()
if(NOT MPI_C_LIBRARIES) if(NOT MPI_C_LIBRARIES)
set(MPI_C_LIBRARIES -lsimgrid) set(MPI_C_LIBRARIES "${SIMGRID_LIBRARIES}")
endif()
if(NOT MPI_C_INCLUDE_PATH)
set(MPI_C_INCLUDE_PATH "${SIMGRID_INCLUDE_DIRS}")
list(APPEND MPI_C_INCLUDE_PATH "${SIMGRID_INCLUDE_DIRS}/smpi")
endif() endif()
find_package(MPI REQUIRED) find_package(MPI REQUIRED)
...@@ -559,7 +566,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -559,7 +566,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
if( CHAMELEON_SCHED_STARPU ) if( CHAMELEON_SCHED_STARPU )
set(CHAMELEON_STARPU_VERSION "1.1" CACHE STRING "oldest STARPU version desired") set(CHAMELEON_STARPU_VERSION "1.1" CACHE STRING "oldest STARPU version desired")
# create list of components in order to make a single call to find_package(starpu...) # create list of components in order to make a single call to find_package(starpu...)
if(NOT CHAMELEON_SIMULATION) if(NOT CHAMELEON_SIMULATION)
...@@ -595,7 +602,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -595,7 +602,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
endforeach() endforeach()
list(APPEND CMAKE_REQUIRED_FLAGS "-include" "starpu_simgrid_wrap.h") list(APPEND CMAKE_REQUIRED_FLAGS "-include" "starpu_simgrid_wrap.h")
string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "${STARPU_SHM_LIBRARIES}") set(CMAKE_REQUIRED_LIBRARIES "${STARPU_LIBRARIES_DEP}")
check_function_exists(starpu_data_idle_prefetch_on_node STARPU_IDLE_PREFETCH_FOUND) check_function_exists(starpu_data_idle_prefetch_on_node STARPU_IDLE_PREFETCH_FOUND)
if ( STARPU_IDLE_PREFETCH_FOUND ) if ( STARPU_IDLE_PREFETCH_FOUND )
add_definitions(-DCHAMELEON_USE_STARPU_IDLE_PREFETCH) add_definitions(-DCHAMELEON_USE_STARPU_IDLE_PREFETCH)
...@@ -606,7 +613,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -606,7 +613,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
endif() endif()
if(CHAMELEON_ENABLE_TRACING) if(CHAMELEON_ENABLE_TRACING)
# check if fxt profiling is accessible in starpu and activate it in chameleon # check if fxt profiling is accessible in starpu and activate it in chameleon
set(CMAKE_REQUIRED_LIBRARIES "${STARPU_SHM_LIBRARIES}") set(CMAKE_REQUIRED_LIBRARIES "${STARPU_LIBRARIES_DEP}")
unset(STARPU_FXT_START_PROFILING_FOUND CACHE) unset(STARPU_FXT_START_PROFILING_FOUND CACHE)
check_function_exists(starpu_fxt_start_profiling STARPU_FXT_START_PROFILING_FOUND) check_function_exists(starpu_fxt_start_profiling STARPU_FXT_START_PROFILING_FOUND)
if ( STARPU_FXT_START_PROFILING_FOUND ) if ( STARPU_FXT_START_PROFILING_FOUND )
...@@ -623,7 +630,12 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -623,7 +630,12 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
# Check if a specific function exist # Check if a specific function exist
list(APPEND CMAKE_REQUIRED_INCLUDES "${MPI_C_INCLUDE_PATH}") list(APPEND CMAKE_REQUIRED_INCLUDES "${MPI_C_INCLUDE_PATH}")
list(APPEND CMAKE_REQUIRED_FLAGS "${MPI_C_LINK_FLAGS}") list(APPEND CMAKE_REQUIRED_FLAGS "${MPI_C_LINK_FLAGS}")
set(CMAKE_REQUIRED_LIBRARIES "${STARPU_MPI_LIBRARIES} -lmpi") set(CMAKE_REQUIRED_LIBRARIES "${STARPU_LIBRARIES_DEP}")
# if (CHAMELEON_SIMULATION)
# set(CMAKE_REQUIRED_LIBRARIES "${STARPU_LIBRARIES_DEP}")
# else()
# set(CMAKE_REQUIRED_LIBRARIES "${STARPU_LIBRARIES_DEP} -lmpi")
# endif()
unset(STARPU_MPI_DATA_REGISTER_FOUND CACHE) unset(STARPU_MPI_DATA_REGISTER_FOUND CACHE)
check_function_exists(starpu_mpi_data_register_comm STARPU_MPI_DATA_REGISTER_FOUND) check_function_exists(starpu_mpi_data_register_comm STARPU_MPI_DATA_REGISTER_FOUND)
if ( STARPU_MPI_DATA_REGISTER_FOUND ) if ( STARPU_MPI_DATA_REGISTER_FOUND )
...@@ -869,17 +881,10 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/") ...@@ -869,17 +881,10 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
# Save all dependencies (all required links) # Save all dependencies (all required links)
set(CHAMELEON_DEP -lchameleon) set(CHAMELEON_DEP -lchameleon)
if(CHAMELEON_SCHED_STARPU) if(CHAMELEON_SCHED_STARPU)
if ( CHAMELEON_USE_MPI ) list(APPEND CHAMELEON_DEP
list(APPEND CHAMELEON_DEP -lchameleon_starpu
-lchameleon_starpu ${STARPU_LIBRARIES_DEP}
${STARPU_MPI_LIBRARIES} )
)
else()
list(APPEND CHAMELEON_DEP
-lchameleon_starpu
${STARPU_SHM_LIBRARIES}
)
endif()
elseif(CHAMELEON_SCHED_PARSEC) elseif(CHAMELEON_SCHED_PARSEC)
list(APPEND CHAMELEON_DEP list(APPEND CHAMELEON_DEP
-lchameleon_parsec -lchameleon_parsec
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @copyright (c) 2009-2014 The University of Tennessee and The University * @copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. * of Tennessee Research Foundation.
* All rights reserved. * All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved. * @copyright (c) 2012-2015 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved. * @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* *
**/ **/
......
...@@ -47,17 +47,10 @@ list(APPEND libs_for_examples ...@@ -47,17 +47,10 @@ list(APPEND libs_for_examples
) )
if(CHAMELEON_SCHED_STARPU) if(CHAMELEON_SCHED_STARPU)
if ( CHAMELEON_USE_MPI ) list(APPEND libs_for_examples
list(APPEND libs_for_examples chameleon_starpu
chameleon_starpu ${STARPU_LIBRARIES_DEP}
${STARPU_MPI_LIBRARIES} )
)
else()
list(APPEND libs_for_examples
chameleon_starpu
${STARPU_SHM_LIBRARIES}
)
endif()
link_directories(${STARPU_LIBRARY_DIRS}) link_directories(${STARPU_LIBRARY_DIRS})
elseif(CHAMELEON_SCHED_PARSEC) elseif(CHAMELEON_SCHED_PARSEC)
list(APPEND libs_for_examples list(APPEND libs_for_examples
......
...@@ -42,17 +42,10 @@ list(APPEND libs_for_ltm ...@@ -42,17 +42,10 @@ list(APPEND libs_for_ltm
) )
if(CHAMELEON_SCHED_STARPU) if(CHAMELEON_SCHED_STARPU)
if ( CHAMELEON_USE_MPI ) list(APPEND libs_for_ltm
list(APPEND libs_for_ltm chameleon_starpu
chameleon_starpu ${STARPU_LIBRARIES_DEP}
${STARPU_MPI_LIBRARIES} )
)
else()
list(APPEND libs_for_ltm
chameleon_starpu
${STARPU_SHM_LIBRARIES}
)
endif()
link_directories(${STARPU_LIBRARY_DIRS}) link_directories(${STARPU_LIBRARY_DIRS})
elseif(CHAMELEON_SCHED_PARSEC) elseif(CHAMELEON_SCHED_PARSEC)
list(APPEND libs_for_ltm list(APPEND libs_for_ltm
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @copyright (c) 2009-2014 The University of Tennessee and The University * @copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation. * of Tennessee Research Foundation.
* All rights reserved. * All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved. * @copyright (c) 2012-2015 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved. * @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* *
**/ **/
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
/* we need this when starpu is compiled with simgrid enabled */ /* we need this when starpu is compiled with simgrid enabled */
#if defined(CHAMELEON_SCHED_STARPU) && defined(CHAMELEON_SIMULATION) #if defined(CHAMELEON_SCHED_STARPU) && defined(CHAMELEON_SIMULATION)
#include <starpu_simgrid_wrap.h> #include <starpu_simgrid_wrap.h>
#if defined(CHAMELEON_USE_MPI)
#define main smpi_simulated_main_
#endif
#endif #endif
#endif #endif
...@@ -102,17 +102,10 @@ unset(libs_for_tests) ...@@ -102,17 +102,10 @@ unset(libs_for_tests)
list(APPEND libs_for_tests chameleon) list(APPEND libs_for_tests chameleon)
if(CHAMELEON_SCHED_STARPU) if(CHAMELEON_SCHED_STARPU)
if ( CHAMELEON_USE_MPI ) list(APPEND libs_for_tests
list(APPEND libs_for_tests chameleon_starpu
chameleon_starpu ${STARPU_LIBRARIES_DEP}
${STARPU_MPI_LIBRARIES} )
)
else()
list(APPEND libs_for_tests
chameleon_starpu
${STARPU_SHM_LIBRARIES}
)
endif()
link_directories(${STARPU_LIBRARY_DIRS}) link_directories(${STARPU_LIBRARY_DIRS})
elseif(CHAMELEON_SCHED_PARSEC) elseif(CHAMELEON_SCHED_PARSEC)
list(APPEND libs_for_tests list(APPEND libs_for_tests
......
...@@ -145,7 +145,7 @@ set(libs_for_tests "chameleon") ...@@ -145,7 +145,7 @@ set(libs_for_tests "chameleon")
# TODO: Check for name of following libraries (it certainly changed between morse and new_chameleon) # TODO: Check for name of following libraries (it certainly changed between morse and new_chameleon)
if(MORSE_SCHED_STARPU) if(MORSE_SCHED_STARPU)
list(APPEND libs_for_tests chameleon_starpu) list(APPEND libs_for_tests chameleon_starpu)
list(APPEND libs_for_tests ${STARPU_LIBRARIES}) list(APPEND libs_for_tests ${STARPU_LIBRARIES_DEP})
list(APPEND libs_for_tests coreblas) list(APPEND libs_for_tests coreblas)
elseif(MORSE_SCHED_QUARK) elseif(MORSE_SCHED_QUARK)
list(APPEND libs_for_tests chameleon_starpu) list(APPEND libs_for_tests chameleon_starpu)
......
...@@ -147,17 +147,10 @@ list(APPEND libs_for_timings ...@@ -147,17 +147,10 @@ list(APPEND libs_for_timings
) )
if(CHAMELEON_SCHED_STARPU) if(CHAMELEON_SCHED_STARPU)
if ( CHAMELEON_USE_MPI ) list(APPEND libs_for_timings
list(APPEND libs_for_timings chameleon_starpu
chameleon_starpu ${STARPU_LIBRARIES_DEP}
${STARPU_MPI_LIBRARIES} )
)
else()
list(APPEND libs_for_timings
chameleon_starpu
${STARPU_SHM_LIBRARIES}
)
endif()
link_directories(${STARPU_LIBRARY_DIRS}) link_directories(${STARPU_LIBRARY_DIRS})
elseif(CHAMELEON_SCHED_PARSEC) elseif(CHAMELEON_SCHED_PARSEC)
list(APPEND libs_for_timings list(APPEND libs_for_timings
......
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