Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
updating traced IS NAS benchmark to get one category per MPI rank
[simgrid.git] / examples / smpi / NAS / IS-trace / is-trace.c
index f85c7c1..30aa5f7 100644 (file)
@@ -923,8 +923,6 @@ int main( int argc, char **argv )
 
     double          timecounter, maxtime;
 
-    TRACE_smpi_set_category ("start");
-
     global_data* gd = malloc(sizeof(global_data));
 /*  Initialize MPI */
     MPI_Init( &argc, &argv );
@@ -1029,19 +1027,17 @@ int main( int argc, char **argv )
     timer_start(gd, 2 );
 #endif
 
+    char smpi_category[100];
+    snprintf (smpi_category, 100, "%d", gd->my_rank);
+    TRACE_smpi_set_category (smpi_category);
+
 /*  This is the main iteration */
     for( iteration=1; iteration<=MAX_ITERATIONS; iteration++ )
     {
-        char it_str[100];
-        snprintf (it_str, 100, "i%d", iteration);
-        TRACE_smpi_set_category (it_str);
-
         if( gd->my_rank == 0 && CLASS != 'S' ) printf( "        %d\n", iteration );
         rank(gd,  iteration );
     }
-
-    TRACE_smpi_set_category ("finalize");
-
+    TRACE_smpi_set_category (NULL);
 
 #ifdef  TIMING_ENABLED
     timer_stop(gd, 2 );