This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "MPICH primary repository". The branch, master has been updated via 25e3a95390be3a7c79e65b21a67b8a1154d57fa2 (commit) via 21795c5ffb3c989a778647a76f737c1cee373d85 (commit) from 1e171ff6062d69d8d32a49373b60d4a8793bcee2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.mpich.org/mpich.git/commitdiff/25e3a95390be3a7c79e65b21a67b8a1154... commit 25e3a95390be3a7c79e65b21a67b8a1154d57fa2 Author: Ken Raffenetti <[email protected]> Date: Tue May 20 15:26:21 2014 -0500 type matching issues in pt2pt tests Orginally reported by Jeff Hammond, these pt2pt tests used incorrect MPI datatypes for the buffer provided. Fixes #1933 Signed-off-by: Rob Latham <[email protected]> diff --git a/test/mpi/pt2pt/bsendpending.c b/test/mpi/pt2pt/bsendpending.c index ab5a5d2..246f950 100644 --- a/test/mpi/pt2pt/bsendpending.c +++ b/test/mpi/pt2pt/bsendpending.c @@ -65,13 +65,13 @@ int main( int argc, char *argv[] ) } /* Initiate the bsends */ - MPI_Bsend( msg1, msgsize, MPI_CHAR, dest, 0, comm ); - MPI_Bsend( msg2, msgsize, MPI_CHAR, dest, 0, comm ); - MPI_Bsend( msg3, msgsize, MPI_CHAR, dest, 0, comm ); + MPI_Bsend( msg1, msgsize, MPI_UNSIGNED_CHAR, dest, 0, comm ); + MPI_Bsend( msg2, msgsize, MPI_UNSIGNED_CHAR, dest, 0, comm ); + MPI_Bsend( msg3, msgsize, MPI_UNSIGNED_CHAR, dest, 0, comm ); /* Synchronize with our partner */ - MPI_Sendrecv( NULL, 0, MPI_CHAR, dest, 10, - NULL, 0, MPI_CHAR, dest, 10, comm, MPI_STATUS_IGNORE ); + MPI_Sendrecv( NULL, 0, MPI_UNSIGNED_CHAR, dest, 10, + NULL, 0, MPI_UNSIGNED_CHAR, dest, 10, comm, MPI_STATUS_IGNORE ); /* Detach the buffers. There should be pending operations */ MPI_Buffer_detach ( &bufp, &outsize ); @@ -95,17 +95,17 @@ int main( int argc, char *argv[] ) } /* Wait for the synchronize */ - MPI_Sendrecv( NULL, 0, MPI_CHAR, source, 10, - NULL, 0, MPI_CHAR, source, 10, comm, MPI_STATUS_IGNORE ); + MPI_Sendrecv( NULL, 0, MPI_UNSIGNED_CHAR, source, 10, + NULL, 0, MPI_UNSIGNED_CHAR, source, 10, comm, MPI_STATUS_IGNORE ); /* Wait 2 seconds */ tstart = MPI_Wtime(); while (MPI_Wtime() - tstart < 2.0) ; /* Now receive the messages */ - MPI_Recv( msg1, msgsize, MPI_CHAR, source, 0, comm, &status1 ); - MPI_Recv( msg2, msgsize, MPI_CHAR, source, 0, comm, &status2 ); - MPI_Recv( msg3, msgsize, MPI_CHAR, source, 0, comm, &status3 ); + MPI_Recv( msg1, msgsize, MPI_UNSIGNED_CHAR, source, 0, comm, &status1 ); + MPI_Recv( msg2, msgsize, MPI_UNSIGNED_CHAR, source, 0, comm, &status2 ); + MPI_Recv( msg3, msgsize, MPI_UNSIGNED_CHAR, source, 0, comm, &status3 ); /* Check that we have the correct data */ for (i=0; i<msgsize; i++) { diff --git a/test/mpi/pt2pt/sendrecv3.c b/test/mpi/pt2pt/sendrecv3.c index e0c21a7..adce6db 100644 --- a/test/mpi/pt2pt/sendrecv3.c +++ b/test/mpi/pt2pt/sendrecv3.c @@ -45,7 +45,7 @@ int main( int argc, char *argv[] ) int *buf[MAX_NMSGS]; for (i=0; i<nmsg; i++) { - buf[i] = (int *)malloc( msgSize ); + buf[i] = (int *)malloc( msgSize * sizeof(int) ); if (!buf[i]) { fprintf( stderr, "Unable to allocate %d bytes\n", msgSize ); @@ -59,11 +59,11 @@ int main( int argc, char *argv[] ) MPI_STATUS_IGNORE ); /* Try to fill up the outgoing message buffers */ for (i=0; i<nmsg; i++) { - MPI_Isend( buf[i], msgSize, MPI_CHAR, partner, testnum, comm, + MPI_Isend( buf[i], msgSize, MPI_INT, partner, testnum, comm, &r[i] ); } for (i=0; i<nmsg; i++) { - MPI_Recv( buf[i], msgSize, MPI_CHAR, partner, testnum, comm, + MPI_Recv( buf[i], msgSize, MPI_INT, partner, testnum, comm, MPI_STATUS_IGNORE ); } MPI_Waitall( nmsg, r, MPI_STATUSES_IGNORE ); @@ -76,12 +76,12 @@ int main( int argc, char *argv[] ) /* Try to fill up the outgoing message buffers */ tsend = MPI_Wtime(); for (i=0; i<nmsg; i++) { - MPI_Isend( buf[i], msgSize, MPI_CHAR, partner, testnum, comm, + MPI_Isend( buf[i], msgSize, MPI_INT, partner, testnum, comm, &r[i] ); } tsend = MPI_Wtime() - tsend; for (i=0; i<nmsg; i++) { - MPI_Recv( buf[i], msgSize, MPI_CHAR, partner, testnum, comm, + MPI_Recv( buf[i], msgSize, MPI_INT, partner, testnum, comm, MPI_STATUS_IGNORE ); } MPI_Waitall( nmsg, r, MPI_STATUSES_IGNORE ); http://git.mpich.org/mpich.git/commitdiff/21795c5ffb3c989a778647a76f737c1cee... commit 21795c5ffb3c989a778647a76f737c1cee373d85 Author: Ken Raffenetti <[email protected]> Date: Tue May 20 15:25:31 2014 -0500 nonblocking collective test fixes The MPI_Ibcast portion of these tests inconsistently used a buffer alias. Some fixes were needed to avoid possible issues. 1. Declare 'buf_alias' as a 'signed char *' since we are working with integer values when maniuplating the data. 2. Calls to MPI_Ibcast with datatype MPI_SIGNED_CHAR should use 'buf_alias' in the buffer argument to avoid a compiler warning. Signed-off-by: Rob Latham <[email protected]> diff --git a/test/mpi/coll/nonblocking2.c b/test/mpi/coll/nonblocking2.c index a323596..9abdb75 100644 --- a/test/mpi/coll/nonblocking2.c +++ b/test/mpi/coll/nonblocking2.c @@ -60,7 +60,7 @@ int main(int argc, char **argv) int *rdispls = NULL; int *sendtypes = NULL; int *recvtypes = NULL; - char *buf_alias = NULL; + signed char *buf_alias = NULL; MPI_Request req; MPI_Init(&argc, &argv); @@ -96,7 +96,7 @@ int main(int argc, char **argv) } /* MPI_Ibcast (again, but designed to stress scatter/allgather impls) */ - buf_alias = (char *)buf; + buf_alias = (signed char *)buf; my_assert(COUNT*size*sizeof(int) > PRIME); /* sanity */ for (i = 0; i < PRIME; ++i) { if (rank == 0) @@ -107,7 +107,7 @@ int main(int argc, char **argv) for (i = PRIME; i < COUNT * size * sizeof(int); ++i) { buf_alias[i] = 0xbf; } - MPI_Ibcast(buf, PRIME, MPI_SIGNED_CHAR, 0, MPI_COMM_WORLD, &req); + MPI_Ibcast(buf_alias, PRIME, MPI_SIGNED_CHAR, 0, MPI_COMM_WORLD, &req); MPI_Wait(&req, MPI_STATUS_IGNORE); for (i = 0; i < PRIME; ++i) { if (buf_alias[i] != i) diff --git a/test/mpi/coll/nonblocking3.c b/test/mpi/coll/nonblocking3.c index e072def..77d28c8 100644 --- a/test/mpi/coll/nonblocking3.c +++ b/test/mpi/coll/nonblocking3.c @@ -141,7 +141,7 @@ static void start_random_nonblocking(MPI_Comm comm, unsigned int rndnum, MPI_Req int *rdispls = NULL; int *sendtypes = NULL; int *recvtypes = NULL; - char *buf_alias = NULL; + signed char *buf_alias = NULL; MPI_Comm_rank(comm, &rank); MPI_Comm_size(comm, &size); @@ -177,7 +177,7 @@ static void start_random_nonblocking(MPI_Comm comm, unsigned int rndnum, MPI_Req case 1: /* MPI_Ibcast (again, but designed to stress scatter/allgather impls) */ /* FIXME fiddle with PRIME and buffer allocation s.t. PRIME is much larger (1021?) */ - buf_alias = (char *)buf; + buf_alias = (signed char *)buf; my_assert(COUNT*size*sizeof(int) > PRIME); /* sanity */ for (i = 0; i < PRIME; ++i) { if (rank == 0) @@ -188,7 +188,7 @@ static void start_random_nonblocking(MPI_Comm comm, unsigned int rndnum, MPI_Req for (i = PRIME; i < COUNT * size * sizeof(int); ++i) { buf_alias[i] = 0xbf; } - MPI_Ibcast(buf, PRIME, MPI_SIGNED_CHAR, 0, comm, req); + MPI_Ibcast(buf_alias, PRIME, MPI_SIGNED_CHAR, 0, comm, req); break; case 2: /* MPI_Ibarrier */ ----------------------------------------------------------------------- Summary of changes: test/mpi/coll/nonblocking2.c | 6 +++--- test/mpi/coll/nonblocking3.c | 6 +++--- test/mpi/pt2pt/bsendpending.c | 20 ++++++++++---------- test/mpi/pt2pt/sendrecv3.c | 10 +++++----- 4 files changed, 21 insertions(+), 21 deletions(-) hooks/post-receive -- MPICH primary repository