Commit 3137cd2e authored by Mathieu Faverge's avatar Mathieu Faverge

Merge branch 'fix-compatibility-starpu1.1' into 'master'

Fix compatibility starpu1.1

See merge request solverstack/chameleon!94
parents 8a0668a3 5f9613fb
......@@ -660,39 +660,40 @@ if( CHAMELEON_SCHED_STARPU )
list(APPEND CMAKE_REQUIRED_FLAGS "-include" "starpu_simgrid_wrap.h")
endif()
string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
check_function_exists(starpu_data_idle_prefetch_on_node STARPU_IDLE_PREFETCH_FOUND)
if ( STARPU_IDLE_PREFETCH_FOUND )
set(HAVE_STARPU_IDLE_PREFETCH 1)
check_function_exists(starpu_data_idle_prefetch_on_node HAVE_STARPU_IDLE_PREFETCH)
if ( HAVE_STARPU_IDLE_PREFETCH )
message("-- ${Blue}Add definition HAVE_STARPU_IDLE_PREFETCH${ColourReset}")
endif()
check_function_exists(starpu_iteration_push STARPU_ITERATION_PUSH_FOUND)
if ( STARPU_ITERATION_PUSH_FOUND )
set(HAVE_STARPU_ITERATION_PUSH 1)
check_function_exists(starpu_iteration_push HAVE_STARPU_ITERATION_PUSH)
if ( HAVE_STARPU_ITERATION_PUSH )
message("-- ${Blue}Add definition HAVE_STARPU_ITERATION_PUSH${ColourReset}")
endif()
check_function_exists(starpu_data_wont_use STARPU_DATA_WONT_USE_FOUND)
if ( STARPU_DATA_WONT_USE_FOUND )
set(HAVE_STARPU_DATA_WONT_USE 1)
check_function_exists(starpu_data_wont_use HAVE_STARPU_DATA_WONT_USE)
if ( HAVE_STARPU_DATA_WONT_USE )
message("-- ${Blue}Add definition HAVE_STARPU_DATA_WONT_USE${ColourReset}")
endif()
check_function_exists(starpu_data_set_coordinates STARPU_DATA_SET_COORDINATES_FOUND)
if ( STARPU_DATA_SET_COORDINATES_FOUND )
set(HAVE_STARPU_DATA_SET_COORDINATES 1)
check_function_exists(starpu_data_set_coordinates HAVE_STARPU_DATA_SET_COORDINATES)
if ( HAVE_STARPU_DATA_SET_COORDINATES )
message("-- ${Blue}Add definition HAVE_STARPU_DATA_SET_COORDINATES${ColourReset}")
endif()
check_function_exists(starpu_malloc_on_node_set_default_flags STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS)
if ( STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS )
check_function_exists(starpu_malloc_on_node_set_default_flags HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS)
if ( HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS )
set(HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS 1)
message("-- ${Blue}Add definition HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS${ColourReset}")
endif()
check_function_exists(starpu_mpi_data_migrate HAVE_STARPU_MPI_DATA_MIGRATE)
if ( HAVE_STARPU_MPI_DATA_MIGRATE )
message("-- ${Blue}Add definition HAVE_STARPU_MPI_DATA_MIGRATE${ColourReset}")
elseif(CHAMELEON_USE_MIGRATE)
set(CHAMELEON_USE_MIGRATE "OFF")
message("-- ${Blue}CHAMELEON_USE_MIGRATE is turned OFF because starpu_mpi_data_migrate not found${ColourReset}")
endif()
if(CHAMELEON_ENABLE_TRACING)
# check if fxt profiling is accessible in starpu and activate it in chameleon
unset(STARPU_FXT_START_PROFILING_FOUND CACHE)
check_function_exists(starpu_fxt_start_profiling STARPU_FXT_START_PROFILING_FOUND)
if ( STARPU_FXT_START_PROFILING_FOUND )
check_function_exists(starpu_fxt_start_profiling HAVE_STARPU_FXT_PROFILING)
if ( HAVE_STARPU_FXT_PROFILING )
message("-- ${Blue}Add definition HAVE_STARPU_FXT_PROFILING"
" - Activate FxT profiling through StarPU${ColourReset}")
set(HAVE_STARPU_FXT_PROFILING 1)
else()
message("-- ${Red}Looking for starpu with fxt"
" - starpu_fxt_start_profiling() test fails in StarPU${ColourReset}")
......@@ -701,36 +702,22 @@ if( CHAMELEON_SCHED_STARPU )
endif()
if (CHAMELEON_USE_MPI)
# Check if a specific function exist
unset(STARPU_MPI_DATA_REGISTER_FOUND CACHE)
check_function_exists(starpu_mpi_data_register_comm STARPU_MPI_DATA_REGISTER_FOUND)
if ( STARPU_MPI_DATA_REGISTER_FOUND )
check_function_exists(starpu_mpi_data_register_comm HAVE_STARPU_MPI_DATA_REGISTER)
if ( HAVE_STARPU_MPI_DATA_REGISTER )
message("-- ${Blue}Add definition HAVE_STARPU_MPI_DATA_REGISTER - Activate"
" use of starpu_mpi_data_register() in Chameleon with StarPU${ColourReset}")
set(HAVE_STARPU_MPI_DATA_REGISTER 1)
else()
message("-- ${Red}Looking for starpu with starpu_mpi_data_register"
" - starpu_mpi_data_register() test fails in StarPU${ColourReset}")
message("-- ${Red}Check in CMakeFiles/CMakeError.log to figure out why it fails${ColourReset}")
endif()
unset(STARPU_MPI_COMM_RANK_FOUND CACHE)
check_function_exists(starpu_mpi_comm_rank STARPU_MPI_COMM_RANK_FOUND)
if ( STARPU_MPI_COMM_RANK_FOUND )
check_function_exists(starpu_mpi_comm_rank HAVE_STARPU_MPI_COMM_RANK)
if ( HAVE_STARPU_MPI_COMM_RANK )
message("-- ${Blue}Add definition HAVE_STARPU_MPI_COMM_RANK - Activate"
" use of starpu_mpi_comm_rank() in Chameleon with StarPU${ColourReset}")
set(HAVE_STARPU_MPI_COMM_RANK 1)
else()
message("-- ${Red}Looking for starpu with starpu_mpi_comm_rank"
" - starpu_mpi_comm_rank() test fails in StarPU${ColourReset}")
message("-- ${Red}Check in CMakeFiles/CMakeError.log to figure out why it fails${ColourReset}")
endif()
check_function_exists(starpu_mpi_cached_receive STARPU_MPI_CACHED_RECEIVE)
if ( STARPU_MPI_CACHED_RECEIVE )
set(HAVE_STARPU_MPI_CACHED_RECEIVE 1)
check_function_exists(starpu_mpi_cached_receive HAVE_STARPU_MPI_CACHED_RECEIVE)
if ( HAVE_STARPU_MPI_CACHED_RECEIVE )
message("-- ${Blue}Add definition HAVE_STARPU_MPI_CACHED_RECEIVE${ColourReset}")
endif()
check_function_exists(starpu_mpi_comm_get_attr STARPU_MPI_COMM_GET_ATTR)
if ( STARPU_MPI_COMM_GET_ATTR )
set(HAVE_STARPU_MPI_COMM_GET_ATTR 1)
check_function_exists(starpu_mpi_comm_get_attr HAVE_STARPU_MPI_COMM_GET_ATTR)
if ( HAVE_STARPU_MPI_COMM_GET_ATTR )
message("-- ${Blue}Add definition HAVE_STARPU_MPI_COMM_GET_ATTR${ColourReset}")
endif()
endif()
......
Subproject commit 50671b7b85920f15297a489443b1548ceb6ebc53
Subproject commit 3f67955ffafb59534a77f80e61776e7b8a850c32
......@@ -4,7 +4,7 @@
*
* @copyright 2009-2014 The University of Tennessee and The University of
* Tennessee Research Foundation. All rights reserved.
* @copyright 2012-2017 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* @copyright 2012-2018 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
......@@ -358,6 +358,7 @@ static inline void
chameleon_starpu_data_wont_use( starpu_data_handle_t handle ) {
starpu_data_acquire_cb( handle, STARPU_R,
(void (*)(void*))&starpu_data_release, handle );
}
#endif
......@@ -417,6 +418,7 @@ void RUNTIME_data_flush( const MORSE_sequence_t *sequence,
void RUNTIME_data_migrate( const MORSE_sequence_t *sequence,
const MORSE_desc_t *A, int Am, int An, int new_rank )
{
#if defined(HAVE_STARPU_MPI_DATA_MIGRATE)
starpu_data_handle_t *handle = (starpu_data_handle_t*)(A->schedopt);
starpu_data_handle_t lhandle;
handle += ((int64_t)(A->lmt) * (int64_t)An + (int64_t)Am);
......@@ -430,6 +432,9 @@ void RUNTIME_data_migrate( const MORSE_sequence_t *sequence,
starpu_mpi_data_migrate( MPI_COMM_WORLD, lhandle, new_rank );
(void)sequence;
#else
(void)sequence; (void)A; (void)Am; (void)An; (void)new_rank;
#endif
}
#endif
......
......@@ -30,6 +30,7 @@
#cmakedefine HAVE_STARPU_DATA_WONT_USE
#cmakedefine HAVE_STARPU_DATA_SET_COORDINATES
#cmakedefine HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS
#cmakedefine HAVE_STARPU_MPI_DATA_MIGRATE
#cmakedefine HAVE_STARPU_MPI_DATA_REGISTER
#cmakedefine HAVE_STARPU_MPI_COMM_RANK
#cmakedefine HAVE_STARPU_MPI_CACHED_RECEIVE
......
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