Commit 52d980d7 authored by James Dinan's avatar James Dinan
Browse files

[svn-r10114] Removed old/unused RMA vtable in CH3.

Removed the old RMA virtual function infrastructure from CH3 -- this code was
all already dead.  Function overrides are already provided per-window in the
MPID_Win structure.  Overrides for non-window-specific (window creation)
operations will be added shortly.

Reviewer: buntinas
parent 53dc5bd3
......@@ -75,19 +75,6 @@ int MPIDI_CH3_PortFnsInit( MPIDI_PortFns *portFns )
return 0;
}
/* This function simply tells the CH3 device to use the defaults for the
MPI-2 RMA functions */
int MPIDI_CH3_RMAFnsInit( MPIDI_RMAFns *a )
{
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3_RMAFNSINIT);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3_RMAFNSINIT);
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3_RMAFNSINIT);
return 0;
}
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3_Get_business_card
#undef FCNAME
......
......@@ -71,14 +71,6 @@ int MPIDI_CH3_PortFnsInit( MPIDI_PortFns *portFns ATTRIBUTE((unused)) )
return 0;
}
/* This function simply tells the CH3 device to use the defaults for the
MPI-2 RMA functions */
int MPIDI_CH3_RMAFnsInit( MPIDI_RMAFns *a ATTRIBUTE((unused)) )
{
MPIU_UNREFERENCED_ARG(a);
return 0;
}
/* Perform the channel-specific vc initialization */
int MPIDI_CH3_VC_Init( MPIDI_VC_t *vc ) {
MPIDI_CH3I_VC *vcch = (MPIDI_CH3I_VC *)vc->channel_private;
......
......@@ -1114,33 +1114,6 @@ int MPIDI_CH3U_Comm_FinishPending( MPID_Comm * );
/* mpirma.h (in src/mpi/rma?) */
/* ------------------------------------------------------------------------- */
/* This structure defines a module that handles the routines that
work with MPI-2 RMA ops */
typedef struct MPIDI_RMAFns {
int (*Win_create)(void *, MPI_Aint, int, MPID_Info *, MPID_Comm *,
MPID_Win **, struct MPIDI_RMAFns *);
int (*Win_free)(MPID_Win **);
int (*Put)(const void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype,
MPID_Win *);
int (*Get)(void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype,
MPID_Win *);
int (*Accumulate)(const void *, int, MPI_Datatype, int, MPI_Aint, int,
MPI_Datatype, MPI_Op, MPID_Win *);
int (*Win_fence)(int, MPID_Win *);
int (*Win_post)(MPID_Group *, int, MPID_Win *);
int (*Win_start)(MPID_Group *, int, MPID_Win *);
int (*Win_complete)(MPID_Win *);
int (*Win_wait)(MPID_Win *);
int (*Win_lock)(int, int, int, MPID_Win *);
int (*Win_unlock)(int, MPID_Win *);
void * (*Alloc_mem)(size_t, MPID_Info *);
int (*Free_mem)(void *);
int (*Win_allocate)(MPI_Aint, int, MPID_Info *, MPID_Comm *,
void *baseptr, MPID_Win **, struct MPIDI_RMAFns *);
} MPIDI_RMAFns;
#define MPIDI_RMAFNS_VERSION 1
int MPIDI_CH3_RMAFnsInit( MPIDI_RMAFns * );
/* FIXME: These are specific to the RMA code and should be in the RMA
header file. */
#define MPIDI_RMA_PUT 23
......@@ -1231,35 +1204,6 @@ int MPIDI_Win_sync(MPID_Win *win);
void *MPIDI_Alloc_mem(size_t size, MPID_Info *info_ptr);
int MPIDI_Free_mem(void *ptr);
/* optional channel-specific */
void *MPIDI_CH3_Alloc_mem(size_t size, MPID_Info *info_ptr);
int MPIDI_CH3_Win_create(void *base, MPI_Aint size, int disp_unit,
MPID_Info *info, MPID_Comm *comm_ptr,
MPID_Win **win_ptr, MPIDI_RMAFns *RMAFns);
int MPIDI_CH3_Win_allocate(MPI_Aint size, int disp_unit, MPID_Info *info,
MPID_Comm *comm_ptr, void *baseptr,
MPID_Win **win_ptr, MPIDI_RMAFns *RMAFns);
int MPIDI_CH3_Free_mem(void *ptr);
void MPIDI_CH3_Cleanup_mem(void);
int MPIDI_CH3_Win_free(MPID_Win **win_ptr);
int MPIDI_CH3_Put(const void *origin_addr, int origin_count, MPI_Datatype
origin_datatype, int target_rank, MPI_Aint target_disp,
int target_count, MPI_Datatype target_datatype, MPID_Win *win_ptr);
int MPIDI_CH3_Get(void *origin_addr, int origin_count, MPI_Datatype
origin_datatype, int target_rank, MPI_Aint target_disp,
int target_count, MPI_Datatype target_datatype, MPID_Win *win_ptr);
int MPIDI_CH3_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
origin_datatype, int target_rank, MPI_Aint target_disp,
int target_count, MPI_Datatype target_datatype, MPI_Op op,
MPID_Win *win_ptr);
int MPIDI_CH3_Win_fence(int assert, MPID_Win *win_ptr);
int MPIDI_CH3_Win_lock(int lock_type, int dest, int assert, MPID_Win *win_ptr);
int MPIDI_CH3_Win_unlock(int dest, MPID_Win *win_ptr);
int MPIDI_CH3_Win_wait(MPID_Win *win_ptr);
int MPIDI_CH3_Win_complete(MPID_Win *win_ptr);
int MPIDI_CH3_Win_post(MPID_Group *group_ptr, int assert, MPID_Win *win_ptr);
int MPIDI_CH3_Win_start(MPID_Group *group_ptr, int assert, MPID_Win *win_ptr);
/* internal */
int MPIDI_CH3I_Release_lock(MPID_Win * win_ptr);
int MPIDI_CH3I_Try_acquire_win_lock(MPID_Win * win_ptr, int requested_lock);
......
......@@ -84,13 +84,8 @@ static MPIU_INSTR_Duration_count *list_block; /* Inner; while waiting */
/*
* These routines provide a default implementation of the MPI RMA operations
* in terms of the low-level, two-sided channel operations. A channel
* may override these functions, on a per-window basis, by defining
* USE_CHANNEL_RMA_TABLE and providing the function MPIDI_CH3_RMAWinFnsInit.
*/
/*
* TODO:
*
* may override these functions, on a per-window basis, by overriding
* the MPID functions in the RMAFns section of MPID_Win object.
*/
#define SYNC_POST_TAG 100
......
......@@ -60,30 +60,13 @@ int MPID_Win_create(void *base, MPI_Aint size, int disp_unit, MPID_Info *info,
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_CREATE);
/* The default for this function is MPIDI_Win_create.
A channel may define its own function and set it in the
init check above; such a function may be named MPIDI_CH3_Win_create.
If a channel does not implement this operation, it will set
the function pointer to NULL */
/* We pass the RMAFns function table to this function because a channel may
want to reset it to the default if it finds that it cannot
optimize for this
set of windows. The sshm channel did this if windows are not
allocated in shared memory. */
mpi_errno = MPIDI_Win_create(base, size, disp_unit, info, comm_ptr,
win_ptr );
if (mpi_errno != MPI_SUCCESS) {
MPIU_ERR_POP(mpi_errno);
}
/* Set the defaults */
#ifdef USE_CHANNEL_RMA_TABLE
mpi_errno = MPIDI_CH3_RMAWinFnsInit( *win_ptr );
#else
MPID_WIN_FTABLE_SET_DEFAULTS(win_ptr);
#endif
fn_fail:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_CREATE);
......@@ -104,30 +87,13 @@ int MPID_Win_allocate(MPI_Aint size, int disp_unit, MPID_Info *info,
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_ALLOCATE);
/* The default for this function is MPIDI_Win_allocate.
A channel may define its own function and set it in the
init check above; such a function may be named MPIDI_CH3_Win_allocate.
If a channel does not implement this operation, it will set
the function pointer to NULL */
/* We pass the RMAFns function table to this function because a channel may
want to reset it to the default if it finds that it cannot
optimize for this
set of windows. The sshm channel did this if windows are not
allocated in shared memory. */
mpi_errno = MPIDI_Win_allocate(size, disp_unit, info, comm_ptr,
baseptr, win_ptr );
if (mpi_errno != MPI_SUCCESS) {
MPIU_ERR_POP(mpi_errno);
}
/* Set the defaults */
#ifdef USE_CHANNEL_RMA_TABLE
mpi_errno = MPIDI_CH3_RMAWinFnsInit( *win_ptr );
#else
MPID_WIN_FTABLE_SET_DEFAULTS(win_ptr);
#endif
fn_fail:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_ALLOCATE);
......@@ -148,29 +114,12 @@ int MPID_Win_create_dynamic(MPID_Info *info, MPID_Comm *comm_ptr,
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_CREATE_DYNAMIC);
/* The default for this function is MPIDI_Win_allocate.
A channel may define its own function and set it in the
init check above; such a function may be named MPIDI_CH3_Win_allocate.
If a channel does not implement this operation, it will set
the function pointer to NULL */
/* We pass the RMAFns function table to this function because a channel may
want to reset it to the default if it finds that it cannot
optimize for this
set of windows. The sshm channel did this if windows are not
allocated in shared memory. */
mpi_errno = MPIDI_Win_create_dynamic(info, comm_ptr, win_ptr);
if (mpi_errno != MPI_SUCCESS) {
MPIU_ERR_POP(mpi_errno);
}
/* Set the defaults */
#ifdef USE_CHANNEL_RMA_TABLE
mpi_errno = MPIDI_CH3_RMAWinFnsInit( *win_ptr );
#else
MPID_WIN_FTABLE_SET_DEFAULTS(win_ptr);
#endif
fn_fail:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_CREATE_DYNAMIC);
......@@ -190,12 +139,6 @@ void *MPID_Alloc_mem( size_t size, MPID_Info *info_ptr )
MPIDI_FUNC_ENTER(MPID_STATE_MPID_ALLOC_MEM);
/* The default for this function is MPIDI_Alloc_mem.
A channel may define its own function and set it in the
init check above; such a function may be named MPIDI_Alloc_mem.
If a channel does not implement this operation, it will set
the function pointer to NULL */
ap = MPIDI_Alloc_mem(size, info_ptr);
MPIDI_FUNC_EXIT(MPID_STATE_MPID_ALLOC_MEM);
......@@ -214,12 +157,6 @@ int MPID_Free_mem( void *ptr )
MPIDI_FUNC_ENTER(MPID_STATE_MPID_FREE_MEM);
/* The default for this function is MPIDI_Free_mem.
A channel may define its own function and set it in the
init check above; such a function may be named MPIDI_Free_mem.
If a channel does not implement this operation, it will set
the function pointer to NULL */
mpi_errno = MPIDI_Free_mem(ptr);
if (mpi_errno != MPI_SUCCESS) {
MPIU_ERR_POP(mpi_errno);
......@@ -243,27 +180,10 @@ int MPID_Win_allocate_shared(MPI_Aint size, MPID_Info *info_ptr, MPID_Comm *comm
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_ALLOCATE_SHARED);
/* The default for this function is MPIDI_Win_allocate_shared.
A channel may define its own function and set it in the
init check above; such a function may be named MPIDI_CH3_Win_allocate_shared.
If a channel does not implement this operation, it will set
the function pointer to NULL */
/* We pass the RMAFns function table to this function because a channel may
want to reset it to the default if it finds that it cannot
optimize for this
set of windows. The sshm channel did this if windows are not
allocated in shared memory. */
mpi_errno = MPIDI_Win_allocate_shared(size, info_ptr, comm_ptr, base_ptr, win_ptr);
if (mpi_errno) MPIU_ERR_POP(mpi_errno);
/* Set the defaults */
#ifdef USE_CHANNEL_RMA_TABLE
mpi_errno = MPIDI_CH3_RMAWinFnsInit( *win_ptr );
#else
MPID_WIN_FTABLE_SET_DEFAULTS(win_ptr);
#endif
fn_fail:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_ALLOCATE_SHARED);
......
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