X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a286e57018d2ef03257affb9fe1e73e0b8d08a3d..8f3f2a19b6b88f3f810ae59aa54920df7ddff7f2:/teshsuite/smpi/mpich-test/pt2pt/sndrcvrep.c diff --git a/teshsuite/smpi/mpich-test/pt2pt/sndrcvrep.c b/teshsuite/smpi/mpich-test/pt2pt/sndrcvrep.c index 87b599935d..b4955aa24f 100644 --- a/teshsuite/smpi/mpich-test/pt2pt/sndrcvrep.c +++ b/teshsuite/smpi/mpich-test/pt2pt/sndrcvrep.c @@ -50,12 +50,17 @@ int main( int argc, char **argv ) count = 0; sendtag = 1; recvtag = 1; - MPI_Sendrecv_replace( buf, count, dtype, dest, - sendtag, source, recvtag, MPI_COMM_WORLD, &status ); - MPI_Get_count( &status, dtype, &len ); - if (len != 0) { - errcnt ++; - fprintf( stderr, "Computed %d for count, should be %d\n", len, 0 ); + rc = MPI_Sendrecv_replace( buf, count, dtype, dest, + sendtag, source, recvtag, MPI_COMM_WORLD, &status ); + if (rc) { + errcnt++; + fprintf( stderr, "Failed with non-contiguous datatype (error = %d)\n", rc); + } else { + MPI_Get_count( &status, dtype, &len ); + if (len != 0) { + errcnt ++; + fprintf( stderr, "Computed %d for count, should be %d\n", len, 0 ); + } } MPI_Type_free( &dtype );