[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-200-g09c578f
Service Account
noreply at mpich.org
Thu Jul 9 15:02:32 CDT 2015
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 09c578fda2bd525e20061bdb124bde3ae817547d (commit)
via bc06d48e58d2a32184a82c8f9b3b23b4cda62889 (commit)
via 85aad78390f2df706a8dfeafd1e67042ec24c780 (commit)
from 029b27c1e0ab6b8709e724d153b5cca8c65fdc8a (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/09c578fda2bd525e20061bdb124bde3ae817547d
commit 09c578fda2bd525e20061bdb124bde3ae817547d
Author: Lena Oden <loden at anl.gov>
Date: Thu Jul 9 14:59:31 2015 -0500
Mark new comm_idup tests as xfail
diff --git a/test/mpi/comm/testlist b/test/mpi/comm/testlist
index ada42fe..5132e5b 100644
--- a/test/mpi/comm/testlist
+++ b/test/mpi/comm/testlist
@@ -29,8 +29,8 @@ comm_idup 4 mpiversion=3.0
comm_idup 9 mpiversion=3.0
comm_idup_mul 2 mpiversion=3.0
comm_idup_overlap 2 mpiversion=3.0
-comm_idup_iallreduce 6 mpiversion=3.0
-comm_idup_nb 6 mpiversion=3.0
+comm_idup_iallreduce 6 mpiversion=3.0 xfail=ticket2269
+comm_idup_nb 6 mpiversion=3.0 xfail=ticket2283
dup_with_info 2 mpiversion=3.0
dup_with_info 4 mpiversion=3.0
dup_with_info 9 mpiversion=3.0
http://git.mpich.org/mpich.git/commitdiff/bc06d48e58d2a32184a82c8f9b3b23b4cda62889
commit bc06d48e58d2a32184a82c8f9b3b23b4cda62889
Author: Lena Oden <loden at anl.gov>
Date: Thu Jul 9 13:12:29 2015 -0500
Add new test to overlab comm_idup with nb-coll.
This test test to overalb comm_idup with different
nonblocking collectives. Test on intra and inter-
communicators
Signed-off-by: Junchao Zhang <jczhang at mcs.anl.gov>
diff --git a/test/mpi/comm/Makefile.am b/test/mpi/comm/Makefile.am
index 5f1fe92..2739a40 100644
--- a/test/mpi/comm/Makefile.am
+++ b/test/mpi/comm/Makefile.am
@@ -37,5 +37,6 @@ noinst_PROGRAMS = \
comm_idup \
comm_idup_mul \
comm_idup_overlap \
+ comm_idup_nb \
comm_idup_iallreduce \
comm_info
diff --git a/test/mpi/comm/comm_idup_nb.c b/test/mpi/comm/comm_idup_nb.c
new file mode 100644
index 0000000..fe8e354
--- /dev/null
+++ b/test/mpi/comm/comm_idup_nb.c
@@ -0,0 +1,182 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2015 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mpi.h"
+#include "mpitest.h"
+
+
+#define ITERS 3
+
+
+
+int main(int argc, char **argv)
+{
+ int errs = 0;
+ int i, isleft;
+ MPI_Comm test_comm, new_comm[ITERS];
+ int in[ITERS], out[ITERS], sol;
+ int rank, size, rsize, rrank;
+ MPI_Request sreq[ITERS*2];
+
+ 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);
+ }
+
+ while (MTestGetIntracommGeneral(&test_comm, 1, 1)) {
+ if (test_comm == MPI_COMM_NULL) continue;
+ MPI_Comm_size(test_comm, &size);
+ MPI_Comm_rank(test_comm, &rank);
+
+ /* Ibarrier */
+ for(i = 0; i< ITERS; i++) {
+ MPI_Ibarrier(test_comm, &sreq[i]);
+ MPI_Comm_idup(test_comm, &new_comm[i], &sreq[i+ITERS]);
+ }
+ MPI_Waitall(ITERS*2, sreq, MPI_STATUS_IGNORE);
+
+ for(i = 0; i< ITERS; i++) {
+ errs += MTestTestComm(new_comm[i]);
+ MPI_Comm_free(&new_comm[i]);
+ }
+ /*Ibcast */
+ for(i = 0; i< ITERS; i++) {
+ if(rank == 0)
+ in[i] = 815;
+ else
+ in[i] = 10;
+ MPI_Ibcast(&in[i], 1, MPI_INT, 0,test_comm, &sreq[i]);
+ MPI_Comm_idup(test_comm, &new_comm[i], &sreq[i+ITERS]);
+ }
+ sol = 815;
+ MPI_Waitall(ITERS*2, sreq, MPI_STATUS_IGNORE);
+
+ for(i = 0; i< ITERS; i++) {
+ if(in[i]!= sol) errs++;
+ errs += MTestTestComm(new_comm[i]);
+ MPI_Comm_free(&new_comm[i]);
+ }
+ /* Iallreduce */
+ for(i = 0; i< ITERS; i++) {
+ in[i] = 1;
+ MPI_Iallreduce(&in[i], &out[i], 1, MPI_INT, MPI_SUM,test_comm, &sreq[i]);
+ MPI_Comm_idup(test_comm, &new_comm[i], &sreq[i+ITERS]);
+ }
+ sol = size;
+ MPI_Waitall(ITERS*2, sreq, MPI_STATUS_IGNORE);
+
+ for(i = 0; i< ITERS; i++) {
+ if(out[i]!= sol) errs++;
+ errs += MTestTestComm(new_comm[i]);
+ MPI_Comm_free(&new_comm[i]);
+ }
+ /* Isann */
+ for(i = 0; i< ITERS; i++) {
+ MPI_Iscan(&rank, &out[i], 1, MPI_INT, MPI_SUM, test_comm, &sreq[i]);
+ MPI_Comm_idup(test_comm, &new_comm[i], &sreq[i+ITERS]);
+ }
+ sol = rank*(rank+1)/2;
+ MPI_Waitall(ITERS*2, sreq, MPI_STATUS_IGNORE);
+
+ for(i = 0; i< ITERS; i++) {
+ if(out[i]!= sol) errs++;
+ errs += MTestTestComm(new_comm[i]);
+ MPI_Comm_free(&new_comm[i]);
+ }
+ /*Ibcast */
+ for(i = 0; i< ITERS; i++) {
+ if(rank == 0)
+ in[i] = 815;
+ else
+ in[i] = 10;
+ MPI_Ibcast(&in[i], 1, MPI_INT, 0,test_comm, &sreq[i]);
+ MPI_Comm_idup(test_comm, &new_comm[i], &sreq[i+ITERS]);
+ }
+ sol = 815;
+ MPI_Waitall(ITERS*2, sreq, MPI_STATUS_IGNORE);
+
+
+ }
+/* Now the test for inter-communicators */
+ while (MTestGetIntercomm(&test_comm, &isleft, 1)) {
+ if (test_comm == MPI_COMM_NULL) continue;
+
+ MPI_Comm_size(test_comm, &size);
+ MPI_Comm_rank(test_comm, &rank);
+
+ MPI_Comm_remote_size(test_comm, &rsize);
+ /* Ibarrier */
+
+
+ /* for(i = 0; i< ITERS; i++) {
+ MPI_Ibarrier(test_comm, &sreq[i]);
+ MPI_Comm_idup(test_comm, &new_comm[i], &sreq[i+ITERS]);
+ }
+ MPI_Waitall(ITERS*2, sreq, MPI_STATUS_IGNORE);
+ for(i = 0; i< ITERS; i++) {
+ if(in[i]!= sol) errs++;
+ errs += MTestTestComm(new_comm[i]);
+ MPI_Comm_free(&new_comm[i]);
+ }
+*/
+ /*Ibcast */
+ int root;
+ for(i = 0; i< ITERS; i++) {
+ if (isleft) {
+ if (rank == 0) {
+ root = MPI_ROOT;
+ in[i] = 815;
+ }
+ else {
+ root = MPI_PROC_NULL;
+ in[i]= 815; /* not needed, just to make correctness checking easier */
+ }
+ }
+ else {
+ root = 0;
+ in[i] = 213; /* garbage value */
+ }
+ MPI_Ibcast(&in[i], 1, MPI_INT, root,test_comm, &sreq[i]);
+ MPI_Comm_idup(test_comm, &new_comm[i], &sreq[i+ITERS]);
+ }
+ sol = 815;
+ MPI_Waitall(ITERS*2, sreq, MPI_STATUS_IGNORE);
+
+ for(i = 0; i< ITERS; i++) {
+ if(in[i]!= sol) errs++;
+ errs += MTestTestComm(new_comm[i]);
+ MPI_Comm_free(&new_comm[i]);
+ }
+ /* Iallreduce */
+ for(i = 0; i< ITERS; i++) {
+ in[i] = 1;
+ MPI_Iallreduce(&in[i], &out[i], 1, MPI_INT, MPI_SUM,test_comm, &sreq[i]);
+ MPI_Comm_idup(test_comm, &new_comm[i], &sreq[i+ITERS]);
+ }
+ sol = rsize;
+ MPI_Waitall(ITERS*2, sreq, MPI_STATUS_IGNORE);
+
+ for(i = 0; i< ITERS; i++) {
+ if(out[i]!= sol) errs++;
+ errs += MTestTestComm(new_comm[i]);
+ MPI_Comm_free(&new_comm[i]);
+ }
+
+
+ }
+ MTest_Finalize( errs );
+ MPI_Finalize();
+
+
+
+}
diff --git a/test/mpi/comm/testlist b/test/mpi/comm/testlist
index aa7eaa2..ada42fe 100644
--- a/test/mpi/comm/testlist
+++ b/test/mpi/comm/testlist
@@ -30,6 +30,7 @@ comm_idup 9 mpiversion=3.0
comm_idup_mul 2 mpiversion=3.0
comm_idup_overlap 2 mpiversion=3.0
comm_idup_iallreduce 6 mpiversion=3.0
+comm_idup_nb 6 mpiversion=3.0
dup_with_info 2 mpiversion=3.0
dup_with_info 4 mpiversion=3.0
dup_with_info 9 mpiversion=3.0
http://git.mpich.org/mpich.git/commitdiff/85aad78390f2df706a8dfeafd1e67042ec24c780
commit 85aad78390f2df706a8dfeafd1e67042ec24c780
Author: Lena Oden <loden at anl.gov>
Date: Wed Jul 1 15:03:29 2015 -0500
Add new comm_idup test: overlap with iallreduce
This new test for comm_idup overlap comm_idup with
iallreduce. The test uses different communicators
and different overlap scenarios.
Signed-off-by: Junchao Zhang <jczhang at mcs.anl.gov>
diff --git a/test/mpi/.gitignore b/test/mpi/.gitignore
index b8e0b16..86babec 100644
--- a/test/mpi/.gitignore
+++ b/test/mpi/.gitignore
@@ -127,6 +127,7 @@
/comm/commname
/comm/dupic
/comm/ctxalloc
+/comm/comm_idup_iallreduce
/cxx/testlist
/cxx/topo/testlist
/cxx/coll/uallreduce
diff --git a/test/mpi/comm/Makefile.am b/test/mpi/comm/Makefile.am
index 5602828..5f1fe92 100644
--- a/test/mpi/comm/Makefile.am
+++ b/test/mpi/comm/Makefile.am
@@ -37,4 +37,5 @@ noinst_PROGRAMS = \
comm_idup \
comm_idup_mul \
comm_idup_overlap \
+ comm_idup_iallreduce \
comm_info
diff --git a/test/mpi/comm/comm_idup_iallreduce.c b/test/mpi/comm/comm_idup_iallreduce.c
new file mode 100644
index 0000000..8aedd51
--- /dev/null
+++ b/test/mpi/comm/comm_idup_iallreduce.c
@@ -0,0 +1,220 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ * (C) 2015 by Argonne National Laboratory.
+ * See COPYRIGHT in top-level directory.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mpi.h"
+#include "mpitest.h"
+
+
+#define ITERS 10
+/* This test uses several scenarios to overlap iallreduce and comm_idup
+ * 1.) Use comm_idup dublicate the COMM_WORLD and do iallreduce
+ * on the COMM_WORLD
+ * 2.) Do the above test in a loop
+ * 3.) Dublicate COMM_WORLD, overalp iallreduce on one
+ * communicator with comm_idup on the nother communicator
+ * 4.) Split MPI_COMM_WORLD, communicate on the split communicator
+ while dublicating COMM_WORLD
+ * 5.) Duplicate the split communicators with comm_idup
+ * while communicating onCOMM_WORLD
+ * 6.) Ceate an inter-communicator and duplicate it with comm_idup while
+ * communicating on the inter-communicator
+ * 7.) Dublicate the inter-communicator whil communicate on COMM_WORLD
+ * 8.) Merge the inter-communicator to an intra-communicator and idup it,
+ * overlapping with communication on MPI_COMM_WORLD
+ * 9.) Communicate on the merge communicator, while duplicating COMM_WORLD
+*/
+
+
+
+int main(int argc, char **argv)
+{
+ int errs = 0;
+ int i;
+ int rank, size, lrank, lsize, rsize, isize;
+ int in, out, sol;
+
+ MPI_Comm newcomm, newcomm_v[ITERS], dup_comm, split, ic, merge;
+ MPI_Request sreq[ITERS*2];
+
+ 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);
+ }
+
+ /* set input buffer and compare buffer */
+ in = 1;
+ sol = size;
+ MPI_Comm_idup(MPI_COMM_WORLD, &newcomm, &sreq[0]);
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD, &sreq[1]);
+
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ /* Test results of overlapping allreduce */
+ if(sol != out)
+ errs++;
+ /*Test new communicator */
+ errs += MTestTestComm(newcomm);
+ MPI_Comm_free(&newcomm);
+
+ for(i = 0; i < ITERS; i++){
+ MPI_Comm_idup(MPI_COMM_WORLD, &newcomm_v[i], &sreq[i]);
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD, &sreq[i+ITERS]);
+ }
+ MPI_Waitall(ITERS*2,sreq, MPI_STATUS_IGNORE);
+
+ for( i = 0; i<ITERS ; i++) {
+ errs += MTestTestComm(newcomm_v[i]);
+ MPI_Comm_free(&newcomm_v[i]);
+ }
+
+
+ MPI_Comm_dup(MPI_COMM_WORLD, &dup_comm);
+
+
+ if(rank == 0) {
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD, &sreq[0]);
+ MPI_Comm_idup(dup_comm, &newcomm, &sreq[1]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+ else {
+ MPI_Comm_idup(dup_comm, &newcomm, &sreq[1]);
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD, &sreq[0]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+ /* Test Iallreduce */
+
+ if(sol != out) errs++;
+
+ /*Test new communicator */
+ errs += MTestTestComm(newcomm);
+
+ MPI_Comm_free(&newcomm);
+ MPI_Comm_free(&dup_comm);
+
+
+ MPI_Comm_split(MPI_COMM_WORLD, rank % 2, rank, &split);
+ MPI_Comm_rank(split, &lrank);
+ MPI_Comm_size(split, &lsize);
+
+ sol = lsize;
+ if(lrank == 0) {
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, split, &sreq[0]);
+ MPI_Comm_idup(MPI_COMM_WORLD, &newcomm, &sreq[1]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+ else {
+ MPI_Comm_idup(MPI_COMM_WORLD, &newcomm, &sreq[1]);
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, split, &sreq[0]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+ /* Test Iallreduce */
+ if(sol != out) errs++;;
+
+ /* Test new communicator */
+ errs += MTestTestComm(newcomm);
+ MPI_Comm_free(&newcomm);
+ sol = size;
+
+ if(lrank == 0) {
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD, &sreq[0]);
+ MPI_Comm_idup(split, &newcomm, &sreq[1]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+ else {
+ MPI_Comm_idup(split, &newcomm, &sreq[1]);
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD, &sreq[0]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+
+ /* Test Iallreduce */
+ if(sol != out) errs++;;
+
+ /* Test new communicator */
+ errs += MTestTestComm(newcomm);
+ MPI_Comm_free(&newcomm);
+
+ MPI_Intercomm_create(split, 0, MPI_COMM_WORLD, (rank == 0 ? 1 : 0), 1234, &ic);
+ MPI_Comm_remote_size(ic, &rsize);
+
+ sol = rsize;
+
+ MPI_Comm_idup(ic, &newcomm, &sreq[1]);
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, ic, &sreq[0]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+
+
+ if(sol != out) errs++;;
+ /* Test new inter communicator */
+ errs += MTestTestComm(newcomm);
+ MPI_Comm_free(&newcomm);
+
+ sol = lsize;
+ if(lrank == 0) {
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, split, &sreq[0]);
+ MPI_Comm_idup(ic, &newcomm, &sreq[1]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+ else {
+ MPI_Comm_idup(ic, &newcomm, &sreq[1]);
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, split, &sreq[0]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+ /* Test Iallreduce resutls for split-communicator*/
+ if(sol != out) errs++;;
+ /* Test new inter-communicator */
+
+ errs += MTestTestComm(newcomm);
+ MPI_Comm_free(&newcomm);
+
+
+ MPI_Intercomm_merge( ic, rank%2, &merge );
+ MPI_Comm_size(merge, &isize);
+
+ sol = size;
+ if(rank == 0) {
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD, &sreq[0]);
+ MPI_Comm_idup(merge, &newcomm, &sreq[1]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+ else {
+ MPI_Comm_idup(merge, &newcomm, &sreq[1]);
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD, &sreq[0]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+
+
+ if(sol != out) errs++;;
+ /* Test new communicator */
+ errs += MTestTestComm(newcomm);
+ MPI_Comm_free(&newcomm);
+ sol = isize;
+
+ if(rank == 0) {
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, merge, &sreq[0]);
+ MPI_Comm_idup(MPI_COMM_WORLD, &newcomm, &sreq[1]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+ else {
+ MPI_Comm_idup(MPI_COMM_WORLD, &newcomm, &sreq[1]);
+ MPI_Iallreduce(&in, &out, 1, MPI_INT, MPI_SUM, merge, &sreq[0]);
+ MPI_Waitall(2, sreq, MPI_STATUS_IGNORE);
+ }
+
+ MPI_Comm_free(&merge);
+ MPI_Comm_free(&newcomm);
+ MPI_Comm_free(&split);
+ MPI_Comm_free(&ic);
+
+ MTest_Finalize(errs);
+ MPI_Finalize();
+
+}
diff --git a/test/mpi/comm/testlist b/test/mpi/comm/testlist
index b3987af..aa7eaa2 100644
--- a/test/mpi/comm/testlist
+++ b/test/mpi/comm/testlist
@@ -29,6 +29,7 @@ comm_idup 4 mpiversion=3.0
comm_idup 9 mpiversion=3.0
comm_idup_mul 2 mpiversion=3.0
comm_idup_overlap 2 mpiversion=3.0
+comm_idup_iallreduce 6 mpiversion=3.0
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/.gitignore | 1 +
test/mpi/comm/Makefile.am | 2 +
test/mpi/comm/comm_idup_iallreduce.c | 220 ++++++++++++++++++++++++++++++++++
test/mpi/comm/comm_idup_nb.c | 182 ++++++++++++++++++++++++++++
test/mpi/comm/testlist | 2 +
5 files changed, 407 insertions(+), 0 deletions(-)
create mode 100644 test/mpi/comm/comm_idup_iallreduce.c
create mode 100644 test/mpi/comm/comm_idup_nb.c
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list