if (!sbuf || !rbuf) {
fprintf( stderr, "Could not allocated buffers!\n" );
MPI_Abort( comm, 1 );
+ exit(1);
}
/* Load up the buffers */
if (!sendcounts || !recvcounts || !rdispls || !sdispls) {
fprintf( stderr, "Could not allocate arg items!\n" );
MPI_Abort( comm, 1 );
+ exit(1);
}
for (i=0; i<size; i++) {
sendcounts[i] = i;
if (!rbuf) {
fprintf( stderr, "Could not reallocate rbuf!\n" );
MPI_Abort( comm, 1 );
+ exit(1);
}
/* Load up the buffers */
}
}
}
+
+ /* Check to make sure that aliasing is disallowed correctly */
+ MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+ if (MPI_SUCCESS == MPI_Alltoallv(rbuf, recvcounts, rdispls, MPI_INT,
+ rbuf, recvcounts, rdispls, MPI_INT, comm))
+ err++;
#endif
free( rdispls );