[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.3-203-ga81ec2a

Service Account noreply at mpich.org
Thu Nov 13 15:11:38 CST 2014


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  a81ec2ac2bf2efcb02cbbd28aaf4b75174382f44 (commit)
      from  f759813f15708bebcb29e0942ed9af0fbc1154e0 (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/a81ec2ac2bf2efcb02cbbd28aaf4b75174382f44

commit a81ec2ac2bf2efcb02cbbd28aaf4b75174382f44
Author: Wesley Bland <wbland at anl.gov>
Date:   Thu Nov 13 15:09:36 2014 -0600

    Add test for revoke+shrink
    
    This tests the behavior after a failure when using revoke+shrink. Right
    now this test still fails so it is marked as xfail.
    
    See #2198
    
    No reviewer

diff --git a/test/mpi/ft/Makefile.am b/test/mpi/ft/Makefile.am
index 080e7dc..6440f30 100644
--- a/test/mpi/ft/Makefile.am
+++ b/test/mpi/ft/Makefile.am
@@ -13,4 +13,4 @@ include $(top_srcdir)/Makefile.mtest
 noinst_PROGRAMS = die abort sendalive isendalive senddead recvdead isenddead \
 		  irecvdead barrier gather reduce bcast scatter failure_ack \
 		  anysource revoke_nofail shrink agree multi_isendalive \
-		  agree_shrink
+		  agree_shrink revoke_shrink
diff --git a/test/mpi/ft/revoke_shrink.c b/test/mpi/ft/revoke_shrink.c
new file mode 100644
index 0000000..cba2e05
--- /dev/null
+++ b/test/mpi/ft/revoke_shrink.c
@@ -0,0 +1,67 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+#include <unistd.h>
+#include "mpi.h"
+
+MPI_Comm comm_all;
+
+void error_handler(MPI_Comm *communicator, int *error_code, ...) {
+    MPI_Comm *new_comm = malloc(sizeof(MPI_Comm));
+
+    MPIX_Comm_revoke(comm_all);
+    MPIX_Comm_shrink(comm_all, new_comm);
+
+    MPI_Comm_free(&comm_all);
+
+    comm_all = *new_comm;
+}
+
+int main(int argc, char *argv[]) {
+    int rank, size;
+    int sum = 0, val = 1;
+    int errs = 0;
+    MPI_Errhandler errhandler;
+
+    MPI_Init(&argc, &argv);
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    MPI_Comm_size(MPI_COMM_WORLD, &size);
+
+    if (size < 4) {
+        fprintf(stderr, "Must run with at least 4 processes.\n");
+        MPI_Abort(MPI_COMM_WORLD, 1);
+    }
+
+    MPI_Comm_dup(MPI_COMM_WORLD, &comm_all);
+
+    MPI_Comm_create_errhandler(&error_handler, &errhandler);
+    MPI_Comm_set_errhandler(comm_all, errhandler);
+
+    for (int i = 0; i < 10; ++i) {
+        MPI_Comm_size(comm_all, &size);
+        sum = 0;
+        if (i == 5 && rank == 1) {
+            exit(1);
+        } else if (i != 5) {
+            MPI_Allreduce(&val, &sum, 1, MPI_INT, MPI_SUM, comm_all);
+            if (sum != size && rank == 0) {
+                errs++;
+                fprintf(stderr, "Incorrect answer: %d != %d\n", sum, size);
+            }
+        }
+    }
+
+    if (0 == rank && errs) {
+        fprintf(stdout, " Found %d errors\n", errs);
+    } else if (0 == rank) {
+        fprintf(stdout, " No errors\n");
+    }
+
+    MPI_Comm_free(&comm_all);
+    MPI_Errhandler_free(&errhandler);
+
+    MPI_Finalize();
+
+    return 0;
+}
diff --git a/test/mpi/ft/testlist b/test/mpi/ft/testlist
index 604211a..582f06d 100644
--- a/test/mpi/ft/testlist
+++ b/test/mpi/ft/testlist
@@ -16,3 +16,4 @@ anysource 3 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTes
 revoke_nofail 2 env=MPIR_CVAR_ENABLE_FT=1 strict=false timeLimit=10
 shrink 8 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
 agree 4 env=MPIR_CVAR_ENABLE_FT=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10
+revoke_shrink 4 env=MPIR_CVAR_ENABLE=1 mpiexecarg=-disable-auto-cleanup resultTest=TestStatusNoErrors strict=false timeLimit=10 xfail=2198

-----------------------------------------------------------------------

Summary of changes:
 test/mpi/ft/Makefile.am     |    2 +-
 test/mpi/ft/revoke_shrink.c |   67 +++++++++++++++++++++++++++++++++++++++++++
 test/mpi/ft/testlist        |    1 +
 3 files changed, 69 insertions(+), 1 deletions(-)
 create mode 100644 test/mpi/ft/revoke_shrink.c


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list