Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
some cleaning in the NAS examples
[simgrid.git] / examples / smpi / NAS / EP / ep.c
index 961422a..5cf9d5f 100644 (file)
@@ -6,6 +6,8 @@
 #include "mpi.h"
 #include "npbparams.h"
 
+#include "simgrid/instr.h" //TRACE_
+
 #include "randlc.h"
 
 #ifndef CLASS
       double *x = (double *) malloc (2*nk*sizeof(double));
       double *q = (double *) malloc (nq*sizeof(double));
 
+      TRACE_smpi_set_category ("start");
+
       MPI_Init( &argc, &argv );
       MPI_Comm_size( MPI_COMM_WORLD, &no_nodes);
       MPI_Comm_rank( MPI_COMM_WORLD, &node);
     */
         MPI_Barrier( MPI_COMM_WORLD );
 
+        TRACE_smpi_set_category ("ep");
+
         timer_clear(&(elapsed[1]));
         timer_clear(&(elapsed[2]));
         timer_clear(&(elapsed[3]));
     timer_stop(2,elapsed,start);
       }
 
+    TRACE_smpi_set_category ("finalize");
+
       //int MPI_Allreduce(void *sbuf, void *rbuf, int count, MPI_Datatype dtype, MPI_Op op, MPI_Comm comm)   
   MPI_Allreduce(&sx, x, 1, MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
   sx = x[0]; //FIXME :  x[0] or x[1] => x[0] because fortran starts with 1