Commit a4223bc3 authored by Xin Zhao's avatar Xin Zhao
Browse files

Move definition of global window counters to nemesis / sock.



num_active_issued_win and num_passive_win are counters of
windows in active ISSUED mode and in passive mode.
It is modified in CH3 and is used in progress engine of
nemesis / sock to skip windows that do not need to make
progress on. Here we define them in mpidi_ch3_pre.h in
nemesis / sock so that they can be exposed to upper layers.
Signed-off-by: default avatarMin Si <msi@il.is.s.u-tokyo.ac.jp>
parent 848a0f31
......@@ -16,8 +16,6 @@
extern int MPID_nem_lmt_shm_pending;
extern MPID_nem_cell_ptr_t MPID_nem_prefetched_cell;
extern int num_active_issued_win;
extern int num_passive_win;
static inline int MPID_nem_mpich_send_header (void* buf, int size, MPIDI_VC_t *vc, int *again);
static inline int MPID_nem_mpich_sendv (MPID_IOV **iov, int *n_iov, MPIDI_VC_t *vc, int *again);
......
......@@ -228,6 +228,8 @@ 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;
#define MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT do { \
OPA_write_barrier(); \
OPA_incr_int(&MPIDI_CH3I_progress_completion_count); \
......
......@@ -46,6 +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;
/* NEMESIS MULTITHREADING: Extra Data Structures Added */
#ifdef MPICH_IS_THREADED
......
......@@ -10,9 +10,6 @@
#include "mpidimpl.h"
#include "ch3usock.h"
extern int num_active_issued_win;
extern int num_passive_win;
/* This is all socket connection definitions */
/* MT - not thread safe! */
......
......@@ -79,6 +79,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;
/* MPICH_IS_THREADED isn't defined yet (handled by mpiimplthread.h) */
#if (MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE)
......
......@@ -22,6 +22,8 @@ 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;
#ifdef MPICH_IS_THREADED
volatile int MPIDI_CH3I_progress_blocked = FALSE;
volatile int MPIDI_CH3I_progress_wakeup_signalled = FALSE;
......
......@@ -18,8 +18,6 @@ int MPIDI_CH3I_RMA_Make_progress_win(MPID_Win * win_ptr, int *made_progress);
extern struct MPIDI_RMA_Op *global_rma_op_pool, *global_rma_op_pool_tail, *global_rma_op_pool_start;
extern struct MPIDI_RMA_Target *global_rma_target_pool, *global_rma_target_pool_tail, *global_rma_target_pool_start;
extern int num_active_issued_win;
extern int num_passive_win;
MPIR_T_PVAR_DOUBLE_TIMER_DECL_EXTERN(RMA, rma_rmaqueue_alloc);
......
......@@ -30,8 +30,6 @@ cvars:
MPIU_THREADSAFE_INIT_DECL(initRMAoptions);
MPIDI_RMA_Win_list_t *MPIDI_RMA_Win_list = NULL, *MPIDI_RMA_Win_list_tail = NULL;
int num_active_issued_win = 0;
int num_passive_win = 0;
static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
MPID_Comm * comm_ptr, MPID_Win ** win_ptr);
......
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