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 / send-recv-ok.c
index c85f143..e4325fb 100644 (file)
@@ -32,14 +32,14 @@ main (int argc, char **argv)
     }
   else if (rank == 0)
     {
-      memset (buf0, 0, buf_size);
+      memset (buf0, 0, buf_size*sizeof(int));
       MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
       MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
     }
   else if (rank == 1)
     {
       MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
-      memset (buf1, 1, buf_size);
+      memset (buf1, 1, buf_size*sizeof(int));
       MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
     }