Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SD_init and SD_exit call TRACE_start/end if tracing is enabled
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 23 Nov 2010 15:30:45 +0000 (15:30 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 23 Nov 2010 15:30:45 +0000 (15:30 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8621 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/simdag/dax/dax_test.c
examples/simdag/dot/dot_test.c
examples/simdag/simdag_trace.c
src/simdag/sd_global.c

index 741f5a1..8ae9424 100644 (file)
@@ -33,9 +33,6 @@ int main(int argc, char **argv)
 
   /* initialisation of SD */
   SD_init(&argc, argv);
 
   /* initialisation of SD */
   SD_init(&argc, argv);
-#ifdef HAVE_TRACING
-  TRACE_start ();
-#endif
 
   /* Check our arguments */
   if (argc < 3) {
 
   /* Check our arguments */
   if (argc < 3) {
@@ -139,8 +136,5 @@ int main(int argc, char **argv)
 
   /* exit */
   SD_exit();
 
   /* exit */
   SD_exit();
-#ifdef HAVE_TRACING
-  TRACE_end();
-#endif
   return 0;
 }
   return 0;
 }
index 319be24..4a6da7b 100644 (file)
@@ -25,8 +25,6 @@ int main(int argc, char **argv)
   /* initialisation of SD */
   SD_init(&argc, argv);
 
   /* initialisation of SD */
   SD_init(&argc, argv);
 
-  TRACE_start ();
-
   /* Check our arguments */
   if (argc < 3) {
     INFO1("Usage: %s platform_file dot_file [trace_file]", argv[0]);
   /* Check our arguments */
   if (argc < 3) {
     INFO1("Usage: %s platform_file dot_file [trace_file]", argv[0]);
@@ -124,7 +122,5 @@ int main(int argc, char **argv)
 
   /* exit */
   SD_exit();
 
   /* exit */
   SD_exit();
-
-  TRACE_end();
   return 0;
 }
   return 0;
 }
index 3ec3954..d5e2e57 100644 (file)
@@ -30,8 +30,6 @@ int main(int argc, char **argv)
   /* initialisation of SD */
   SD_init(&argc, argv);
 
   /* initialisation of SD */
   SD_init(&argc, argv);
 
-  TRACE_start ();
-
   /*  xbt_log_control_set("sd.thres=debug"); */
 
   if (argc < 2) {
   /*  xbt_log_control_set("sd.thres=debug"); */
 
   if (argc < 2) {
@@ -136,6 +134,5 @@ int main(int argc, char **argv)
   DEBUG0("Tasks destroyed. Exiting SimDag...");
 
   SD_exit();
   DEBUG0("Tasks destroyed. Exiting SimDag...");
 
   SD_exit();
-  TRACE_end();
   return 0;
 }
   return 0;
 }
index ff315b3..d7c9596 100644 (file)
@@ -87,6 +87,10 @@ void SD_init(int *argc, char **argv)
 
   xbt_cfg_setdefault_string(_surf_cfg_set, "workstation/model",
                             "ptask_L07");
 
   xbt_cfg_setdefault_string(_surf_cfg_set, "workstation/model",
                             "ptask_L07");
+
+#ifdef HAVE_TRACING
+  TRACE_start ();
+#endif
 }
 
 /**
 }
 
 /**
@@ -404,6 +408,9 @@ void SD_exit(void)
     WARN0("SD_exit() called, but SimDag is not running");
     /* we cannot use exceptions here because xbt is not running! */
   }
     WARN0("SD_exit() called, but SimDag is not running");
     /* we cannot use exceptions here because xbt is not running! */
   }
+#ifdef HAVE_TRACING
+  TRACE_end();
+#endif
 }
 
 /**
 }
 
 /**