[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.0.4-164-g07de139

mysql vizuser noreply at mpich.org
Tue May 7 15:50:26 CDT 2013


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  07de139fa7b3cba2894ddf61cc73854384f3e50f (commit)
       via  bd899327f783a3a085f64e5830d8435dca22714d (commit)
       via  4450a0a2f0519d4f384da21b110ab7135d31791f (commit)
      from  058286b1b5308c965c4790878a49dbb3ffa1fcdf (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/07de139fa7b3cba2894ddf61cc73854384f3e50f

commit 07de139fa7b3cba2894ddf61cc73854384f3e50f
Author: James Dinan <dinan at mcs.anl.gov>
Date:   Tue May 7 14:22:48 2013 -0500

    Remove unnecessary myrank field in MPID_Win
    
    Myrank was caching win_ptr->comm_ptr->rank, so we now use that directly
    rather than caching it in the MPID_Win object.
    
    Reviewer: balaji

diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
index 6aa1729..09b101b 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
@@ -79,7 +79,7 @@ int MPIDI_CH3_SHM_Win_free(MPID_Win **win_ptr)
     /* Free shared process mutex memory region */
     if ((*win_ptr)->shm_mutex) {
 
-        if ((*win_ptr)->myrank == 0) {
+        if ((*win_ptr)->comm_ptr->rank == 0) {
             MPIDI_CH3I_SHM_MUTEX_DESTROY(*win_ptr);
         }
 
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 3a23e5b..62c78a9 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -257,8 +257,6 @@ struct MPIDI_Win_target_state {
 };
 
 #define MPIDI_DEV_WIN_DECL                                               \
-    int myrank;            /* Rank of this process in comm (used to      \
-                              detect operations on self) */              \
     volatile int my_counter;  /* completion counter for operations       \
                                  targeting this window */                \
     void **base_addrs;     /* array of base addresses of the windows of  \
diff --git a/src/mpid/ch3/src/ch3u_rma_acc_ops.c b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
index 29a46b1..f50e6b1 100644
--- a/src/mpid/ch3/src/ch3u_rma_acc_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_acc_ops.c
@@ -52,7 +52,7 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
         goto fn_exit;
     }
 
-    rank = win_ptr->myrank;
+    rank = win_ptr->comm_ptr->rank;
 
     origin_predefined = TRUE; /* quiet uninitialized warnings (b/c goto) */
     if (op != MPI_NO_OP) {
@@ -286,7 +286,7 @@ int MPIDI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
     MPIU_ERR_CHKANDJUMP(win_ptr->epoch_state == MPIDI_EPOCH_NONE,
                         mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
 
-    rank = win_ptr->myrank;
+    rank = win_ptr->comm_ptr->rank;
 
     /* The datatype must be predefined, and one of: C integer, Fortran integer,
      * Logical, Multi-language types, or Byte.  This is checked above the ADI,
@@ -393,7 +393,7 @@ int MPIDI_Fetch_and_op(const void *origin_addr, void *result_addr,
     MPIU_ERR_CHKANDJUMP(win_ptr->epoch_state == MPIDI_EPOCH_NONE,
                         mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
 
-    rank = win_ptr->myrank;
+    rank = win_ptr->comm_ptr->rank;
 
     /* The datatype and op must be predefined.  This is checked above the ADI,
      * so there's no need to check it again here. */
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index f2fc7ca..95d47b9 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -207,7 +207,7 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
 	goto fn_exit;
     }
 
-    rank = win_ptr->myrank;
+    rank = win_ptr->comm_ptr->rank;
     
     /* If the put is a local operation, do it here */
     if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED)
@@ -318,7 +318,7 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
 	goto fn_exit;
     }
 
-    rank = win_ptr->myrank;
+    rank = win_ptr->comm_ptr->rank;
     
     /* If the get is a local operation, do it here */
     if (target_rank == rank || win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED)
@@ -428,7 +428,7 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
 	goto fn_exit;
     }
 
-    rank = win_ptr->myrank;
+    rank = win_ptr->comm_ptr->rank;
     
     MPIDI_CH3I_DATATYPE_IS_PREDEFINED(origin_datatype, origin_predefined);
     MPIDI_CH3I_DATATYPE_IS_PREDEFINED(target_datatype, target_predefined);
diff --git a/src/mpid/ch3/src/ch3u_rma_reqops.c b/src/mpid/ch3/src/ch3u_rma_reqops.c
index acfe1cb..71335b3 100644
--- a/src/mpid/ch3/src/ch3u_rma_reqops.c
+++ b/src/mpid/ch3/src/ch3u_rma_reqops.c
@@ -181,7 +181,7 @@ int MPIDI_Rput(const void *origin_addr, int origin_count,
     /* If the operation is already complete, return a completed request.
      * Otherwise, generate a grequest. */
     /* FIXME: We still may need to flush or sync for shared memory windows */
-    if (target_rank == MPI_PROC_NULL || target_rank == win_ptr->myrank ||
+    if (target_rank == MPI_PROC_NULL || target_rank == win_ptr->comm_ptr->rank ||
         win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED || data_sz == 0)
     {
         mpi_errno = MPIR_Grequest_start_impl(MPIDI_CH3I_Rma_req_query,
@@ -262,7 +262,7 @@ int MPIDI_Rget(void *origin_addr, int origin_count,
     /* If the operation is already complete, return a completed request.
      * Otherwise, generate a grequest. */
     /* FIXME: We still may need to flush or sync for shared memory windows */
-    if (target_rank == MPI_PROC_NULL || target_rank == win_ptr->myrank ||
+    if (target_rank == MPI_PROC_NULL || target_rank == win_ptr->comm_ptr->rank ||
         win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED || data_sz == 0)
     {
         mpi_errno = MPIR_Grequest_start_impl(MPIDI_CH3I_Rma_req_query,
@@ -342,7 +342,7 @@ int MPIDI_Raccumulate(const void *origin_addr, int origin_count,
     /* If the operation is already complete, return a completed request.
      * Otherwise, generate a grequest. */
     /* FIXME: We still may need to flush or sync for shared memory windows */
-    if (target_rank == MPI_PROC_NULL || target_rank == win_ptr->myrank ||
+    if (target_rank == MPI_PROC_NULL || target_rank == win_ptr->comm_ptr->rank ||
         win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED || data_sz == 0)
     {
         mpi_errno = MPIR_Grequest_start_impl(MPIDI_CH3I_Rma_req_query,
@@ -428,7 +428,7 @@ int MPIDI_Rget_accumulate(const void *origin_addr, int origin_count,
     /* If the operation is already complete, return a completed request.
      * Otherwise, generate a grequest. */
     /* FIXME: We still may need to flush or sync for shared memory windows */
-    if (target_rank == MPI_PROC_NULL || target_rank == win_ptr->myrank ||
+    if (target_rank == MPI_PROC_NULL || target_rank == win_ptr->comm_ptr->rank ||
         win_ptr->create_flavor == MPI_WIN_FLAVOR_SHARED ||
         (data_sz == 0 && trg_data_sz == 0))
     {
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 00b0a76..1e7e4a6 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -1370,7 +1370,7 @@ int MPIDI_Win_post(MPID_Group *post_grp_ptr, int assert, MPID_Win *win_ptr)
                                                     win_grp_ptr, ranks_in_win_grp);
         if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 	
-        rank = win_ptr->myrank;
+        rank = win_ptr->comm_ptr->rank;
 	
 	MPIU_CHKLMEM_MALLOC(req, MPI_Request *, post_grp_size * sizeof(MPI_Request), mpi_errno, "req");
         MPIU_CHKLMEM_MALLOC(status, MPI_Status *, post_grp_size*sizeof(MPI_Status), mpi_errno, "status");
@@ -1562,7 +1562,7 @@ int MPIDI_Win_complete(MPID_Win *win_ptr)
                                                 win_grp_ptr, ranks_in_win_grp);
     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
 
-    rank = win_ptr->myrank;
+    rank = win_ptr->comm_ptr->rank;
 
     /* If MPI_MODE_NOCHECK was not specified, we need to check if
        Win_post was called on the target processes. Wait for a 0-byte sync
@@ -1920,7 +1920,7 @@ int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win *win_ptr)
     target_state->remote_lock_mode   = lock_type;
     target_state->remote_lock_assert = assert;
 
-    if (dest == win_ptr->myrank) {
+    if (dest == win_ptr->comm_ptr->rank) {
         /* The target is this process itself. We must block until the lock
          * is acquired.  Once it is acquired, local puts, gets, accumulates
          * will be done directly without queueing. */
@@ -1989,7 +1989,7 @@ int MPIDI_Win_unlock(int dest, MPID_Win *win_ptr)
         OPA_read_write_barrier();
     }
 
-    if (dest == win_ptr->myrank) {
+    if (dest == win_ptr->comm_ptr->rank) {
 	/* local lock. release the lock on the window, grant the next one
 	 * in the queue, and return. */
         MPIU_Assert(MPIDI_CH3I_RMA_Ops_isempty(&win_ptr->targets[dest].rma_ops_list));
@@ -2410,7 +2410,7 @@ int MPIDI_Win_lock_all(int assert, MPID_Win *win_ptr)
 
         for (i = 0; i < MPIR_Comm_size(win_ptr->comm_ptr); i++) {
             /* Local process is already locked */
-            if (i == win_ptr->myrank) continue;
+            if (i == win_ptr->comm_ptr->rank) continue;
 
             mpi_errno = MPIDI_CH3I_Send_lock_msg(i, MPI_LOCK_SHARED, win_ptr);
             if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
@@ -2418,7 +2418,7 @@ int MPIDI_Win_lock_all(int assert, MPID_Win *win_ptr)
 
         for (i = 0; i < MPIR_Comm_size(win_ptr->comm_ptr); i++) {
             /* Local process is already locked */
-            if (i == win_ptr->myrank) continue;
+            if (i == win_ptr->comm_ptr->rank) continue;
 
             mpi_errno = MPIDI_CH3I_Wait_for_lock_granted(win_ptr, i);
             if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
@@ -2772,8 +2772,8 @@ static int MPIDI_CH3I_Acquire_local_lock(MPID_Win *win_ptr, int lock_type) {
         MPIU_INSTR_DURATION_END(winlock_getlocallock);
     }
 
-    win_ptr->targets[win_ptr->myrank].remote_lock_state = MPIDI_CH3_WIN_LOCK_GRANTED;
-    win_ptr->targets[win_ptr->myrank].remote_lock_mode = lock_type;
+    win_ptr->targets[win_ptr->comm_ptr->rank].remote_lock_state = MPIDI_CH3_WIN_LOCK_GRANTED;
+    win_ptr->targets[win_ptr->comm_ptr->rank].remote_lock_mode = lock_type;
 
  fn_exit:
     MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_ACQUIRE_LOCAL_LOCK);
diff --git a/src/mpid/ch3/src/mpid_rma.c b/src/mpid/ch3/src/mpid_rma.c
index bb10dca..8a581e7 100644
--- a/src/mpid/ch3/src/mpid_rma.c
+++ b/src/mpid/ch3/src/mpid_rma.c
@@ -266,7 +266,6 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
     (*win_ptr)->start_group_ptr     = NULL;
     (*win_ptr)->start_assert        = 0;
     (*win_ptr)->comm_ptr            = win_comm_ptr;
-    (*win_ptr)->myrank              = comm_ptr->rank;
 
     (*win_ptr)->my_counter          = 0;
     /* (*win_ptr)->base_addrs[] is set by caller; */

http://git.mpich.org/mpich.git/commitdiff/bd899327f783a3a085f64e5830d8435dca22714d

commit bd899327f783a3a085f64e5830d8435dca22714d
Author: James Dinan <dinan at mcs.anl.gov>
Date:   Tue May 7 12:54:13 2013 -0500

    Move CH3-specific MPID_Win members into CH3
    
    Several fields of MPID_Win were not used above the ADI.  These have been
    moved to CH3 to reduce clutter.  Downstream devices should redefine
    these fields in MPID_DEV_WIN_DECL if they are needed.
    
    Reviewer: balaji

diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index d3e6d03..deedd53 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1693,10 +1693,7 @@ typedef struct MPID_Win {
     MPI_Aint    size;        
     int          disp_unit;      /* Displacement unit of *local* window */
     MPID_Attribute *attributes;
-    MPID_Group *start_group_ptr; /* group passed in MPI_Win_start */
     MPID_Comm *comm_ptr;         /* Pointer to comm of window (dup) */
-    int         myrank;          /* Rank of this process in comm (used to 
-				    detect operations on self) */
 #ifdef USE_THREADED_WINDOW_CODE
     /* These were causing compilation errors.  We need to figure out how to
        integrate threads into MPICH before including these fields. */
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 49245d0..3a23e5b 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -257,6 +257,8 @@ struct MPIDI_Win_target_state {
 };
 
 #define MPIDI_DEV_WIN_DECL                                               \
+    int myrank;            /* Rank of this process in comm (used to      \
+                              detect operations on self) */              \
     volatile int my_counter;  /* completion counter for operations       \
                                  targeting this window */                \
     void **base_addrs;     /* array of base addresses of the windows of  \
@@ -293,6 +295,7 @@ struct MPIDI_Win_target_state {
                            this state must be updated collectively (in   \
                            fence) to ensure that the fence state across  \
                            all processes remains consistent. */          \
+    MPID_Group *start_group_ptr; /* group passed in MPI_Win_start */     \
     int start_assert;   /* assert passed to MPI_Win_start */             \
 
 #ifdef MPIDI_CH3_WIN_DECL

http://git.mpich.org/mpich.git/commitdiff/4450a0a2f0519d4f384da21b110ab7135d31791f

commit 4450a0a2f0519d4f384da21b110ab7135d31791f
Author: James Dinan <dinan at mcs.anl.gov>
Date:   Tue May 7 13:29:13 2013 -0500

    Cleanup RMA comment in MPIDI_Reqest

diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index 032670a..49245d0 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -370,7 +370,7 @@ typedef struct MPIDI_Request {
      * unexpected, exclusive access otherwise */
     int            recv_pending_count;
 
-    /* The next 8 are for RMA */
+    /* The next several fields are used to hold state for ongoing RMA operations */
     MPI_Op op;
     /* For accumulate, since data is first read into a tmp_buf */
     void *real_user_buf;

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

Summary of changes:
 src/include/mpiimpl.h                           |    3 ---
 src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c |    2 +-
 src/mpid/ch3/include/mpidpre.h                  |    3 ++-
 src/mpid/ch3/src/ch3u_rma_acc_ops.c             |    6 +++---
 src/mpid/ch3/src/ch3u_rma_ops.c                 |    6 +++---
 src/mpid/ch3/src/ch3u_rma_reqops.c              |    8 ++++----
 src/mpid/ch3/src/ch3u_rma_sync.c                |   16 ++++++++--------
 src/mpid/ch3/src/mpid_rma.c                     |    1 -
 8 files changed, 21 insertions(+), 24 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list