[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b4-78-g6b640b5

Service Account noreply at mpich.org
Thu Aug 6 12:49:11 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  6b640b5f0aa5886add15e38c6eb77e41196605f7 (commit)
       via  541429d3685946446138c89583dceb86855cd04e (commit)
      from  f6277dbb69ee729c098f8ba811e4c39ad5c41bb0 (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/6b640b5f0aa5886add15e38c6eb77e41196605f7

commit 6b640b5f0aa5886add15e38c6eb77e41196605f7
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 5 13:02:43 2015 -0500

    Minor cleanup for context_id allocation
    
    Signed-off-by: Lena Oden <loden at anl.gov>

diff --git a/src/mpi/comm/commutil.c b/src/mpi/comm/commutil.c
index 4bc328d..2b6bd31 100644
--- a/src/mpi/comm/commutil.c
+++ b/src/mpi/comm/commutil.c
@@ -1015,12 +1015,12 @@ int MPIR_Get_contextid_sparse_group(MPID_Comm *comm_ptr, MPID_Group *group_ptr,
              * context ID space doesn't matter.  Set the mask to "all available". */
             memset(local_mask, 0xff, MPIR_MAX_CONTEXT_MASK * sizeof(int));
         }
+        else if (comm_ptr->idup_count && seqnum != comm_ptr->idup_next_seqnum) {
+            memset(local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
+        }
         else {
             MPIU_Memcpy(local_mask, context_mask, MPIR_MAX_CONTEXT_MASK * sizeof(int));
         }
-        if (comm_ptr->idup_count && seqnum != comm_ptr->idup_next_seqnum) {
-            memset(local_mask, 0, MPIR_MAX_CONTEXT_MASK * sizeof(int));
-        }
 
         /* Note that this is the unthreaded version */
         /* Comm must be an intracommunicator */

http://git.mpich.org/mpich.git/commitdiff/541429d3685946446138c89583dceb86855cd04e

commit 541429d3685946446138c89583dceb86855cd04e
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Aug 5 11:04:29 2015 -0500

    Added a new test for duping many comms with idup.
    
    Signed-off-by: Lena Oden <loden at anl.gov>

diff --git a/test/mpi/errors/comm/Makefile.am b/test/mpi/errors/comm/Makefile.am
index 598030b..5957b13 100644
--- a/test/mpi/errors/comm/Makefile.am
+++ b/test/mpi/errors/comm/Makefile.am
@@ -12,5 +12,5 @@ EXTRA_DIST = testlist
 ## for all programs that are just built from the single corresponding source
 ## file, we don't need per-target _SOURCES rules, automake will infer them
 ## correctly
-noinst_PROGRAMS = cfree ccreate1 manysplit userdup too_many_comms too_many_comms2 too_many_comms3
+noinst_PROGRAMS = cfree ccreate1 manysplit userdup too_many_comms too_many_comms2 too_many_comms3 too_many_icomms
 
diff --git a/test/mpi/errors/comm/testlist b/test/mpi/errors/comm/testlist
index 6875502..d5c58e1 100644
--- a/test/mpi/errors/comm/testlist
+++ b/test/mpi/errors/comm/testlist
@@ -3,5 +3,6 @@ ccreate1 8
 userdup 4
 manysplit 4
 too_many_comms 4 strict=FALSE
+too_many_icomms 4 strict=FALSE
 too_many_comms2 4 strict=FALSE
 too_many_comms3 4 strict=FALSE
diff --git a/test/mpi/errors/comm/too_many_icomms.c b/test/mpi/errors/comm/too_many_icomms.c
new file mode 100644
index 0000000..a91d4eb
--- /dev/null
+++ b/test/mpi/errors/comm/too_many_icomms.c
@@ -0,0 +1,67 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *
+ *  (C) 2015 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+/* This test attempts to create a large number of communicators, in an effort
+ * to exceed the number of communicators that the MPI implementation can
+ * provide.  It checks that the implementation detects this error correctly
+ * handles it.
+ */
+
+/* In this version, we duplicate MPI_COMM_WORLD in a non-blocking
+ * fashion until we run out of context IDs. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <mpi.h>
+#include "mpitest.h"
+
+#define MAX_NCOMM 100000
+
+static const int verbose = 0;
+
+int main(int argc, char **argv)
+{
+    int rank, nproc, mpi_errno;
+    int i, ncomm;
+    int errors = 1;
+    MPI_Comm *comm_hdls;
+    MPI_Request req;
+
+    MPI_Init(&argc, &argv);
+
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+    MPI_Comm_size(MPI_COMM_WORLD, &nproc);
+
+    MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
+    comm_hdls = malloc(sizeof(MPI_Comm) * MAX_NCOMM);
+
+
+    ncomm = 0;
+    for (i = 0; i < MAX_NCOMM; i++) {
+        /* Note: the comms we create are all dups of MPI_COMM_WORLD */
+        MPI_Comm_idup(MPI_COMM_WORLD, &comm_hdls[i], &req);
+        mpi_errno = MPI_Wait(&req,MPI_STATUSES_IGNORE);
+        if (mpi_errno == MPI_SUCCESS) {
+            ncomm++;
+        }
+        else {
+            if (verbose)
+                printf("%d: Error creating comm %d\n", rank, i);
+            errors = 0;
+            break;
+        }
+    }
+
+    for (i = 0; i < ncomm; i++)
+        MPI_Comm_free(&comm_hdls[i]);
+
+    free(comm_hdls);
+    MTest_Finalize(errors);
+    MPI_Finalize();
+
+    return 0;
+}

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

Summary of changes:
 src/mpi/comm/commutil.c                            |    6 +++---
 test/mpi/errors/comm/Makefile.am                   |    2 +-
 test/mpi/errors/comm/testlist                      |    1 +
 .../comm/{too_many_comms.c => too_many_icomms.c}   |   12 +++++++-----
 4 files changed, 12 insertions(+), 9 deletions(-)
 copy test/mpi/errors/comm/{too_many_comms.c => too_many_icomms.c} (82%)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list