Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
updating tracing examples according to new TRACE_start and xbt configuration options
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 5 Aug 2010 11:06:15 +0000 (11:06 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 5 Aug 2010 11:06:15 +0000 (11:06 +0000)
details:
- tesh files updated as well
- TRACE_start must be called *after* MSG_global_domain for MSG-based simulators

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8113 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/msg/tracing/categories.c
examples/msg/tracing/categories.tesh
examples/msg/tracing/ms.c
examples/msg/tracing/ms.tesh
examples/msg/tracing/procmig.c
examples/msg/tracing/procmig.tesh
examples/msg/tracing/tasks.c
examples/msg/tracing/tasks.tesh
examples/msg/tracing/volume.c
examples/msg/tracing/volume.tesh

index fd6033c..e84e9dd 100644 (file)
@@ -98,8 +98,15 @@ int main(int argc, char *argv[])
 {
   MSG_error_t res = MSG_OK;
 
+  MSG_global_init(&argc,argv);
+  if (argc < 3) {
+     printf ("Usage: %s platform_file deployment_file\n",argv[0]);
+     printf ("example: %s msg_platform.xml msg_deployment.xml\n",argv[0]);
+     exit(1);
+  }
+
   //starting the simulation tracing
-  TRACE_start ("categories.trace");
+  TRACE_start ();
 
   //declaring user categories
   TRACE_category ("compute");
@@ -107,12 +114,6 @@ int main(int argc, char *argv[])
   TRACE_category ("data");
   TRACE_category ("finalize");
 
-  MSG_global_init(&argc,argv);
-  if (argc < 3) {
-     printf ("Usage: %s platform_file deployment_file\n",argv[0]);
-     printf ("example: %s msg_platform.xml msg_deployment.xml\n",argv[0]);
-     exit(1);
-  }
   res = test_all(argv[1],argv[2]);
   MSG_clean();
 
index 3030027..c8e243a 100644 (file)
@@ -2,7 +2,9 @@
 
 p Tracing multiple categories master/slave application
 
-$ $SG_TEST_EXENV tracing/categories$EXEEXT ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/deployment.xml
+$ $SG_TEST_EXENV tracing/categories$EXEEXT --cfg=tracing/filename:categories.trace --cfg=tracing/platform:1 ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/deployment.xml
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'categories.trace'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/platform' to '1'
 > [4.018878] [msg_test/INFO] Simulation time 4.01888
 
 $ $SG_TEST_EXENV cat$EXEEXT ${srcdir:=.}/tracing/../categories.trace
index 94205ff..51e460f 100644 (file)
@@ -104,8 +104,15 @@ int main(int argc, char *argv[])
 {
   MSG_error_t res = MSG_OK;
 
+  MSG_global_init(&argc,argv);
+  if (argc < 3) {
+     printf ("Usage: %s platform_file deployment_file\n",argv[0]);
+     printf ("example: %s msg_platform.xml msg_deployment.xml\n",argv[0]);
+     exit(1);
+  }
+
   //starting the simulation tracing
-  TRACE_start ("ms.trace");
+  TRACE_start ();
 
   //declaring user variables
   TRACE_host_variable_declare ("is_slave");
@@ -117,12 +124,6 @@ int main(int argc, char *argv[])
   TRACE_category ("compute");
   TRACE_category ("finalize");
 
-  MSG_global_init(&argc,argv);
-  if (argc < 3) {
-     printf ("Usage: %s platform_file deployment_file\n",argv[0]);
-     printf ("example: %s msg_platform.xml msg_deployment.xml\n",argv[0]);
-     exit(1);
-  }
   res = test_all(argv[1],argv[2]);
   MSG_clean();
 
index 2e9c8e2..e5830e7 100644 (file)
@@ -2,7 +2,9 @@
 
 p Tracing master/slave application
 
-$ $SG_TEST_EXENV tracing/ms$EXEEXT ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/deployment.xml
+$ $SG_TEST_EXENV tracing/ms$EXEEXT --cfg=tracing/filename:ms.trace --cfg=tracing/platform:1 ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/deployment.xml
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'ms.trace'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/platform' to '1'
 > [4.441598] [msg_test/INFO] Simulation time 4.4416
 
 $ $SG_TEST_EXENV cat$EXEEXT ${srcdir:=.}/tracing/../ms.trace
index e72866f..c9ebc99 100644 (file)
@@ -42,10 +42,6 @@ int main(int argc, char *argv[])
 {
   MSG_error_t res = MSG_OK;
 
-  //starting the simulation trace
-  TRACE_start_with_mask ("procmig.trace", TRACE_PROCESS);
-  TRACE_category ("emigrant");
-
   /* Argument checking */
   MSG_global_init(&argc, argv);
   if (argc < 3) {
@@ -55,6 +51,10 @@ int main(int argc, char *argv[])
     exit(1);
   }
 
+  //starting the simulation trace
+  TRACE_start ();
+  TRACE_category ("emigrant");
+
   /* Simulation setting */
   MSG_create_environment(argv[1]);
 
index 735cf09..22c575e 100644 (file)
@@ -2,7 +2,9 @@
 
 p Tracing processes
 
-$ $SG_TEST_EXENV tracing/procmig$EXEEXT ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/procmig-deploy.xml
+$ $SG_TEST_EXENV tracing/procmig$EXEEXT --cfg=tracing/filename:procmig.trace --cfg=tracing/msg/process:1 ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/procmig-deploy.xml
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'procmig.trace'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/msg/process' to '1'
 > [Fafard:emigrant:(1) 0.000000] [msg_test/INFO] Setting process category
 > [Fafard:emigrant:(1) 2.000000] [msg_test/INFO] Migrating to Tremblay
 > [Tremblay:emigrant:(1) 4.000000] [msg_test/INFO] Migrating to Jupiter
index 0131208..2f28834 100644 (file)
@@ -101,19 +101,20 @@ int main(int argc, char *argv[])
 {
   MSG_error_t res = MSG_OK;
 
-  //starting the simulation tracing
-  TRACE_start_with_mask ("tasks.trace", TRACE_TASK);
-
-  //declaring user categories
-  TRACE_category ("compute");
-  TRACE_category ("finalize");
-
   MSG_global_init(&argc,argv);
   if (argc < 3) {
      printf ("Usage: %s platform_file deployment_file\n",argv[0]);
      printf ("example: %s msg_platform.xml msg_deployment.xml\n",argv[0]);
      exit(1);
   }
+
+  //starting the simulation tracing
+  TRACE_start ();
+
+  //declaring user categories
+  TRACE_category ("compute");
+  TRACE_category ("finalize");
+
   res = test_all(argv[1],argv[2]);
   MSG_clean();
 
index 57eb47c..bea3999 100644 (file)
@@ -2,7 +2,9 @@
 
 p Tracing tasks
 
-$ $SG_TEST_EXENV tracing/tasks$EXEEXT ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/deployment.xml
+$ $SG_TEST_EXENV tracing/tasks$EXEEXT --cfg=tracing/msg/task:1 --cfg=tracing/filename:tasks.trace ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/deployment.xml
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/msg/task' to '1'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'tasks.trace'
 > [Tremblay:master:(1) 0.000000] [msg_test/INFO] master 20 50000000.000000 1000000.000000 5
 > [Tremblay:slave:(2) 0.002339] [msg_test/INFO] Executing task 50000000.000000
 > [Jupiter:slave:(3) 0.168300] [msg_test/INFO] Executing task 50000000.000000
index b090ecd..c8ded0c 100644 (file)
@@ -105,11 +105,18 @@ int main(int argc, char *argv[])
 {
   MSG_error_t res = MSG_OK;
 
+  MSG_global_init(&argc,argv);
+  if (argc < 3) {
+     printf ("Usage: %s platform_file deployment_file\n",argv[0]);
+     printf ("example: %s msg_platform.xml msg_deployment.xml\n",argv[0]);
+     exit(1);
+  }
+
   //starting the simulation tracing with the TRACE_VOLUME mask
   // - the communication volume among processes expects that:
   //     - the processes involved have a category
   //     - the tasks sent have a category
-  TRACE_start_with_mask ("volume.trace", TRACE_VOLUME);
+  TRACE_start ();
 
   //declaring user categories (for tasks)
   TRACE_category ("compute");
@@ -121,12 +128,6 @@ int main(int argc, char *argv[])
   TRACE_category ("master");
   TRACE_category ("slave");
 
-  MSG_global_init(&argc,argv);
-  if (argc < 3) {
-     printf ("Usage: %s platform_file deployment_file\n",argv[0]);
-     printf ("example: %s msg_platform.xml msg_deployment.xml\n",argv[0]);
-     exit(1);
-  }
   res = test_all(argv[1],argv[2]);
   MSG_clean();
 
index 3f9c91e..a9f2328 100644 (file)
@@ -2,5 +2,7 @@
 
 p Tracing communications among processes of a master/slave application
 
-$ $SG_TEST_EXENV tracing/volume$EXEEXT ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/deployment.xml
+$ $SG_TEST_EXENV tracing/volume$EXEEXT --cfg=tracing/filename:volume.trace --cfg=tracing/msg/volume:1 ${srcdir:=.}/tracing/platform.xml ${srcdir:=.}/tracing/deployment.xml
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/filename' to 'volume.trace'
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'tracing/msg/volume' to '1'
 > [206.703278] [msg_test/INFO] Simulation time 206.703