Commit 7da7fbcf authored by PRUVOST Florent's avatar PRUVOST Florent

change USE_STARPU_... definitions into HAVE_STARPU_... for coherency

parent 04da77e9
......@@ -703,18 +703,18 @@ if( CHAMELEON_SCHED_STARPU )
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(USE_STARPU_IDLE_PREFETCH 1)
message("-- ${Blue}Add definition USE_STARPU_IDLE_PREFETCH${ColourReset}")
set(HAVE_STARPU_IDLE_PREFETCH 1)
message("-- ${Blue}Add definition HAVE_STARPU_IDLE_PREFETCH${ColourReset}")
endif()
check_function_exists(starpu_data_wont_use STARPU_DATA_WONT_USE_FOUND)
if ( STARPU_DATA_WONT_USE_FOUND )
set(USE_STARPU_DATA_WONT_USE 1)
message("-- ${Blue}Add definition USE_STARPU_DATA_WONT_USE${ColourReset}")
set(HAVE_STARPU_DATA_WONT_USE 1)
message("-- ${Blue}Add definition HAVE_STARPU_DATA_WONT_USE${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 )
set(USE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS 1)
message("-- ${Blue}Add definition USE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS${ColourReset}")
set(HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS 1)
message("-- ${Blue}Add definition HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS${ColourReset}")
endif()
if(CHAMELEON_ENABLE_TRACING)
# check if fxt profiling is accessible in starpu and activate it in chameleon
......
......@@ -12,7 +12,7 @@
*
* @file config.h
*
* MORSE main header
* Chameleon's internal definitions
* MORSE is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver,
* and INRIA Bordeaux Sud-Ouest
......@@ -31,15 +31,15 @@
/* For BLAS Fortran mangling */
#cmakedefine ADD_
/* Profiling */
/* StarPU functions */
#cmakedefine HAVE_STARPU_FXT_PROFILING
/* Optional functions */
#cmakedefine HAVE_MAGMA_GETRF_INCPIV_GPU
#cmakedefine USE_STARPU_IDLE_PREFETCH
#cmakedefine USE_STARPU_DATA_WONT_USE
#cmakedefine USE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS
#cmakedefine HAVE_STARPU_IDLE_PREFETCH
#cmakedefine HAVE_STARPU_DATA_WONT_USE
#cmakedefine HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS
#cmakedefine HAVE_STARPU_MPI_DATA_REGISTER
#cmakedefine HAVE_STARPU_MPI_COMM_RANK
/* MAGMA functions */
#cmakedefine HAVE_MAGMA_GETRF_INCPIV_GPU
#endif /* CONFIG_H_HAS_BEEN_INCLUDED */
......@@ -26,8 +26,8 @@
**/
#include "runtime/starpu/include/morse_starpu.h"
#ifdef USE_STARPU_DATA_WONT_USE
#elif defined USE_STARPU_IDLE_PREFETCH
#ifdef HAVE_STARPU_DATA_WONT_USE
#elif defined HAVE_STARPU_IDLE_PREFETCH
static void data_flush(void *handle)
{
starpu_data_idle_prefetch_on_node(handle, STARPU_MAIN_RAM, 1);
......@@ -63,9 +63,9 @@ void MORSE_TASK_dataflush(const MORSE_option_t *options,
if ( A->myrank == A->get_rankof( A, Am, An ) )
{
/* Push data to main memory when we have time to */
#ifdef USE_STARPU_DATA_WONT_USE
#ifdef HAVE_STARPU_DATA_WONT_USE
starpu_data_wont_use(*ptrtile);
#elif defined USE_STARPU_IDLE_PREFETCH
#elif defined HAVE_STARPU_IDLE_PREFETCH
starpu_data_acquire_on_node_cb(*ptrtile, -1, STARPU_R, data_flush, *ptrtile);
#else
starpu_data_acquire_cb(*ptrtile, STARPU_R, data_release, *ptrtile);
......
......@@ -113,7 +113,7 @@ int RUNTIME_init_scheduler( MORSE_context_t *morse, int ncpus, int ncudas, int n
morse->nthreads_per_worker = nthreads_per_worker;
}
#ifdef USE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS
#ifdef HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS
starpu_malloc_on_node_set_default_flags(STARPU_MAIN_RAM, STARPU_MALLOC_PINNED | STARPU_MALLOC_COUNT
#ifdef STARPU_MALLOC_SIMULATION_FOLDED
| STARPU_MALLOC_SIMULATION_FOLDED
......
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