Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into master
[simgrid.git] / teshsuite / smpi / isp / umpire / basic-deadlock-graph_create.c
index 2017b4c..fe3df2b 100644 (file)
@@ -39,7 +39,7 @@ main (int argc, char **argv)
   }
   else {
     /* create the graph on p.268 MPI: The Complete Reference... */
-    MPI_Graph_create (MPI_COMM_WORLD, GRAPH_SZ, 
+    MPI_Graph_create (MPI_COMM_WORLD, GRAPH_SZ,
                      graph_index, graph_edges, 1, &comm);
 
     if (comm != MPI_COMM_NULL) {
@@ -48,14 +48,14 @@ main (int argc, char **argv)
 
       if (dnprocs > 1) {
        if (drank == 0) {
-         memset (buf0, 0, buf_size);
+         memset (buf0, 0, buf_size*sizeof(int));
 
          MPI_Recv (buf1, buf_size, MPI_INT, 1, 0, comm, &status);
        
          MPI_Send (buf0, buf_size, MPI_INT, 1, 0, comm);
        }
        else if (drank == 1) {
-         memset (buf1, 1, buf_size);
+         memset (buf1, 1, buf_size*sizeof(int));
 
          MPI_Recv (buf0, buf_size, MPI_INT, 0, 0, comm, &status);