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 / no-error4-any_src.c
index ecadd93..c0ab9fc 100644 (file)
@@ -36,7 +36,7 @@ main (int argc, char **argv)
   }
   else {
     if (rank == 0) {
-      memset (buf0, 0, buf_size);
+      memset (buf0, 0, buf_size*sizeof(int));
 
       MPI_Send_init (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &aReq[0]);
       MPI_Recv_init (buf1, buf_size, MPI_INT,
@@ -47,13 +47,13 @@ main (int argc, char **argv)
 
       MPI_Waitall (2, aReq, aStatus);
 
-      memset (buf0, 1, buf_size);
+      memset (buf0, 1, buf_size*sizeof(int));
 
       MPI_Startall (2, aReq);
       MPI_Waitall (2, aReq, aStatus);
     }
     else if (rank == 1) {
-      memset (buf1, 1, buf_size);
+      memset (buf1, 1, buf_size*sizeof(int));
 
       MPI_Recv_init (buf0, buf_size, MPI_INT,
                     MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &aReq[0]);
@@ -64,7 +64,7 @@ main (int argc, char **argv)
 
       MPI_Waitall (2, aReq, aStatus);
 
-      memset (buf1, 0, buf_size);
+      memset (buf1, 0, buf_size*sizeof(int));
 
       MPI_Startall (2, aReq);
       MPI_Waitall (2, aReq, aStatus);