Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill trailing whitespaces in teshsuite/smpi/{isp,mpich3-test}.
[simgrid.git] / teshsuite / smpi / isp / umpire / bcast-deadlock.c
index eb1d7ba..66e7c38 100644 (file)
@@ -10,7 +10,7 @@ int
 main (int argc, char **argv)
 {
   int rank;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf0[buf_size];
@@ -24,16 +24,16 @@ main (int argc, char **argv)
   fflush (stdout);
 
   if (rank == 0) {
-    memset (buf0, 0, buf_size);
-    MPI_Bcast (buf0, buf_size, MPI_INT, 1, MPI_COMM_WORLD);    
-    MPI_Bcast (buf0, buf_size, MPI_INT, 0, MPI_COMM_WORLD);    
+    memset (buf0, 0, buf_size*sizeof(int));
+    MPI_Bcast (buf0, buf_size, MPI_INT, 1, MPI_COMM_WORLD);
+    MPI_Bcast (buf0, buf_size, MPI_INT, 0, MPI_COMM_WORLD);
   }
   else {
     if (rank == 1)
-      memset (buf1, 1, buf_size);
+      memset (buf1, 1, buf_size*sizeof(int));
 
-    MPI_Bcast (buf0, buf_size, MPI_INT, 0, MPI_COMM_WORLD);    
-    MPI_Bcast (buf0, buf_size, MPI_INT, 1, MPI_COMM_WORLD);    
+    MPI_Bcast (buf0, buf_size, MPI_INT, 0, MPI_COMM_WORLD);
+    MPI_Bcast (buf0, buf_size, MPI_INT, 1, MPI_COMM_WORLD);
   }
 
   MPI_Finalize ();