X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6f2e9113097b642198bdf52fc3a85a5593fa17cd..bb12a168512ced7a0f1e4924d367c87ed7c22d1c:/teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_create.c diff --git a/teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_create.c b/teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_create.c index 78beb4fb05..92df65d1f1 100644 --- a/teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_create.c +++ b/teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_create.c @@ -46,25 +46,25 @@ main (int argc, char **argv) INTERCOMM_CREATE_TAG, &intercomm); MPI_Comm_free (&temp); - + if (intercomm != MPI_COMM_NULL) { MPI_Comm_size (intercomm, &dnprocs); MPI_Comm_rank (intercomm, &drank); MPI_Comm_remote_size (intercomm, &rnprocs); - + if (rnprocs > drank) { if (rank % 2) { - memset (buf1, 1, buf_size); + memset (buf1, 1, buf_size*sizeof(int)); MPI_Recv (buf0, buf_size, MPI_INT, drank, 0, intercomm, &status); MPI_Send (buf1, buf_size, MPI_INT, drank, 0, intercomm); } else { - memset (buf0, 0, buf_size); - + memset (buf0, 0, buf_size*sizeof(int)); + MPI_Recv (buf1, buf_size, MPI_INT, drank, 0, intercomm, &status); - + MPI_Send (buf0, buf_size, MPI_INT, drank, 0, intercomm); } }