From c35bbf2c0c098ad7c7618910664d2ac7f991a257 Mon Sep 17 00:00:00 2001 From: Florent Pruvost <florent.pruvost@inria.fr> Date: Wed, 14 Dec 2016 15:37:03 +0100 Subject: [PATCH] fix compatibility to starpu 1.1 --- CMakeLists.txt | 4 +++- example/CMakeLists.txt | 4 +++- runtime/starpu/codelets/codelet_zgeqrt.c | 4 +++- runtime/starpu/codelets/codelet_zhe2ge.c | 4 +++- runtime/starpu/codelets/codelet_zherfb.c | 4 +++- runtime/starpu/codelets/codelet_zlatro.c | 4 +++- runtime/starpu/codelets/codelet_ztsmqr.c | 4 +++- runtime/starpu/codelets/codelet_ztsmqr_hetra1.c | 4 +++- runtime/starpu/codelets/codelet_ztsqrt.c | 4 +++- runtime/starpu/codelets/codelet_zunmlq.c | 4 +++- runtime/starpu/codelets/codelet_zunmqr.c | 4 +++- runtime/starpu/control/runtime_descriptor.c | 6 ++++++ 12 files changed, 39 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ce760a96d..44019bf54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -657,7 +657,7 @@ endif(NOT CHAMELEON_SIMULATION) if( CHAMELEON_SCHED_STARPU ) - set(CHAMELEON_STARPU_VERSION "1.2" 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...) if(NOT CHAMELEON_SIMULATION) @@ -691,6 +691,8 @@ if( CHAMELEON_SCHED_STARPU ) foreach(libdir ${STARPU_LIBRARY_DIRS_DEP}) list(APPEND CMAKE_REQUIRED_FLAGS "-L${libdir}") 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}") if (CHAMELEON_USE_MPI) list(APPEND CMAKE_REQUIRED_INCLUDES "${MPI_C_INCLUDE_PATH}") diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 430392799..92aa83143 100755 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -29,7 +29,9 @@ add_subdirectory(basic_zposv) if (CHAMELEON_PREC_D) add_subdirectory(lapack_to_morse) if (CHAMELEON_SCHED_STARPU) - add_subdirectory(out_of_core) + if (${STARPU_VERSION_MAJOR} GREATER 0 AND ${STARPU_VERSION_MINOR} GREATER 1) + add_subdirectory(out_of_core) + endif() endif() else() message(WARNING "CHAMELEON_PREC_D is set to OFF so that lapack_to_morse " diff --git a/runtime/starpu/codelets/codelet_zgeqrt.c b/runtime/starpu/codelets/codelet_zgeqrt.c index 91f730c84..a60fb29da 100644 --- a/runtime/starpu/codelets/codelet_zgeqrt.c +++ b/runtime/starpu/codelets/codelet_zgeqrt.c @@ -123,7 +123,9 @@ void MORSE_TASK_zgeqrt(const MORSE_option_t *options, STARPU_VALUE, &h_work, sizeof(MORSE_starpu_ws_t *), STARPU_PRIORITY, options->priority, STARPU_CALLBACK, callback, - STARPU_NAME, "zgeqrt", +#ifdef STARPU_12 + STARPU_NAME, "zgeqrt", +#endif 0); } } diff --git a/runtime/starpu/codelets/codelet_zhe2ge.c b/runtime/starpu/codelets/codelet_zhe2ge.c index 9bb03ebaf..1daebd9f1 100644 --- a/runtime/starpu/codelets/codelet_zhe2ge.c +++ b/runtime/starpu/codelets/codelet_zhe2ge.c @@ -53,7 +53,9 @@ void MORSE_TASK_zhe2ge(const MORSE_option_t *options, STARPU_VALUE, &ldb, sizeof(int), STARPU_PRIORITY, options->priority, STARPU_CALLBACK, callback, - STARPU_NAME, "zhe2ge", +#ifdef STARPU_12 + STARPU_NAME, "zhe2ge", +#endif 0); } } diff --git a/runtime/starpu/codelets/codelet_zherfb.c b/runtime/starpu/codelets/codelet_zherfb.c index 9f693a901..4e257acba 100644 --- a/runtime/starpu/codelets/codelet_zherfb.c +++ b/runtime/starpu/codelets/codelet_zherfb.c @@ -61,7 +61,9 @@ void MORSE_TASK_zherfb(const MORSE_option_t *options, STARPU_VALUE, &nb, sizeof(int), STARPU_PRIORITY, options->priority, STARPU_CALLBACK, callback, - STARPU_NAME, "zherfb", +#ifdef STARPU_12 + STARPU_NAME, "zherfb", +#endif 0); } } diff --git a/runtime/starpu/codelets/codelet_zlatro.c b/runtime/starpu/codelets/codelet_zlatro.c index 9aa23859b..5f0a2ea04 100644 --- a/runtime/starpu/codelets/codelet_zlatro.c +++ b/runtime/starpu/codelets/codelet_zlatro.c @@ -62,7 +62,9 @@ void MORSE_TASK_zlatro(const MORSE_option_t *options, STARPU_VALUE, &ldb, sizeof(int), STARPU_PRIORITY, options->priority, STARPU_CALLBACK, callback, - STARPU_NAME, "zlatro", +#ifdef STARPU_12 + STARPU_NAME, "zlatro", +#endif 0); } (void)mb; diff --git a/runtime/starpu/codelets/codelet_ztsmqr.c b/runtime/starpu/codelets/codelet_ztsmqr.c index 3d2839e48..16f2475b3 100644 --- a/runtime/starpu/codelets/codelet_ztsmqr.c +++ b/runtime/starpu/codelets/codelet_ztsmqr.c @@ -199,7 +199,9 @@ void MORSE_TASK_ztsmqr(const MORSE_option_t *options, STARPU_VALUE, &ldwork, sizeof(int), STARPU_PRIORITY, options->priority, STARPU_CALLBACK, callback, - STARPU_NAME, "ztsmqr", +#ifdef STARPU_12 + STARPU_NAME, "ztsmqr", +#endif #if defined(CHAMELEON_USE_MPI) STARPU_EXECUTE_ON_NODE, execution_rank, #endif diff --git a/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c b/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c index ce30dd40a..94597b6a9 100644 --- a/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c +++ b/runtime/starpu/codelets/codelet_ztsmqr_hetra1.c @@ -73,7 +73,9 @@ void MORSE_TASK_ztsmqr_hetra1(const MORSE_option_t *options, STARPU_VALUE, &ldwork, sizeof(int), STARPU_PRIORITY, options->priority, STARPU_CALLBACK, callback, - STARPU_NAME, "ztsmqr_hetra1", +#ifdef STARPU_12 + STARPU_NAME, "ztsmqr_hetra1", +#endif 0); } } diff --git a/runtime/starpu/codelets/codelet_ztsqrt.c b/runtime/starpu/codelets/codelet_ztsqrt.c index 9a5d5e0ac..0d8a8a9aa 100644 --- a/runtime/starpu/codelets/codelet_ztsqrt.c +++ b/runtime/starpu/codelets/codelet_ztsqrt.c @@ -129,7 +129,9 @@ void MORSE_TASK_ztsqrt(const MORSE_option_t *options, STARPU_VALUE, &h_work, sizeof(MORSE_starpu_ws_t *), STARPU_PRIORITY, options->priority, STARPU_CALLBACK, callback, - STARPU_NAME, "ztsqrt", +#ifdef STARPU_12 + STARPU_NAME, "ztsqrt", +#endif STARPU_EXECUTE_ON_NODE, A2->get_rankof(A2, A2m, A2n), 0); } diff --git a/runtime/starpu/codelets/codelet_zunmlq.c b/runtime/starpu/codelets/codelet_zunmlq.c index 38678c0fc..b3e973a09 100644 --- a/runtime/starpu/codelets/codelet_zunmlq.c +++ b/runtime/starpu/codelets/codelet_zunmlq.c @@ -150,7 +150,9 @@ void MORSE_TASK_zunmlq(const MORSE_option_t *options, STARPU_VALUE, &nb, sizeof(int), STARPU_PRIORITY, options->priority, STARPU_CALLBACK, callback, - STARPU_NAME, "zunmlq", +#ifdef STARPU_12 + STARPU_NAME, "zunmlq", +#endif 0); } } diff --git a/runtime/starpu/codelets/codelet_zunmqr.c b/runtime/starpu/codelets/codelet_zunmqr.c index e8b47fbb3..32c6d14ac 100644 --- a/runtime/starpu/codelets/codelet_zunmqr.c +++ b/runtime/starpu/codelets/codelet_zunmqr.c @@ -172,7 +172,9 @@ void MORSE_TASK_zunmqr(const MORSE_option_t *options, STARPU_VALUE, &nb, sizeof(int), STARPU_PRIORITY, options->priority, STARPU_CALLBACK, callback, - STARPU_NAME, "zunmqr", +#ifdef STARPU_12 + STARPU_NAME, "zunmqr", +#endif #if defined(CHAMELEON_USE_MPI) STARPU_EXECUTE_ON_NODE, execution_rank, #endif diff --git a/runtime/starpu/control/runtime_descriptor.c b/runtime/starpu/control/runtime_descriptor.c index d6a2c670b..c25460a91 100644 --- a/runtime/starpu/control/runtime_descriptor.c +++ b/runtime/starpu/control/runtime_descriptor.c @@ -315,9 +315,15 @@ void *RUNTIME_desc_getaddr( const MORSE_desc_t *desc, int m, int n ) BLKLDD(desc, im), tempmm, tempnn, eltsze); } else { +#ifdef STARPU_12 starpu_matrix_data_register(ptrtile, STARPU_MAIN_RAM, (uintptr_t)desc->get_blkaddr(desc, m, n), 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 { -- GitLab