[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-52-g125304f

Service Account noreply at mpich.org
Thu Jun 11 08:58:28 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  125304f7bd5c1cf48d6df8e6a0a2a0d25196907e (commit)
       via  910b30b04f503afc9d0be88bc8b91886d51c7514 (commit)
      from  4b688bf23ab0a7f2f776e5229def7d65bbddfedd (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/125304f7bd5c1cf48d6df8e6a0a2a0d25196907e

commit 125304f7bd5c1cf48d6df8e6a0a2a0d25196907e
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Wed Jun 10 15:47:34 2015 -0500

    Fix in Nemesis: assign sreq to shm_active_send when headers are sent.
    
    In Nemesis, MPIDI_CH3I_shm_active_send stores the request pointer
    that is currently involved in active sending, which means the headers
    are already sent out, but the data is not sent out yet.
    MPIDI_CH3I_Shm_send_progress() function will go over the request
    queue and make progress when either (1) MPIDI_CH3I_shm_active_send
    is not NULL or (2) queue head is not NULL. For (1), API that
    only sends the data is called, otherwise, API that sends both
    headers and data is called.
    
    Originally in MPIDI_CH3I_iSendv(), MPIDI_CH3I_shm_active_send is set
    even though headers are not sent out, which is not correct since
    MPIDI_CH3I_Shm_send_progress() function will trigger the API
    that only tries to send the data. This patch fixes this issue.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c b/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
index 26125c5..50cb7af 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_isendv.c
@@ -110,7 +110,12 @@ int MPIDI_CH3_iSendv (MPIDI_VC_t *vc, MPID_Request *sreq, MPID_IOV *iov, int n_i
 	    sreq->ch.vc = vc;
 	    MPIDI_CH3I_Sendq_enqueue(&MPIDI_CH3I_shm_sendq, sreq);
 	    MPIU_Assert (MPIDI_CH3I_shm_active_send == NULL);
-	    MPIDI_CH3I_shm_active_send = sreq;
+
+            if (remaining_iov != iov) {
+                /* headers are sent, mark current sreq as active_send req */
+                MPIDI_CH3I_shm_active_send = sreq;
+            }
+
             MPIU_DBG_MSG (CH3_CHANNEL, VERBOSE, "  enqueued");
 	}
 	else

http://git.mpich.org/mpich.git/commitdiff/910b30b04f503afc9d0be88bc8b91886d51c7514

commit 910b30b04f503afc9d0be88bc8b91886d51c7514
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date:   Wed Jun 10 08:41:40 2015 -0500

    Add a test for large ACC operations working with MPI_Win_flush_local.
    
    Signed-off-by: Pavan Balaji <balaji at anl.gov>

diff --git a/test/mpi/rma/Makefile.am b/test/mpi/rma/Makefile.am
index 5c6de78..f27e3be 100644
--- a/test/mpi/rma/Makefile.am
+++ b/test/mpi/rma/Makefile.am
@@ -146,7 +146,8 @@ noinst_PROGRAMS =          \
     atomic_rmw_gacc	   \
     acc-pairtype           \
     manyget                \
-    derived-acc-flush_local
+    derived-acc-flush_local\
+    large-acc-flush_local
 
 if BUILD_MPIX_TESTS
 noinst_PROGRAMS += aint
diff --git a/test/mpi/rma/large-acc-flush_local.c b/test/mpi/rma/large-acc-flush_local.c
new file mode 100644
index 0000000..fd0a4fa
--- /dev/null
+++ b/test/mpi/rma/large-acc-flush_local.c
@@ -0,0 +1,73 @@
+/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
+/*
+ *  (C) 2015 by Argonne National Laboratory.
+ *      See COPYRIGHT in top-level directory.
+ */
+
+/* This code tests the case when origin process issues 10 ACC
+ * operations for each data size to the target process, and each
+ * operation is followed by a MPI_Win_flush_local. */
+
+/* FIXME: we should merge this into a comprehensive test for RMA
+ * operations + MPI_Win_flush_local. */
+
+#include "mpi.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <time.h>
+
+#define MIN_DATA_SIZE (262144)
+#define MAX_DATA_SIZE (8 * 262144)
+#define OPS_NUM 10
+#define LOOP 500
+
+int main(int argc, char *argv[])
+{
+    int rank, nproc, i, j;
+    MPI_Win win;
+    int *tar_buf = NULL;
+    int *orig_buf = NULL;
+    int data_size;
+
+    MPI_Init(&argc, &argv);
+
+    MPI_Comm_size(MPI_COMM_WORLD, &nproc);
+    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+
+    MPI_Alloc_mem(MAX_DATA_SIZE, MPI_INFO_NULL, &orig_buf);
+    MPI_Alloc_mem(MAX_DATA_SIZE, MPI_INFO_NULL, &tar_buf);
+
+    /* run this test for LOOP times */
+
+    for (j = 0; j < LOOP; j++) {
+
+        MPI_Win_create(tar_buf, MAX_DATA_SIZE, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &win);
+
+        MPI_Win_lock_all(0, win);
+
+        if (rank != 0) {
+            for (data_size = MIN_DATA_SIZE; data_size <= MAX_DATA_SIZE; data_size *= 2) {
+                for (i = 0; i < OPS_NUM; i++) {
+                    MPI_Accumulate(orig_buf, data_size, MPI_BYTE,
+                                   0, 0, data_size, MPI_BYTE, MPI_SUM, win);
+                    MPI_Win_flush_local(0, win);
+                }
+                MPI_Win_flush(0, win);
+            }
+        }
+
+        MPI_Win_unlock_all(win);
+
+        MPI_Win_free(&win);
+    }
+
+    if (rank == 0)
+        printf(" No Errors\n");
+
+    MPI_Free_mem(orig_buf);
+    MPI_Free_mem(tar_buf);
+
+    MPI_Finalize();
+
+    return 0;
+}
diff --git a/test/mpi/rma/testlist.in b/test/mpi/rma/testlist.in
index 9e680e6..e0f994b 100644
--- a/test/mpi/rma/testlist.in
+++ b/test/mpi/rma/testlist.in
@@ -135,6 +135,7 @@ aint 2 mpiversion=3.1
 acc-pairtype 2
 manyget 2
 derived-acc-flush_local 3 mpiversion=3.0
+large-acc-flush_local 3 mpiversion=3.0
 
 ## This test is not strictly correct.  This was meant to test out the
 ## case when MPI_Test is not nonblocking.  However, we ended up

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

Summary of changes:
 src/mpid/ch3/channels/nemesis/src/ch3_isendv.c |    7 ++-
 test/mpi/rma/Makefile.am                       |    3 +-
 test/mpi/rma/large-acc-flush_local.c           |   73 ++++++++++++++++++++++++
 test/mpi/rma/testlist.in                       |    1 +
 4 files changed, 82 insertions(+), 2 deletions(-)
 create mode 100644 test/mpi/rma/large-acc-flush_local.c


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list