Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
updating traced IS NAS benchmark to get one category per MPI rank
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 23 Sep 2010 09:06:44 +0000 (09:06 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 23 Sep 2010 09:06:44 +0000 (09:06 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8201 48e7efb5-ca39-0410-a469-dd3cf9ba447f

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;
 
 
     double          timecounter, maxtime;
 
-    TRACE_smpi_set_category ("start");
-
     global_data* gd = malloc(sizeof(global_data));
 /*  Initialize MPI */
     MPI_Init( &argc, &argv );
     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
 
     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++ )
     {
 /*  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 );
     }
         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 );
 
 #ifdef  TIMING_ENABLED
     timer_stop(gd, 2 );