Commit 0bb75545 authored by PRUVOST Florent's avatar PRUVOST Florent

factorize HAVE_STARPU_... and STARPU_..._FOUND variables, just one is enough

parent 5e2da7ea
......@@ -660,47 +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 STARPU_MPI_DATA_MIGRATE_FOUND)
if ( STARPU_MPI_DATA_MIGRATE_FOUND )
set(HAVE_STARPU_MPI_DATA_MIGRATE 1)
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("-- CHAMELEON_USE_MIGRATE is turned OFF because starpu_mpi_data_migrate not found")
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}")
......@@ -709,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()
......
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