From 137a3f52b43d50813405c33b031f1ac53aab0a5e Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Fri, 16 Jun 2017 20:08:26 +0200 Subject: [PATCH] Fix call to starpu_is_initialized() reported in issue #37 --- runtime/starpu/control/runtime_context.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/runtime/starpu/control/runtime_context.c b/runtime/starpu/control/runtime_context.c index 199f296f1..806eeb352 100644 --- a/runtime/starpu/control/runtime_context.c +++ b/runtime/starpu/control/runtime_context.c @@ -26,8 +26,16 @@ #include <stdlib.h> #include "runtime/starpu/include/morse_starpu.h" -/* TODO/WARNING: Call the correct function or remove for release */ +#if (STARPU_MAJOR_VERSION > 1) || ((STARPU_MAJOR_VERSION == 1) && (STARPU_MINOR_VERSION >= 3)) +/* Defined by StarPU as external function */ +#else +#if ((STARPU_MAJOR_VERSION == 1) && (STARPU_MINOR_VERSION >= 2)) int _starpu_is_initialized(void); +#define starpu_is_initialized() _starpu_is_initialized() +#else +#define starpu_is_initialized() 0 +#endif +#endif /******************************************************************************* * Create new context @@ -38,7 +46,7 @@ void RUNTIME_context_create( MORSE_context_t *morse ) morse->scheduler = RUNTIME_SCHED_STARPU; - if (! _starpu_is_initialized() ) { + if (! starpu_is_initialized() ) { morse->schedopt = (void*) malloc (sizeof(struct starpu_conf)); conf = morse->schedopt; -- GitLab