From 4ebc55c437a66a7fb44804473210b727522145d0 Mon Sep 17 00:00:00 2001
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Wed, 8 Mar 2017 10:39:37 +0100
Subject: [PATCH] Don't compile in iteration_push/pop without tracing support

---
 include/runtime.h                        | 5 +++++
 runtime/parsec/control/runtime_control.c | 2 ++
 runtime/quark/control/runtime_control.c  | 2 ++
 runtime/starpu/control/runtime_control.c | 2 ++
 4 files changed, 11 insertions(+)

diff --git a/include/runtime.h b/include/runtime.h
index 5a3e3798b..2764f6064 100644
--- a/include/runtime.h
+++ b/include/runtime.h
@@ -52,8 +52,13 @@ int   RUNTIME_rank               (MORSE_context_t*);
 int   RUNTIME_init_scheduler     (MORSE_context_t*, int, int, int);
 void  RUNTIME_finalize_scheduler (MORSE_context_t*);
 void  RUNTIME_barrier            (MORSE_context_t*);
+#ifdef CHAMELEON_ENABLE_TRACING
 void  RUNTIME_iteration_push     (MORSE_context_t*, unsigned long iteration);
 void  RUNTIME_iteration_pop      (MORSE_context_t*);
+#else
+#define RUNTIME_iteration_push(c,i) ((void)0)
+#define RUNTIME_iteration_pop(c)    ((void)0)
+#endif
 void  RUNTIME_pause              (MORSE_context_t*);
 void  RUNTIME_resume             (MORSE_context_t*);
 void  RUNTIME_comm_rank          (int*);
diff --git a/runtime/parsec/control/runtime_control.c b/runtime/parsec/control/runtime_control.c
index 4eda96a8c..17672de56 100644
--- a/runtime/parsec/control/runtime_control.c
+++ b/runtime/parsec/control/runtime_control.c
@@ -70,6 +70,7 @@ void RUNTIME_barrier(MORSE_context_t *morse)
 /*******************************************************************************
  *  Set iteration numbers for traces
  **/
+#ifdef CHAMELEON_ENABLE_TRACING
 void RUNTIME_iteration_push( MORSE_context_t *morse, unsigned long iteration )
 {
     (void)morse;
@@ -80,6 +81,7 @@ void RUNTIME_iteration_pop( MORSE_context_t *morse )
     (void)morse;
     return;
 }
+#endif
 
 /*******************************************************************************
  *  To suspend the processing of new tasks by workers
diff --git a/runtime/quark/control/runtime_control.c b/runtime/quark/control/runtime_control.c
index f21358df2..b81e961b3 100644
--- a/runtime/quark/control/runtime_control.c
+++ b/runtime/quark/control/runtime_control.c
@@ -71,6 +71,7 @@ void RUNTIME_finalize_scheduler(MORSE_context_t *morse)
 /*******************************************************************************
  *  Set iteration numbers for traces
  **/
+#ifdef CHAMELEON_ENABLE_TRACING
 void RUNTIME_iteration_push( MORSE_context_t *morse, unsigned long iteration )
 {
     (void)morse;
@@ -81,6 +82,7 @@ void RUNTIME_iteration_pop( MORSE_context_t *morse )
     (void)morse;
     return;
 }
+#endif
 
 /*******************************************************************************
  *  To suspend the processing of new tasks by workers
diff --git a/runtime/starpu/control/runtime_control.c b/runtime/starpu/control/runtime_control.c
index 9f861e258..ebb297e15 100644
--- a/runtime/starpu/control/runtime_control.c
+++ b/runtime/starpu/control/runtime_control.c
@@ -178,6 +178,7 @@ void RUNTIME_barrier( MORSE_context_t *morse )
 /*******************************************************************************
  *  Set iteration numbers for traces
  **/
+#ifdef CHAMELEON_ENABLE_TRACING
 void RUNTIME_iteration_push( MORSE_context_t *morse, unsigned long iteration )
 {
     (void)morse;
@@ -192,6 +193,7 @@ void RUNTIME_iteration_pop( MORSE_context_t *morse )
     starpu_iteration_pop();
 #endif
 }
+#endif
 
 /*******************************************************************************
  *  To suspend the processing of new tasks by workers
-- 
GitLab