X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9b73466ada27682d1729f394549479da83ef4a99..68880b8ce3ff9ade9d9a872db8fa5cdfdff2c2b4:/teshsuite/smpi/mpich3-test/comm/dupic.c diff --git a/teshsuite/smpi/mpich3-test/comm/dupic.c b/teshsuite/smpi/mpich3-test/comm/dupic.c index 8a79fb5e9e..e3712769fa 100644 --- a/teshsuite/smpi/mpich3-test/comm/dupic.c +++ b/teshsuite/smpi/mpich3-test/comm/dupic.c @@ -8,7 +8,7 @@ #include #include "mpitest.h" -int main( int argc, char *argv[] ) +int main(int argc, char *argv[]) { int errs = 0; MPI_Comm comm, dupcomm, dupcomm2; @@ -18,78 +18,76 @@ int main( int argc, char *argv[] ) int r1buf, r2buf, s1buf, s2buf; int rank, isLeft; - MTest_Init( &argc, &argv ); - - while (MTestGetIntercomm( &comm, &isLeft, 2 )) { - if (comm == MPI_COMM_NULL) continue; + MTest_Init(&argc, &argv); - MPI_Comm_dup( comm, &dupcomm ); - - /* Check that there are separate contexts. We do this by setting - up nonblocking received on both communicators, and then - sending to them. If the contexts are different, tests on the - unsatisfied communicator should indicate no available message */ - MPI_Comm_rank( comm, &rank ); - if (rank == 0) { - s1buf = 456; - s2buf = 17; - r1buf = r2buf = -1; - /* These are send/receives to the process with rank zero - in the other group (these are intercommunicators) */ - MPI_Irecv( &r1buf, 1, MPI_INT, 0, 0, dupcomm, &rreq[0] ); - MPI_Irecv( &r2buf, 1, MPI_INT, 0, 0, comm, &rreq[1] ); - MPI_Send( &s2buf, 1, MPI_INT, 0, 0, comm ); - MPI_Waitsome(2, rreq, &count, indicies, MPI_STATUSES_IGNORE); - if (count != 1 || indicies[0] != 1) { - /* The only valid return is that exactly one message - has been received */ - errs++; - if (count == 1 && indicies[0] != 1) { - printf( "Error in context values for intercomm\n" ); - } - else if (count == 2) { - printf( "Error: two messages received!\n" ); - } - else { - int i; - printf( "Error: count = %d", count ); - for (i=0; i