Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Multiply memset size by size of element in umpire.
[simgrid.git] / teshsuite / smpi / isp / umpire / any_src-can-deadlock10_mod.c
index 25d2b5a..b80362f 100644 (file)
@@ -40,21 +40,21 @@ main (int argc, char **argv)
     }
   else if (rank == 0)
     {
-      MPI_Irecv (buf0, buf_size, MPI_INT, 
+      MPI_Irecv (buf0, buf_size, MPI_INT,
                 MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
 
       MPI_Recv (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD, &status);
 
       MPI_Send (buf1, buf_size, MPI_INT, 2, 0, MPI_COMM_WORLD);
 
-      MPI_Recv (buf1, buf_size, MPI_INT, 
+      MPI_Recv (buf1, buf_size, MPI_INT,
                MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &status);
 
       MPI_Wait (&req, &status);
     }
   else if (rank == 2)
     {
-      memset (buf0, 0, buf_size);
+      memset (buf0, 0, buf_size*sizeof(int));
 
     //  sleep (30);
 
@@ -66,7 +66,7 @@ main (int argc, char **argv)
     }
   else if (rank == 1)
     {
-      memset (buf1, 1, buf_size);
+      memset (buf1, 1, buf_size*sizeof(int));
 
      // sleep (60);