Commit 77c07868 authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji
Browse files

Add namespace for num_active_issued_win and num_passive_win.


Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 9fb9c2d3
......@@ -40,7 +40,8 @@ static inline void MPID_nem_mpich_send_seg (MPID_Segment *segment, MPIDI_msg_sz_
!MPIDI_CH3I_shm_active_send && \
!MPIDI_CH3I_Sendq_head(MPIDI_CH3I_shm_sendq) && \
!MPIDU_Sched_are_pending() && \
!num_active_issued_win && !num_passive_win)
!MPIDI_CH3I_num_active_issued_win && \
!MPIDI_CH3I_num_passive_win)
#undef FUNCNAME
#define FUNCNAME MPID_nem_mpich_send_header
......
......@@ -228,7 +228,7 @@ MPIDI_CH3I_Progress_state;
#define MPIDI_CH3_PROGRESS_STATE_DECL MPIDI_CH3I_Progress_state ch;
extern OPA_int_t MPIDI_CH3I_progress_completion_count;
extern int num_active_issued_win, num_passive_win;
extern int MPIDI_CH3I_num_active_issued_win, MPIDI_CH3I_num_passive_win;
#define MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT do { \
OPA_write_barrier(); \
......
......@@ -46,7 +46,7 @@ extern MPID_Request ** const MPID_Recvq_unexpected_tail_ptr;
#endif
OPA_int_t MPIDI_CH3I_progress_completion_count = OPA_INT_T_INITIALIZER(0);
int num_active_issued_win = 0, num_passive_win = 0;
int MPIDI_CH3I_num_active_issued_win = 0, MPIDI_CH3I_num_passive_win = 0;
/* NEMESIS MULTITHREADING: Extra Data Structures Added */
#ifdef MPICH_IS_THREADED
......@@ -478,7 +478,7 @@ int MPIDI_CH3I_Progress (MPID_Progress_state *progress_state, int is_blocking)
#endif /* HAVE_LIBHCOLL */
/* make progress on RMA */
if (num_active_issued_win > 0 || num_passive_win > 0) {
if (MPIDI_CH3I_num_active_issued_win > 0 || MPIDI_CH3I_num_passive_win > 0) {
mpi_errno = MPIDI_CH3I_RMA_Make_progress_global(&made_progress);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
......
......@@ -78,7 +78,7 @@ MPIDI_CH3I_Progress_state;
and must be available to the routines in src/mpi */
extern volatile unsigned int MPIDI_CH3I_progress_completion_count;
extern int num_active_issued_win, num_passive_win;
extern int MPIDI_CH3I_num_active_issued_win, MPIDI_CH3I_num_passive_win;
/* MPICH_IS_THREADED isn't defined yet (handled by mpiimplthread.h) */
#if (MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE)
......
......@@ -22,7 +22,7 @@ static int MPIDI_CH3i_Progress_test(void);
/* FIXME: Move thread stuff into some set of abstractions in order to remove
ifdefs */
volatile unsigned int MPIDI_CH3I_progress_completion_count = 0;
int num_active_issued_win = 0, num_passive_win = 0;
int MPIDI_CH3I_num_active_issued_win = 0, MPIDI_CH3I_num_passive_win = 0;
#ifdef MPICH_IS_THREADED
volatile int MPIDI_CH3I_progress_blocked = FALSE;
......@@ -98,7 +98,7 @@ static int MPIDI_CH3i_Progress_test(void)
#endif /* HAVE_LIBHCOLL */
/* make progress on RMA */
if (num_active_issued_win > 0 || num_passive_win > 0) {
if (MPIDI_CH3I_num_active_issued_win > 0 || MPIDI_CH3I_num_passive_win > 0) {
mpi_errno = MPIDI_CH3I_RMA_Make_progress_global(&made_progress);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
......@@ -213,7 +213,7 @@ static int MPIDI_CH3i_Progress_wait(MPID_Progress_state * progress_state)
#endif /* HAVE_LIBHCOLL */
/* make progress on RMA */
if (num_active_issued_win > 0 || num_passive_win > 0) {
if (MPIDI_CH3I_num_active_issued_win > 0 || MPIDI_CH3I_num_passive_win > 0) {
mpi_errno = MPIDI_CH3I_RMA_Make_progress_global(&made_progress);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
......
......@@ -62,8 +62,8 @@ static inline int check_window_state(MPID_Win * win_ptr, int *made_progress)
MPID_Request_release(fence_req_ptr);
win_ptr->fence_sync_req = MPI_REQUEST_NULL;
num_active_issued_win--;
MPIU_Assert(num_active_issued_win >= 0);
MPIDI_CH3I_num_active_issued_win--;
MPIU_Assert(MPIDI_CH3I_num_active_issued_win >= 0);
(*made_progress) = 1;
}
......@@ -75,8 +75,8 @@ static inline int check_window_state(MPID_Win * win_ptr, int *made_progress)
* we do not create PSCW requests on window. */
win_ptr->states.access_state = MPIDI_RMA_PSCW_GRANTED;
num_active_issued_win--;
MPIU_Assert(num_active_issued_win >= 0);
MPIDI_CH3I_num_active_issued_win--;
MPIU_Assert(MPIDI_CH3I_num_active_issued_win >= 0);
(*made_progress) = 1;
}
......@@ -98,8 +98,8 @@ static inline int check_window_state(MPID_Win * win_ptr, int *made_progress)
if (i == win_ptr->start_grp_size) {
win_ptr->states.access_state = MPIDI_RMA_PSCW_GRANTED;
num_active_issued_win--;
MPIU_Assert(num_active_issued_win >= 0);
MPIDI_CH3I_num_active_issued_win--;
MPIU_Assert(MPIDI_CH3I_num_active_issued_win >= 0);
(*made_progress) = 1;
......
......@@ -348,7 +348,7 @@ int MPIDI_Win_fence(int assert, MPID_Win * win_ptr)
/* Set window access state properly. */
win_ptr->states.access_state = MPIDI_RMA_FENCE_ISSUED;
num_active_issued_win++;
MPIDI_CH3I_num_active_issued_win++;
goto finish_fence;
}
......@@ -671,7 +671,7 @@ int MPIDI_Win_start(MPID_Group * group_ptr, int assert, MPID_Win * win_ptr)
finish_start:
/* Set window access state properly. */
win_ptr->states.access_state = MPIDI_RMA_PSCW_ISSUED;
num_active_issued_win++;
MPIDI_CH3I_num_active_issued_win++;
/* BEGINNING synchronization: the following counter should be zero. */
MPIU_Assert(win_ptr->accumulated_ops_cnt == 0);
......@@ -981,7 +981,7 @@ int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win * win_ptr)
if (win_ptr->lock_epoch_count == 0) {
/* Set window access state properly. */
win_ptr->states.access_state = MPIDI_RMA_PER_TARGET;
num_passive_win++;
MPIDI_CH3I_num_passive_win++;
}
win_ptr->lock_epoch_count++;
......@@ -1118,8 +1118,8 @@ int MPIDI_Win_unlock(int dest, MPID_Win * win_ptr)
if (win_ptr->lock_epoch_count == 0) {
/* Set window access state properly. */
win_ptr->states.access_state = MPIDI_RMA_NONE;
num_passive_win--;
MPIU_Assert(num_passive_win >= 0);
MPIDI_CH3I_num_passive_win--;
MPIU_Assert(MPIDI_CH3I_num_passive_win >= 0);
}
if (target != NULL) {
......@@ -1406,7 +1406,7 @@ int MPIDI_Win_lock_all(int assert, MPID_Win * win_ptr)
win_ptr->states.access_state = MPIDI_RMA_LOCK_ALL_GRANTED;
else
win_ptr->states.access_state = MPIDI_RMA_LOCK_ALL_CALLED;
num_passive_win++;
MPIDI_CH3I_num_passive_win++;
win_ptr->lock_all_assert = assert;
......@@ -1597,8 +1597,8 @@ int MPIDI_Win_unlock_all(MPID_Win * win_ptr)
finish_unlock_all:
/* Set window access state properly. */
win_ptr->states.access_state = MPIDI_RMA_NONE;
num_passive_win--;
MPIU_Assert(num_passive_win >= 0);
MPIDI_CH3I_num_passive_win--;
MPIU_Assert(MPIDI_CH3I_num_passive_win >= 0);
/* reset lock_all assert on window. */
win_ptr->lock_all_assert = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment