Commit 1e6a1b7d authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Do not generate a STARPU_XX that is version dependent while we can directly used STARPU_XXX_VERSION

parent be43059b
...@@ -691,8 +691,6 @@ if( CHAMELEON_SCHED_STARPU ) ...@@ -691,8 +691,6 @@ if( CHAMELEON_SCHED_STARPU )
foreach(libdir ${STARPU_LIBRARY_DIRS_DEP}) foreach(libdir ${STARPU_LIBRARY_DIRS_DEP})
list(APPEND CMAKE_REQUIRED_FLAGS "-L${libdir}") list(APPEND CMAKE_REQUIRED_FLAGS "-L${libdir}")
endforeach() endforeach()
add_definitions("-DSTARPU_${STARPU_VERSION_MAJOR}${STARPU_VERSION_MINOR}")
message("-- ${Blue}Add definition STARPU_${STARPU_VERSION_MAJOR}${STARPU_VERSION_MINOR}${ColourReset}")
set(CMAKE_REQUIRED_LIBRARIES "${STARPU_LIBRARIES_DEP}") set(CMAKE_REQUIRED_LIBRARIES "${STARPU_LIBRARIES_DEP}")
if (CHAMELEON_USE_MPI) if (CHAMELEON_USE_MPI)
list(APPEND CMAKE_REQUIRED_INCLUDES "${MPI_C_INCLUDE_PATH}") list(APPEND CMAKE_REQUIRED_INCLUDES "${MPI_C_INCLUDE_PATH}")
......
...@@ -123,7 +123,7 @@ void MORSE_TASK_zgeqrt(const MORSE_option_t *options, ...@@ -123,7 +123,7 @@ void MORSE_TASK_zgeqrt(const MORSE_option_t *options,
STARPU_VALUE, &h_work, sizeof(MORSE_starpu_ws_t *), STARPU_VALUE, &h_work, sizeof(MORSE_starpu_ws_t *),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#ifdef STARPU_12 #if (STARPU_MAJOR_VERSION > 1) || ((STARPU_MAJOR_VERSION == 1) && (STARPU_MINOR_VERSION > 1))
STARPU_NAME, "zgeqrt", STARPU_NAME, "zgeqrt",
#endif #endif
0); 0);
......
...@@ -53,7 +53,7 @@ void MORSE_TASK_zhe2ge(const MORSE_option_t *options, ...@@ -53,7 +53,7 @@ void MORSE_TASK_zhe2ge(const MORSE_option_t *options,
STARPU_VALUE, &ldb, sizeof(int), STARPU_VALUE, &ldb, sizeof(int),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#ifdef STARPU_12 #if (STARPU_MAJOR_VERSION > 1) || ((STARPU_MAJOR_VERSION == 1) && (STARPU_MINOR_VERSION > 1))
STARPU_NAME, "zhe2ge", STARPU_NAME, "zhe2ge",
#endif #endif
0); 0);
......
...@@ -61,7 +61,7 @@ void MORSE_TASK_zherfb(const MORSE_option_t *options, ...@@ -61,7 +61,7 @@ void MORSE_TASK_zherfb(const MORSE_option_t *options,
STARPU_VALUE, &nb, sizeof(int), STARPU_VALUE, &nb, sizeof(int),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#ifdef STARPU_12 #if (STARPU_MAJOR_VERSION > 1) || ((STARPU_MAJOR_VERSION == 1) && (STARPU_MINOR_VERSION > 1))
STARPU_NAME, "zherfb", STARPU_NAME, "zherfb",
#endif #endif
0); 0);
......
...@@ -62,7 +62,7 @@ void MORSE_TASK_zlatro(const MORSE_option_t *options, ...@@ -62,7 +62,7 @@ void MORSE_TASK_zlatro(const MORSE_option_t *options,
STARPU_VALUE, &ldb, sizeof(int), STARPU_VALUE, &ldb, sizeof(int),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#ifdef STARPU_12 #if (STARPU_MAJOR_VERSION > 1) || ((STARPU_MAJOR_VERSION == 1) && (STARPU_MINOR_VERSION > 1))
STARPU_NAME, "zlatro", STARPU_NAME, "zlatro",
#endif #endif
0); 0);
......
...@@ -199,7 +199,7 @@ void MORSE_TASK_ztsmqr(const MORSE_option_t *options, ...@@ -199,7 +199,7 @@ void MORSE_TASK_ztsmqr(const MORSE_option_t *options,
STARPU_VALUE, &ldwork, sizeof(int), STARPU_VALUE, &ldwork, sizeof(int),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#ifdef STARPU_12 #if (STARPU_MAJOR_VERSION > 1) || ((STARPU_MAJOR_VERSION == 1) && (STARPU_MINOR_VERSION > 1))
STARPU_NAME, "ztsmqr", STARPU_NAME, "ztsmqr",
#endif #endif
#if defined(CHAMELEON_USE_MPI) #if defined(CHAMELEON_USE_MPI)
......
...@@ -73,7 +73,7 @@ void MORSE_TASK_ztsmqr_hetra1(const MORSE_option_t *options, ...@@ -73,7 +73,7 @@ void MORSE_TASK_ztsmqr_hetra1(const MORSE_option_t *options,
STARPU_VALUE, &ldwork, sizeof(int), STARPU_VALUE, &ldwork, sizeof(int),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#ifdef STARPU_12 #if (STARPU_MAJOR_VERSION > 1) || ((STARPU_MAJOR_VERSION == 1) && (STARPU_MINOR_VERSION > 1))
STARPU_NAME, "ztsmqr_hetra1", STARPU_NAME, "ztsmqr_hetra1",
#endif #endif
0); 0);
......
...@@ -129,7 +129,7 @@ void MORSE_TASK_ztsqrt(const MORSE_option_t *options, ...@@ -129,7 +129,7 @@ void MORSE_TASK_ztsqrt(const MORSE_option_t *options,
STARPU_VALUE, &h_work, sizeof(MORSE_starpu_ws_t *), STARPU_VALUE, &h_work, sizeof(MORSE_starpu_ws_t *),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#ifdef STARPU_12 #if (STARPU_MAJOR_VERSION > 1) || ((STARPU_MAJOR_VERSION == 1) && (STARPU_MINOR_VERSION > 1))
STARPU_NAME, "ztsqrt", STARPU_NAME, "ztsqrt",
#endif #endif
STARPU_EXECUTE_ON_NODE, A2->get_rankof(A2, A2m, A2n), STARPU_EXECUTE_ON_NODE, A2->get_rankof(A2, A2m, A2n),
......
...@@ -150,7 +150,7 @@ void MORSE_TASK_zunmlq(const MORSE_option_t *options, ...@@ -150,7 +150,7 @@ void MORSE_TASK_zunmlq(const MORSE_option_t *options,
STARPU_VALUE, &nb, sizeof(int), STARPU_VALUE, &nb, sizeof(int),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#ifdef STARPU_12 #if (STARPU_MAJOR_VERSION > 1) || ((STARPU_MAJOR_VERSION == 1) && (STARPU_MINOR_VERSION > 1))
STARPU_NAME, "zunmlq", STARPU_NAME, "zunmlq",
#endif #endif
0); 0);
......
...@@ -172,7 +172,7 @@ void MORSE_TASK_zunmqr(const MORSE_option_t *options, ...@@ -172,7 +172,7 @@ void MORSE_TASK_zunmqr(const MORSE_option_t *options,
STARPU_VALUE, &nb, sizeof(int), STARPU_VALUE, &nb, sizeof(int),
STARPU_PRIORITY, options->priority, STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback, STARPU_CALLBACK, callback,
#ifdef STARPU_12 #if (STARPU_MAJOR_VERSION > 1) || ((STARPU_MAJOR_VERSION == 1) && (STARPU_MINOR_VERSION > 1))
STARPU_NAME, "zunmqr", STARPU_NAME, "zunmqr",
#endif #endif
#if defined(CHAMELEON_USE_MPI) #if defined(CHAMELEON_USE_MPI)
......
...@@ -268,6 +268,13 @@ int RUNTIME_desc_release( MORSE_desc_t *desc ) ...@@ -268,6 +268,13 @@ int RUNTIME_desc_release( MORSE_desc_t *desc )
return MORSE_SUCCESS; return MORSE_SUCCESS;
} }
/**
* For older revision of StarPU, STARPU_MAIN_RAM is not defined
*/
#ifndef STARPU_MAIN_RAM
#define STARPU_MAIN_RAM 0
#endif
int RUNTIME_desc_getoncpu( MORSE_desc_t *desc ) int RUNTIME_desc_getoncpu( MORSE_desc_t *desc )
{ {
starpu_data_handle_t *handle = (starpu_data_handle_t*)(desc->schedopt); starpu_data_handle_t *handle = (starpu_data_handle_t*)(desc->schedopt);
...@@ -315,15 +322,9 @@ void *RUNTIME_desc_getaddr( const MORSE_desc_t *desc, int m, int n ) ...@@ -315,15 +322,9 @@ void *RUNTIME_desc_getaddr( const MORSE_desc_t *desc, int m, int n )
BLKLDD(desc, im), tempmm, tempnn, eltsze); BLKLDD(desc, im), tempmm, tempnn, eltsze);
} }
else { else {
#ifdef STARPU_12
starpu_matrix_data_register(ptrtile, STARPU_MAIN_RAM, starpu_matrix_data_register(ptrtile, STARPU_MAIN_RAM,
(uintptr_t)desc->get_blkaddr(desc, m, n), (uintptr_t)desc->get_blkaddr(desc, m, n),
BLKLDD(desc, im), tempmm, tempnn, eltsze); BLKLDD(desc, im), tempmm, tempnn, eltsze);
#else
starpu_matrix_data_register(ptrtile, 0,
(uintptr_t)desc->get_blkaddr(desc, m, n),
BLKLDD(desc, im), tempmm, tempnn, eltsze);
#endif
} }
} }
else { else {
......
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