[mpich-commits] r10677 - in mpich2/trunk/src/mpid/ch3: include src

dinan at mcs.anl.gov dinan at mcs.anl.gov
Tue Nov 27 17:40:00 CST 2012


Author: dinan
Date: 2012-11-27 17:40:00 -0600 (Tue, 27 Nov 2012)
New Revision: 10677

Modified:
   mpich2/trunk/src/mpid/ch3/include/mpidpre.h
   mpich2/trunk/src/mpid/ch3/src/ch3u_rma_sync.c
Log:
RMA State Tracking: Fence tracking and err. checks

Added an additional error check and better documentation of how the state is
tracked and updated for Fence.

Reviewer: goodell

Modified: mpich2/trunk/src/mpid/ch3/include/mpidpre.h
===================================================================
--- mpich2/trunk/src/mpid/ch3/include/mpidpre.h	2012-11-27 23:39:58 UTC (rev 10676)
+++ mpich2/trunk/src/mpid/ch3/include/mpidpre.h	2012-11-27 23:40:00 UTC (rev 10677)
@@ -263,7 +263,11 @@
     enum MPIDI_Win_epoch_states epoch_state;                             \
     int epoch_count;                                                     \
     int fence_issued;   /* Indicates if fence has been called, and if an \
-                           active target fence epoch is possible. */     \
+                           active target fence epoch is possible. This   \
+                           is maintained separately from the epoch state;\
+                           this state must be updated collectively (in   \
+                           fence) to ensure that the fence state across  \
+                           all processes remains consistent. */          \
     int start_assert;   /* assert passed to MPI_Win_start */             \
 
 #ifdef MPIDI_CH3_WIN_DECL

Modified: mpich2/trunk/src/mpid/ch3/src/ch3u_rma_sync.c
===================================================================
--- mpich2/trunk/src/mpid/ch3/src/ch3u_rma_sync.c	2012-11-27 23:39:58 UTC (rev 10676)
+++ mpich2/trunk/src/mpid/ch3/src/ch3u_rma_sync.c	2012-11-27 23:40:00 UTC (rev 10677)
@@ -253,6 +253,10 @@
        in the window's group if any specify it */
     if (assert & MPI_MODE_NOPRECEDE)
     {
+        /* Error: Operations were issued and the user claimed NOPRECEDE */
+        MPIU_ERR_CHKANDJUMP(win_ptr->epoch_state == MPIDI_EPOCH_FENCE,
+                            mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
+
 	win_ptr->fence_issued = (assert & MPI_MODE_NOSUCCEED) ? 0 : 1;
 	goto fn_exit;
     }
@@ -426,14 +430,11 @@
 	{
 	    win_ptr->fence_issued = 0;
 	}
-    }
 
- fn_exit:
-    /* Reset the epoch state if this fence completed an epoch */
-    if (win_ptr->epoch_state == MPIDI_EPOCH_FENCE && mpi_errno == MPI_SUCCESS) {
         win_ptr->epoch_state = MPIDI_EPOCH_NONE;
     }
 
+ fn_exit:
     MPIU_CHKLMEM_FREEALL();
     MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_FENCE);
     return mpi_errno;



More information about the commits mailing list