Commit 61f952c7 authored by Xin Zhao's avatar Xin Zhao Committed by Pavan Balaji
Browse files

Code refactoring to clean up the RMA code.



Split RMA functionality into smaller files, and move functions
to where they belong based on the file names.
Signed-off-by: Pavan Balaji's avatarPavan Balaji <balaji@anl.gov>
parent 5c513032
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#if !defined(MPID_RMA_OPLIST_H_INCLUDED)
#define MPID_RMA_OPLIST_H_INCLUDED
#include "mpl_utlist.h"
#include "mpid_rma_types.h"
/* Return nonzero if the RMA operations list is empty.
*/
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_RMA_Ops_isempty
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline int MPIDI_CH3I_RMA_Ops_isempty(MPIDI_RMA_Ops_list_t * list)
{
return *list == NULL;
}
/* Return a pointer to the first element in the list.
*/
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_RMA_Ops_head
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline MPIDI_RMA_Op_t *MPIDI_CH3I_RMA_Ops_head(MPIDI_RMA_Ops_list_t * list)
{
return *list;
}
/* Return a pointer to the last element in the list.
*/
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_RMA_Ops_tail
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline MPIDI_RMA_Op_t *MPIDI_CH3I_RMA_Ops_tail(MPIDI_RMA_Ops_list_t * list)
{
return (*list) ? (*list)->prev : NULL;
}
/* Append an element to the tail of the RMA ops list
*
* @param IN list Pointer to the RMA ops list
* @param IN elem Pointer to the element to be appended
*/
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_RMA_Ops_append
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline void MPIDI_CH3I_RMA_Ops_append(MPIDI_RMA_Ops_list_t * list, MPIDI_RMA_Op_t * elem)
{
MPL_DL_APPEND(*list, elem);
}
/* Allocate a new element on the tail of the RMA operations list.
*
* @param IN list Pointer to the RMA ops list
* @param OUT new_ptr Pointer to the element that was allocated
* @return MPI error class
*/
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_RMA_Ops_alloc_tail
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline int MPIDI_CH3I_RMA_Ops_alloc_tail(MPIDI_RMA_Ops_list_t * list,
MPIDI_RMA_Op_t ** new_elem)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_RMA_Op_t *tmp_ptr;
MPIU_CHKPMEM_DECL(1);
/* FIXME: We should use a pool allocator here */
MPIU_CHKPMEM_MALLOC(tmp_ptr, MPIDI_RMA_Op_t *, sizeof(MPIDI_RMA_Op_t),
mpi_errno, "RMA operation entry");
tmp_ptr->next = NULL;
tmp_ptr->dataloop = NULL;
tmp_ptr->request = NULL;
MPL_DL_APPEND(*list, tmp_ptr);
*new_elem = tmp_ptr;
fn_exit:
MPIU_CHKPMEM_COMMIT();
return mpi_errno;
fn_fail:
MPIU_CHKPMEM_REAP();
*new_elem = NULL;
goto fn_exit;
}
/* Unlink an element from the RMA ops list
*
* @param IN list Pointer to the RMA ops list
* @param IN elem Pointer to the element to be unlinked
*/
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_RMA_Ops_unlink
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline void MPIDI_CH3I_RMA_Ops_unlink(MPIDI_RMA_Ops_list_t * list, MPIDI_RMA_Op_t * elem)
{
MPL_DL_DELETE(*list, elem);
}
/* Free an element in the RMA operations list.
*
* @param IN list Pointer to the RMA ops list
* @param IN curr_ptr Pointer to the element to be freed.
*/
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_RMA_Ops_free_elem
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline void MPIDI_CH3I_RMA_Ops_free_elem(MPIDI_RMA_Ops_list_t * list,
MPIDI_RMA_Op_t * curr_ptr)
{
MPIDI_RMA_Op_t *tmp_ptr = curr_ptr;
MPIU_Assert(curr_ptr != NULL);
MPL_DL_DELETE(*list, curr_ptr);
/* Check if we allocated a dataloop for this op (see send/recv_rma_msg) */
if (tmp_ptr->dataloop != NULL)
MPIU_Free(tmp_ptr->dataloop);
MPIU_Free(tmp_ptr);
}
/* Free an element in the RMA operations list.
*
* @param IN list Pointer to the RMA ops list
* @param INOUT curr_ptr Pointer to the element to be freed. Will be updated
* to point to the element following the element that
* was freed.
*/
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_RMA_Ops_free_and_next
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline void MPIDI_CH3I_RMA_Ops_free_and_next(MPIDI_RMA_Ops_list_t * list,
MPIDI_RMA_Op_t ** curr_ptr)
{
MPIDI_RMA_Op_t *next_ptr = (*curr_ptr)->next;
MPIDI_CH3I_RMA_Ops_free_elem(list, *curr_ptr);
*curr_ptr = next_ptr;
}
/* Free the entire RMA operations list.
*/
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_RMA_Ops_free
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline void MPIDI_CH3I_RMA_Ops_free(MPIDI_RMA_Ops_list_t * list)
{
MPIDI_RMA_Op_t *curr_ptr, *tmp_ptr;
MPL_DL_FOREACH_SAFE(*list, curr_ptr, tmp_ptr) {
MPIDI_CH3I_RMA_Ops_free_elem(list, curr_ptr);
}
}
/* Retrieve the RMA ops list pointer from the window. This routine detects
* whether we are in an active or passive target epoch and returns the correct
* ops list; we use a shared list for active target and separate per-target
* lists for passive target.
*/
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_RMA_Get_ops_list
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static inline MPIDI_RMA_Ops_list_t *MPIDI_CH3I_RMA_Get_ops_list(MPID_Win * win_ptr, int target)
{
if (win_ptr->epoch_state == MPIDI_EPOCH_FENCE ||
win_ptr->epoch_state == MPIDI_EPOCH_START || win_ptr->epoch_state == MPIDI_EPOCH_PSCW) {
return &win_ptr->at_rma_ops_list;
}
else {
return &win_ptr->targets[target].rma_ops_list;
}
}
#endif /* MPID_RMA_OPLIST_H_INCLUDED */
This diff is collapsed.
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* (C) 2001 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
#if !defined(MPID_RMA_TYPES_H_INCLUDED)
#define MPID_RMA_TYPES_H_INCLUDED
#include "mpidi_ch3_impl.h"
typedef enum MPIDI_RMA_Op_type {
MPIDI_RMA_PUT = 23,
MPIDI_RMA_GET = 24,
MPIDI_RMA_ACCUMULATE = 25,
/* REMOVED: MPIDI_RMA_LOCK = 26, */
MPIDI_RMA_ACC_CONTIG = 27,
MPIDI_RMA_GET_ACCUMULATE = 28,
MPIDI_RMA_COMPARE_AND_SWAP = 29,
MPIDI_RMA_FETCH_AND_OP = 30
} MPIDI_RMA_Op_type_t;
/* Special case RMA operations */
enum MPIDI_RMA_Datatype {
MPIDI_RMA_DATATYPE_BASIC = 50,
MPIDI_RMA_DATATYPE_DERIVED = 51
};
/* We start with an arbitrarily chosen number (42), to help with
* debugging when a packet type is not initialized or wrongly
* initialized. */
enum MPID_Lock_state {
MPID_LOCK_NONE = 42,
MPID_LOCK_SHARED_ALL
};
/*
* RMA Declarations. We should move these into something separate from
* a Request.
*/
/* to send derived datatype across in RMA ops */
typedef struct MPIDI_RMA_dtype_info { /* for derived datatypes */
int is_contig;
int max_contig_blocks;
MPI_Aint size;
MPI_Aint extent;
int dataloop_size; /* not needed because this info is sent in
* packet header. remove it after lock/unlock
* is implemented in the device */
void *dataloop; /* pointer needed to update pointers
* within dataloop on remote side */
int dataloop_depth;
int eltype;
MPI_Aint ub, lb, true_ub, true_lb;
int has_sticky_ub, has_sticky_lb;
} MPIDI_RMA_dtype_info;
/* for keeping track of RMA ops, which will be executed at the next sync call */
typedef struct MPIDI_RMA_Op {
struct MPIDI_RMA_Op *prev; /* pointer to next element in list */
struct MPIDI_RMA_Op *next; /* pointer to next element in list */
/* FIXME: It would be better to setup the packet that will be sent, at
* least in most cases (if, as a result of the sync/ops/sync sequence,
* a different packet type is needed, it can be extracted from the
* information otherwise stored). */
MPIDI_RMA_Op_type_t type;
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; /* for accumulate */
/* Used to complete operations */
struct MPID_Request *request;
MPIDI_RMA_dtype_info dtype_info;
void *dataloop;
void *result_addr;
int result_count;
MPI_Datatype result_datatype;
void *compare_addr;
int compare_count;
MPI_Datatype compare_datatype;
} MPIDI_RMA_Op_t;
typedef struct MPIDI_PT_single_op {
int type; /* put, get, or accum. */
void *addr;
int count;
MPI_Datatype datatype;
MPI_Op op;
void *data; /* for queued puts and accumulates, data is copied here */
MPI_Request request_handle; /* for gets */
int data_recd; /* to indicate if the data has been received */
MPIDI_CH3_Pkt_flags_t flags;
} MPIDI_PT_single_op;
typedef struct MPIDI_Win_lock_queue {
struct MPIDI_Win_lock_queue *next;
int lock_type;
MPI_Win source_win_handle;
MPIDI_VC_t *vc;
struct MPIDI_PT_single_op *pt_single_op; /* to store info for
* lock-put-unlock optimization */
} MPIDI_Win_lock_queue;
typedef MPIDI_RMA_Op_t *MPIDI_RMA_Ops_list_t;
#endif /* MPID_RMA_TYPES_H_INCLUDED */
......@@ -1228,8 +1228,6 @@ void MPIDI_CH3_RMA_Init_Pvars(void);
/* internal */
int MPIDI_CH3I_Release_lock(MPID_Win * win_ptr);
int MPIDI_CH3I_Try_acquire_win_lock(MPID_Win * win_ptr, int requested_lock);
int MPIDI_CH3I_Send_lock_granted_pkt(MPIDI_VC_t * vc, MPID_Win *win_ptr, int source_win_hdl);
int MPIDI_CH3I_Send_pt_rma_done_pkt(MPIDI_VC_t * vc, MPID_Win *win_ptr, int source_win_hdl);
int MPIDI_CH3_Start_rma_op_target(MPID_Win *win_ptr, MPIDI_CH3_Pkt_flags_t flags);
int MPIDI_CH3_Finish_rma_op_target(MPIDI_VC_t *vc, MPID_Win *win_ptr, int is_rma_update,
MPIDI_CH3_Pkt_flags_t flags, MPI_Win source_win_handle);
......
This diff is collapsed.
......@@ -17,10 +17,11 @@ mpi_core_sources += \
src/mpid/ch3/src/ch3u_port.c \
src/mpid/ch3/src/ch3u_recvq.c \
src/mpid/ch3/src/ch3u_request.c \
src/mpid/ch3/src/ch3u_rma_acc_ops.c \
src/mpid/ch3/src/ch3u_rma_oplist.c \
src/mpid/ch3/src/ch3u_rma_ops.c \
src/mpid/ch3/src/ch3u_rma_reqops.c \
src/mpid/ch3/src/ch3u_rma_sync.c \
src/mpid/ch3/src/ch3u_rma_pkthandler.c \
src/mpid/ch3/src/ch3u_rndv.c \
src/mpid/ch3/src/ch3u_eager.c \
src/mpid/ch3/src/ch3u_eagersync.c \
......@@ -56,6 +57,7 @@ mpi_core_sources += \
src/mpid/ch3/src/mpid_startall.c \
src/mpid/ch3/src/mpid_vc.c \
src/mpid/ch3/src/mpid_rma.c \
src/mpid/ch3/src/mpidi_rma.c \
src/mpid/ch3/src/mpidi_isend_self.c \
src/mpid/ch3/src/mpidi_pg.c \
src/mpid/ch3/src/mpidi_printf.c
......
......@@ -8,7 +8,6 @@
#include "mpidrma.h"
static int create_derived_datatype(MPID_Request * rreq, MPID_Datatype ** dtp);
static int do_accumulate_op(MPID_Request * rreq);
static int do_simple_accumulate(MPIDI_PT_single_op *single_op);
static int do_simple_get(MPID_Win *win_ptr, MPIDI_Win_lock_queue *lock_queue);
......@@ -827,119 +826,6 @@ static int create_derived_datatype(MPID_Request *req, MPID_Datatype **dtp)
return mpi_errno;
}
#undef FUNCNAME
#define FUNCNAME do_accumulate_op
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
static int do_accumulate_op(MPID_Request *rreq)
{
int mpi_errno = MPI_SUCCESS;
MPI_Aint true_lb, true_extent;
MPI_User_function *uop;
MPIDI_STATE_DECL(MPID_STATE_DO_ACCUMULATE_OP);
MPIDI_FUNC_ENTER(MPID_STATE_DO_ACCUMULATE_OP);
if (rreq->dev.op == MPI_REPLACE)
{
/* simply copy the data */
mpi_errno = MPIR_Localcopy(rreq->dev.user_buf, rreq->dev.user_count,
rreq->dev.datatype,
rreq->dev.real_user_buf,
rreq->dev.user_count,
rreq->dev.datatype);
if (mpi_errno) {
MPIU_ERR_POP(mpi_errno);
}
goto fn_exit;
}
if (HANDLE_GET_KIND(rreq->dev.op) == HANDLE_KIND_BUILTIN)
{
/* get the function by indexing into the op table */
uop = MPIR_OP_HDL_TO_FN(rreq->dev.op);
}
else
{
/* --BEGIN ERROR HANDLING-- */
mpi_errno = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OP, "**opnotpredefined", "**opnotpredefined %d", rreq->dev.op );
return mpi_errno;
/* --END ERROR HANDLING-- */
}
if (MPIR_DATATYPE_IS_PREDEFINED(rreq->dev.datatype))
{
(*uop)(rreq->dev.user_buf, rreq->dev.real_user_buf,
&(rreq->dev.user_count), &(rreq->dev.datatype));
}
else
{
/* derived datatype */
MPID_Segment *segp;
DLOOP_VECTOR *dloop_vec;
MPI_Aint first, last;
int vec_len, i, count;
MPI_Aint type_size;
MPI_Datatype type;
MPID_Datatype *dtp;
segp = MPID_Segment_alloc();
/* --BEGIN ERROR HANDLING-- */
if (!segp)
{
mpi_errno = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", 0 );
MPIDI_FUNC_EXIT(MPID_STATE_DO_ACCUMULATE_OP);
return mpi_errno;
}
/* --END ERROR HANDLING-- */
MPID_Segment_init(NULL, rreq->dev.user_count,
rreq->dev.datatype, segp, 0);
first = 0;
last = SEGMENT_IGNORE_LAST;
MPID_Datatype_get_ptr(rreq->dev.datatype, dtp);
vec_len = dtp->max_contig_blocks * rreq->dev.user_count + 1;
/* +1 needed because Rob says so */
dloop_vec = (DLOOP_VECTOR *)
MPIU_Malloc(vec_len * sizeof(DLOOP_VECTOR));
/* --BEGIN ERROR HANDLING-- */
if (!dloop_vec)
{
mpi_errno = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, "**nomem", 0 );
MPIDI_FUNC_EXIT(MPID_STATE_DO_ACCUMULATE_OP);
return mpi_errno;
}
/* --END ERROR HANDLING-- */
MPID_Segment_pack_vector(segp, first, &last, dloop_vec, &vec_len);
type = dtp->eltype;
MPID_Datatype_get_size_macro(type, type_size);
for (i=0; i<vec_len; i++)
{
MPIU_Assign_trunc(count, (dloop_vec[i].DLOOP_VECTOR_LEN)/type_size, int);
(*uop)((char *)rreq->dev.user_buf + MPIU_PtrToAint(dloop_vec[i].DLOOP_VECTOR_BUF),
(char *)rreq->dev.real_user_buf + MPIU_PtrToAint(dloop_vec[i].DLOOP_VECTOR_BUF),
&count, &type);
}
MPID_Segment_free(segp);
MPIU_Free(dloop_vec);
}
fn_exit:
/* free the temporary buffer */
MPIR_Type_get_true_extent_impl(rreq->dev.datatype, &true_lb, &true_extent);
MPIU_Free((char *) rreq->dev.user_buf + true_lb);
MPIDI_FUNC_EXIT(MPID_STATE_DO_ACCUMULATE_OP);
return mpi_errno;
fn_fail:
goto fn_exit;
}
static int entered_flag = 0;
static int entered_count = 0;
......@@ -1129,43 +1015,6 @@ int MPIDI_CH3I_Release_lock(MPID_Win *win_ptr)
}
#undef FUNCNAME
#define FUNCNAME MPIDI_CH3I_Send_pt_rma_done_pkt
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPIDI_CH3I_Send_pt_rma_done_pkt(MPIDI_VC_t *vc, MPID_Win *win_ptr,
MPI_Win source_win_handle)
{
MPIDI_CH3_Pkt_t upkt;
MPIDI_CH3_Pkt_pt_rma_done_t *pt_rma_done_pkt = &upkt.pt_rma_done;
MPID_Request *req;
int mpi_errno=MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_CH3I_SEND_PT_RMA_DONE_PKT);
MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_CH3I_SEND_PT_RMA_DONE_PKT);
MPIDI_Pkt_init(pt_rma_done_pkt, MPIDI_CH3_PKT_PT_RMA_DONE);
pt_rma_done_pkt->source_win_handle = source_win_handle;
pt_rma_done_pkt->target_rank = win_ptr->comm_ptr->rank;
/* Because this is in a packet handler, it is already within a critical section */
/* MPIU_THREAD_CS_ENTER(CH3COMM,vc); */
mpi_errno = MPIDI_CH3_iStartMsg(vc, pt_rma_done_pkt, sizeof(*pt_rma_done_pkt), &req);
/* MPIU_THREAD_CS_EXIT(CH3COMM,vc); */
if (mpi_errno != MPI_SUCCESS) {
MPIU_ERR_SETANDJUMP(mpi_errno,MPI_ERR_OTHER,"**ch3|rmamsg");
}
if (req != NULL)
{
MPID_Request_release(req);
}
fn_fail:
MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_CH3I_SEND_PT_RMA_DONE_PKT);
return mpi_errno;
}
#undef FUNCNAME
#define FUNCNAME do_simple_accumulate
......
This diff is collapsed.
......@@ -11,107 +11,6 @@ static int enableShortACC = 1;
#define MPIDI_PASSIVE_TARGET_DONE_TAG 348297
#define MPIDI_PASSIVE_TARGET_RMA_TAG 563924
/*
* TODO:
* Explore use of alternate allocation mechanisms for the RMA queue elements
* (Because profiling has shown that queue element allocation/deallocation
* can take a significant amount of time in the RMA operations).
* 1: Current approach (uses perm memory malloc/free)
* 2: Preallocate and maintain list (use perm memory malloc, but
* free onto window; use first; free on window free)
* 3: Preallocate and maintain list (use separate memory, but free to
* thread/process; free in Finalize handler. Option to use for
* single-threaded to avoid thread overheads)
* Possible interface
* int MPIDI_RMAListAlloc(MPIDI_RMA_Op_t **a,MPID_Win *win)
* int MPIDI_RMAListFree(MPIDI_RMA_Op_t *a, MPID_Win *win)
* return value is error code (e.g., allocation failure).
*/
#undef FUNCNAME
#define FUNCNAME MPIDI_Win_free
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPIDI_Win_free(MPID_Win ** win_ptr)
{
int mpi_errno = MPI_SUCCESS;
int in_use;
MPID_Comm *comm_ptr;
int errflag = FALSE;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_FREE);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_FREE);
MPIU_ERR_CHKANDJUMP((*win_ptr)->epoch_state != MPIDI_EPOCH_NONE,
mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
if (!(*win_ptr)->shm_allocated) {
/* when SHM is allocated, we already did a global barrier in
MPIDI_CH3_SHM_Win_free, so we do not need to do it again here. */
mpi_errno = MPIR_Barrier_impl((*win_ptr)->comm_ptr, &errflag);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
}
comm_ptr = (*win_ptr)->comm_ptr;
mpi_errno = MPIR_Comm_free_impl(comm_ptr);
if (mpi_errno)
MPIU_ERR_POP(mpi_errno);
MPIU_Free((*win_ptr)->targets);
MPIU_Free((*win_ptr)->base_addrs);
MPIU_Free((*win_ptr)->sizes);
MPIU_Free((*win_ptr)->disp_units);
MPIU_Free((*win_ptr)->all_win_handles);
/* Free the attached buffer for windows created with MPI_Win_allocate() */
if ((*win_ptr)->create_flavor == MPI_WIN_FLAVOR_ALLOCATE ||
(*win_ptr)->create_flavor == MPI_WIN_FLAVOR_SHARED) {
if ((*win_ptr)->shm_allocated == FALSE && (*win_ptr)->size > 0) {
MPIU_Free((*win_ptr)->base);
}
}
MPIU_Object_release_ref(*win_ptr, &in_use);
/* MPI windows don't have reference count semantics, so this should always be true */
MPIU_Assert(!in_use);
MPIU_Handle_obj_free(&MPID_Win_mem, *win_ptr);
fn_exit:
MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_FREE);
return mpi_errno;
fn_fail:
goto fn_exit;
}
#undef FUNCNAME
#define FUNCNAME MPIDI_Win_shared_query
#undef FCNAME
#define FCNAME MPIDI_QUOTE(FUNCNAME)
int MPIDI_Win_shared_query(MPID_Win * win_ptr, int target_rank, MPI_Aint * size,
int *disp_unit, void *baseptr)
{
int mpi_errno = MPI_SUCCESS;
MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_SHARED_QUERY);
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_SHARED_QUERY);
*(void **) baseptr = win_ptr->base;