Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
updating tracing examples according to new TRACE_start and xbt configuration options
[simgrid.git] / examples / msg / tracing / categories.c
index 585f409..e84e9dd 100644 (file)
@@ -1,6 +1,5 @@
-/*     $Id$     */
-
-/* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved.        */
+/* Copyright (c) 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -98,10 +97,16 @@ MSG_error_t test_all(const char *platform_file,
 int main(int argc, char *argv[])
 {
   MSG_error_t res = MSG_OK;
-  int i;
+
+  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");
@@ -109,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();