Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Oops. Forgot to commit the header.
authorgenaud <genaud@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 7 Jul 2009 17:30:44 +0000 (17:30 +0000)
committergenaud <genaud@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 7 Jul 2009 17:30:44 +0000 (17:30 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6456 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/smpi/barrier.c
include/smpi/smpi.h

index 31e605d..57dbab7 100644 (file)
@@ -12,9 +12,15 @@ int main (int argc, char **argv) {
          MPI_Comm_size(MPI_COMM_WORLD, &size);
          MPI_Comm_rank(MPI_COMM_WORLD, &rank);
 
+  start_timer = MPI_Wtime();
 
   MPI_Barrier( MPI_COMM_WORLD );
+
   MPI_Barrier( MPI_COMM_WORLD );
+  if (0 == rank) {
+          printf("... Barrier ....\n");
+          printf("Elapsed=%lf s\n", MPI_Wtime() - start_timer);
+  }
 
   MPI_Finalize();
   return 0;
index 32b4b14..af5a3e2 100644 (file)
@@ -52,6 +52,7 @@ SG_BEGIN_DECL()
        smpi_mpi_communicator_t mpi_comm_world;
 
        smpi_mpi_datatype_t mpi_byte;
+       smpi_mpi_datatype_t mpi_char;
        smpi_mpi_datatype_t mpi_int;
        smpi_mpi_datatype_t mpi_float;
        smpi_mpi_datatype_t mpi_double;
@@ -71,6 +72,7 @@ SG_BEGIN_DECL()
 #define MPI_STATUS_IGNORE NULL
 
 #define MPI_BYTE          (smpi_mpi_global->mpi_byte)
+#define MPI_CHAR          (smpi_mpi_global->mpi_char)
 #define MPI_INT           (smpi_mpi_global->mpi_int)
 #define MPI_FLOAT         (smpi_mpi_global->mpi_float)
 #define MPI_DOUBLE        (smpi_mpi_global->mpi_double)