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 cc6f9b7d56e6d94605651dfc9e51736374991b59 (commit) from c32221f8677d7772f06d2334e335fe2c6e50455a (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/cc6f9b7d56e6d94605651dfc9e51736374... commit cc6f9b7d56e6d94605651dfc9e51736374991b59 Author: Lena Oden <[email protected]> Date: Fri Jul 10 00:22:37 2015 -0500 New comm_idup test, overlap with isend/irecv diff --git a/test/mpi/comm/Makefile.am b/test/mpi/comm/Makefile.am index 2739a40..9617dee 100644 --- a/test/mpi/comm/Makefile.am +++ b/test/mpi/comm/Makefile.am @@ -37,6 +37,7 @@ noinst_PROGRAMS = \ comm_idup \ comm_idup_mul \ comm_idup_overlap \ + comm_idup_isend \ comm_idup_nb \ comm_idup_iallreduce \ comm_info diff --git a/test/mpi/comm/comm_idup_isend.c b/test/mpi/comm/comm_idup_isend.c new file mode 100644 index 0000000..43afd81 --- /dev/null +++ b/test/mpi/comm/comm_idup_isend.c @@ -0,0 +1,100 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "mpi.h" +#include "mpitest.h" + + +#define ITERS 4 + +int main(int argc, char **argv) +{ + int errs = 0; + int i,j; + int rank, size, rsize; + int in[ITERS], out[ITERS], sol[ITERS], cnt; + int isLeft; + MPI_Comm newcomm[ITERS], testcomm; + MPI_Request *sreq; + + MTest_Init( &argc, &argv ); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Comm_size(MPI_COMM_WORLD, &size); + if (size < 2) { + printf("this test requires at least 2 processes\n"); + MPI_Abort(MPI_COMM_WORLD, 1); + } + + + sreq = (MPI_Request*)malloc(sizeof(MPI_Request)*(size+1)*ITERS); + + while (MTestGetIntracommGeneral(&testcomm, 1, 1)) { + if (testcomm == MPI_COMM_NULL) continue; + + MPI_Comm_rank(testcomm, &rank); + MPI_Comm_size(testcomm, &size); + cnt = 0; + for(j = 0; j < ITERS; j++) { + if(rank == 0) { + out[j] = 815; + in[j] = 815; + sol[j] = 815; + for(i = 1; i<size; i++) + MPI_Isend(&out[j], 1, MPI_INT, i, 0, testcomm, &sreq[cnt++]); + MPI_Comm_idup(testcomm, &newcomm[j], &sreq[cnt++]); + } else { + out[j] = 0; + in[j] = 0; + sol[j] = 815; + MPI_Comm_idup(testcomm, &newcomm[j], &sreq[cnt++]); + MPI_Irecv(&in[j], 1, MPI_INT, 0, 0, testcomm, &sreq[cnt++]); + } + + } + MPI_Waitall(cnt, sreq, MPI_STATUS_IGNORE); + + for(j = 0; j < ITERS; j++) { + if(sol[j] != in[j]) errs++; + errs+=MTestTestComm(newcomm[j]); + MPI_Comm_free(&newcomm[j]); + } + MTestFreeComm(&testcomm); + } + while (MTestGetIntercomm(&testcomm, &isLeft, 1)) { + if (testcomm == MPI_COMM_NULL) continue; + + MPI_Comm_rank(testcomm, &rank); + MPI_Comm_size(testcomm, &size); + MPI_Comm_remote_size(testcomm, &rsize); + cnt = 0; + for(j = 0; j < ITERS; j++) { + if(rank == 0) { + out[j] = 815; + in[j] = 815; + sol[j] = 815; + for(i = 1; i<rsize; i++) + MPI_Isend(&out[j], 1, MPI_INT, i, 0, testcomm, &sreq[cnt++]); + MPI_Comm_idup(testcomm, &newcomm[j], &sreq[cnt++]); + } else { + out[j] = 0; + in[j] = 0; + sol[j] = 815; + MPI_Comm_idup(testcomm, &newcomm[j], &sreq[cnt++]); + MPI_Irecv(&in[j], 1, MPI_INT, 0, 0, testcomm, &sreq[cnt++]); + } + + } + MPI_Waitall(cnt, sreq, MPI_STATUS_IGNORE); + + for(j = 0; j < ITERS; j++) { + if(sol[j] != in[j]) errs++; + errs+=MTestTestComm(newcomm[j]); + MPI_Comm_free(&newcomm[j]); + } + MTestFreeComm(&testcomm); + } + + MTest_Finalize(errs); + MPI_Finalize(); + +} diff --git a/test/mpi/comm/testlist b/test/mpi/comm/testlist index 5132e5b..b75d295 100644 --- a/test/mpi/comm/testlist +++ b/test/mpi/comm/testlist @@ -31,6 +31,7 @@ comm_idup_mul 2 mpiversion=3.0 comm_idup_overlap 2 mpiversion=3.0 comm_idup_iallreduce 6 mpiversion=3.0 xfail=ticket2269 comm_idup_nb 6 mpiversion=3.0 xfail=ticket2283 +comm_idup_isend 6 mpiversion=3.0 xfail=ticket2269 dup_with_info 2 mpiversion=3.0 dup_with_info 4 mpiversion=3.0 dup_with_info 9 mpiversion=3.0 ----------------------------------------------------------------------- Summary of changes: test/mpi/comm/Makefile.am | 1 + test/mpi/comm/comm_idup_isend.c | 100 +++++++++++++++++++++++++++++++++++++++ test/mpi/comm/testlist | 1 + 3 files changed, 102 insertions(+), 0 deletions(-) create mode 100644 test/mpi/comm/comm_idup_isend.c hooks/post-receive -- MPICH primary repository