Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rather call TRACE_end() at surf level.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 7 Oct 2013 15:51:13 +0000 (17:51 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Mon, 7 Oct 2013 16:25:53 +0000 (18:25 +0200)
src/simix/smx_global.c
src/surf/surf.c

index 7af670a..d91c628 100644 (file)
@@ -125,9 +125,6 @@ void SIMIX_global_init(int *argc, char **argv)
  */
 static void SIMIX_clean(void)
 {
  */
 static void SIMIX_clean(void)
 {
-#ifdef HAVE_TRACING
-  TRACE_end();
-#endif
 #ifdef TIME_BENCH_PER_SR
   smx_ctx_raw_new_sr();
 #endif
 #ifdef TIME_BENCH_PER_SR
   smx_ctx_raw_new_sr();
 #endif
index 3835bc6..8c3be87 100644 (file)
@@ -466,6 +466,11 @@ void surf_exit(void)
   unsigned int iter;
   surf_model_t model = NULL;
 
   unsigned int iter;
   surf_model_t model = NULL;
 
+#ifdef HAVE_TRACING
+  TRACE_end();                  /* Just in case it was not called by the upper
+                                 * layer (or there is no upper layer) */
+#endif
+
   sg_config_finalize();
 
   xbt_dynar_foreach(model_list, iter, model)
   sg_config_finalize();
 
   xbt_dynar_foreach(model_list, iter, model)