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-wait-deadlock2.c
index e3503a1..1ab9cf9 100644 (file)
@@ -16,7 +16,6 @@ main (int argc, char **argv)
   int namelen = 128;
   int buf0[buf_size];
   int buf1[buf_size];
-  int i;
   MPI_Status status;
   MPI_Request req;
 
@@ -36,12 +35,12 @@ main (int argc, char **argv)
     }
   else if (rank == 0)
     {
-      memset (buf0, 0, buf_size);
+      memset (buf0, 0, buf_size*sizeof(int));
 
-      MPI_Irecv (buf1, buf_size, MPI_INT, 
+      MPI_Irecv (buf1, buf_size, MPI_INT,
                 MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
       printf("Proc 0:  Request number - %p\n",req);
-      
+
       MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
        
       MPI_Recv (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD, &status);
@@ -53,9 +52,9 @@ main (int argc, char **argv)
     }
   else if (rank == 1)
     {
-      memset (buf1, 1, buf_size);
+      memset (buf1, 1, buf_size*sizeof(int));
 
-      MPI_Irecv (buf1, buf_size, MPI_INT, 
+      MPI_Irecv (buf1, buf_size, MPI_INT,
                 MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
       printf("Proc 1:  Request number - %p\n",req);