[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b3-235-g113ef90
Service Account
noreply at mpich.org
Wed Jul 15 18:13:05 CDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".
The branch, master has been updated
via 113ef90ed25eafdce0ae38f7e3c8eb437301bed3 (commit)
via 9466c93eace5e6f6274fe9dcdb24e7f445d2b297 (commit)
from 38f16de0dc3631de657b4042b070554181d4a5b4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/113ef90ed25eafdce0ae38f7e3c8eb437301bed3
commit 113ef90ed25eafdce0ae38f7e3c8eb437301bed3
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date: Wed Jul 15 17:44:55 2015 -0500
Delete RMA function table and expose "MPID_" RMA functions from CH3 to MPI layer.
Signed-off-by: Pavan Balaji <balaji at anl.gov>
diff --git a/src/include/mpiimpl.h b/src/include/mpiimpl.h
index 7cd95f9..9bf3442 100644
--- a/src/include/mpiimpl.h
+++ b/src/include/mpiimpl.h
@@ -1584,101 +1584,6 @@ MPID_Progress_state;
/* end of mpirma.h (in src/mpi/rma?) */
/* ------------------------------------------------------------------------- */
-/*
- * To provide more flexibility in the handling of RMA operations, we provide
- * these options:
- *
- * Statically defined ADI routines
- * MPID_Put etc, provided by the ADI
- * Dynamically defined routines
- * A function table is used, initialized during window creation
- *
- * Which of these is used is selected by the device. If USE_MPID_RMA_TABLE is
- * defined, then the function table is used. Otherwise, the calls turn into
- * MPID_<Rma operation>, e.g., MPID_Put or MPID_Win_create.
- */
-
-/* We need to export this header file (at least the struct) to the
- device, so that it can implement the init routine. */
-#ifdef USE_MPID_RMA_TABLE
-#define MPIR_RMA_CALL(winptr,funccall) (winptr)->RMAFns.funccall
-
-#else
-/* Just use the MPID_<fcn> version of the function */
-#define MPIR_RMA_CALL(winptr,funccall) MPID_##funccall
-
-#endif /* USE_MPID_RMA_TABLE */
-
-/* Windows */
-#ifdef USE_MPID_RMA_TABLE
-struct MPID_Win;
-typedef struct MPID_RMA_Ops {
- int (*Win_free)(struct MPID_Win **);
-
- int (*Put) (const void *, int, MPI_Datatype, int, MPI_Aint, int,
- MPI_Datatype, struct MPID_Win *);
- int (*Get) (void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype,
- struct MPID_Win *);
- int (*Accumulate) (const void *, int, MPI_Datatype, int, MPI_Aint, int,
- MPI_Datatype, MPI_Op, struct MPID_Win *);
-
- int (*Win_fence)(int, struct MPID_Win *);
- int (*Win_post)(MPID_Group *, int, struct MPID_Win *);
- int (*Win_start)(MPID_Group *, int, struct MPID_Win *);
- int (*Win_complete)(struct MPID_Win *);
- int (*Win_wait)(struct MPID_Win *);
- int (*Win_test)(struct MPID_Win *, int *);
-
- int (*Win_lock)(int, int, int, struct MPID_Win *);
- int (*Win_unlock)(int, struct MPID_Win *);
-
- /* MPI-3 Functions */
- int (*Win_attach)(struct MPID_Win *, void *, MPI_Aint);
- int (*Win_detach)(struct MPID_Win *, const void *);
- int (*Win_shared_query)(struct MPID_Win *, int, MPI_Aint *, int *, void *);
-
- int (*Win_set_info)(struct MPID_Win *, MPID_Info *);
- int (*Win_get_info)(struct MPID_Win *, MPID_Info **);
-
- int (*Win_lock_all)(int, struct MPID_Win *);
- int (*Win_unlock_all)(struct MPID_Win *);
-
- int (*Win_flush)(int, struct MPID_Win *);
- int (*Win_flush_all)(struct MPID_Win *);
- int (*Win_flush_local)(int, struct MPID_Win *);
- int (*Win_flush_local_all)(struct MPID_Win *);
- int (*Win_sync)(struct MPID_Win *);
-
- int (*Get_accumulate)(const void *, int , MPI_Datatype, void *, int,
- MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Op,
- struct MPID_Win *);
- int (*Fetch_and_op)(const void *, void *, MPI_Datatype, int, MPI_Aint, MPI_Op,
- struct MPID_Win *);
- int (*Compare_and_swap)(const void *, const void *, void *, MPI_Datatype, int,
- MPI_Aint, struct MPID_Win *);
-
- int (*Rput)(const void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype,
- struct MPID_Win *, MPID_Request**);
- int (*Rget)(void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype,
- struct MPID_Win *, MPID_Request**);
- int (*Raccumulate)(const void *, int, MPI_Datatype, int, MPI_Aint, int,
- MPI_Datatype, MPI_Op, struct MPID_Win *, MPID_Request**);
- int (*Rget_accumulate)(const void *, int , MPI_Datatype, void *, int,
- MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Op,
- struct MPID_Win *, MPID_Request**);
-
-} MPID_RMAFns;
-#define MPID_RMAFNS_VERSION 2
-/* Note that the memory allocation/free routines do not take a window,
- so they must be initialized separately, and are a per-run, not per-window
- object. If the device can manage different kinds of memory allocations,
- these routines must internally provide that flexibility. */
-/*
- void *(*Alloc_mem)(size_t, MPID_Info *);
- int (*Free_mem)(void *);
-*/
-#endif
-
/*S
MPID_Win - Description of the Window Object data structure.
@@ -1731,10 +1636,6 @@ typedef struct MPID_Win {
HANDLE passive_target_thread_id;
#endif
#endif
- /* */
-#ifdef USE_MPID_RMA_TABLE
- MPID_RMAFns RMAFns;
-#endif
/* These are COPIES of the values so that addresses to them
can be returned as attributes. They are initialized by the
MPI_Win_get_attr function.
diff --git a/src/mpi/rma/accumulate.c b/src/mpi/rma/accumulate.c
index d9c9033..c9521e4 100644
--- a/src/mpi/rma/accumulate.c
+++ b/src/mpi/rma/accumulate.c
@@ -144,11 +144,11 @@ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
# endif /* HAVE_ERROR_CHECKING */
/* ... body of routine ... */
-
- mpi_errno = MPIR_RMA_CALL(win_ptr,Accumulate(origin_addr, origin_count,
- origin_datatype,
- target_rank, target_disp, target_count,
- target_datatype, op, win_ptr));
+
+ mpi_errno = MPID_Accumulate(origin_addr, origin_count,
+ origin_datatype,
+ target_rank, target_disp, target_count,
+ target_datatype, op, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/compare_and_swap.c b/src/mpi/rma/compare_and_swap.c
index ba0b1d2..5b134d2 100644
--- a/src/mpi/rma/compare_and_swap.c
+++ b/src/mpi/rma/compare_and_swap.c
@@ -133,10 +133,10 @@ int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Compare_and_swap(origin_addr,
- compare_addr, result_addr,
- datatype, target_rank,
- target_disp, win_ptr));
+ mpi_errno = MPID_Compare_and_swap(origin_addr,
+ compare_addr, result_addr,
+ datatype, target_rank,
+ target_disp, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/fetch_and_op.c b/src/mpi/rma/fetch_and_op.c
index 3f51b6c..cdb2765 100644
--- a/src/mpi/rma/fetch_and_op.c
+++ b/src/mpi/rma/fetch_and_op.c
@@ -149,10 +149,10 @@ int MPI_Fetch_and_op(const void *origin_addr, void *result_addr,
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Fetch_and_op(origin_addr,
- result_addr, datatype,
- target_rank, target_disp,
- op, win_ptr));
+ mpi_errno = MPID_Fetch_and_op(origin_addr,
+ result_addr, datatype,
+ target_rank, target_disp,
+ op, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/get.c b/src/mpi/rma/get.c
index 9b0f96e..438de38 100644
--- a/src/mpi/rma/get.c
+++ b/src/mpi/rma/get.c
@@ -138,11 +138,10 @@ int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype
# endif /* HAVE_ERROR_CHECKING */
/* ... body of routine ... */
-
- mpi_errno = MPIR_RMA_CALL(win_ptr,
- Get(origin_addr, origin_count, origin_datatype,
- target_rank, target_disp, target_count,
- target_datatype, win_ptr));
+
+ mpi_errno = MPID_Get(origin_addr, origin_count, origin_datatype,
+ target_rank, target_disp, target_count,
+ target_datatype, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/get_accumulate.c b/src/mpi/rma/get_accumulate.c
index b7d0ec0..0489d59 100644
--- a/src/mpi/rma/get_accumulate.c
+++ b/src/mpi/rma/get_accumulate.c
@@ -197,12 +197,12 @@ int MPI_Get_accumulate(const void *origin_addr, int origin_count,
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Get_accumulate(origin_addr, origin_count,
- origin_datatype,
- result_addr, result_count,
- result_datatype,
- target_rank, target_disp, target_count,
- target_datatype, op, win_ptr));
+ mpi_errno = MPID_Get_accumulate(origin_addr, origin_count,
+ origin_datatype,
+ result_addr, result_count,
+ result_datatype,
+ target_rank, target_disp, target_count,
+ target_datatype, op, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/put.c b/src/mpi/rma/put.c
index 959f879..e5511cc 100644
--- a/src/mpi/rma/put.c
+++ b/src/mpi/rma/put.c
@@ -139,10 +139,9 @@ int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,
- Put(origin_addr, origin_count, origin_datatype,
- target_rank, target_disp, target_count,
- target_datatype, win_ptr));
+ mpi_errno = MPID_Put(origin_addr, origin_count, origin_datatype,
+ target_rank, target_disp, target_count,
+ target_datatype, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/raccumulate.c b/src/mpi/rma/raccumulate.c
index f330715..c861c70 100644
--- a/src/mpi/rma/raccumulate.c
+++ b/src/mpi/rma/raccumulate.c
@@ -160,10 +160,10 @@ int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Raccumulate(origin_addr, origin_count,
- origin_datatype,
- target_rank, target_disp, target_count,
- target_datatype, op, win_ptr, &request_ptr));
+ mpi_errno = MPID_Raccumulate(origin_addr, origin_count,
+ origin_datatype,
+ target_rank, target_disp, target_count,
+ target_datatype, op, win_ptr, &request_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
*request = request_ptr->handle;
diff --git a/src/mpi/rma/rget.c b/src/mpi/rma/rget.c
index 182c957..edf092e 100644
--- a/src/mpi/rma/rget.c
+++ b/src/mpi/rma/rget.c
@@ -154,10 +154,9 @@ int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,
- Rget(origin_addr, origin_count, origin_datatype,
- target_rank, target_disp, target_count,
- target_datatype, win_ptr, &request_ptr));
+ mpi_errno = MPID_Rget(origin_addr, origin_count, origin_datatype,
+ target_rank, target_disp, target_count,
+ target_datatype, win_ptr, &request_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
*request = request_ptr->handle;
diff --git a/src/mpi/rma/rget_accumulate.c b/src/mpi/rma/rget_accumulate.c
index 7a8f1e2..28a592c 100644
--- a/src/mpi/rma/rget_accumulate.c
+++ b/src/mpi/rma/rget_accumulate.c
@@ -186,13 +186,13 @@ int MPI_Rget_accumulate(const void *origin_addr, int origin_count,
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Rget_accumulate(origin_addr, origin_count,
- origin_datatype,
- result_addr, result_count,
- result_datatype,
- target_rank, target_disp, target_count,
- target_datatype, op, win_ptr,
- &request_ptr));
+ mpi_errno = MPID_Rget_accumulate(origin_addr, origin_count,
+ origin_datatype,
+ result_addr, result_count,
+ result_datatype,
+ target_rank, target_disp, target_count,
+ target_datatype, op, win_ptr,
+ &request_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
*request = request_ptr->handle;
diff --git a/src/mpi/rma/rput.c b/src/mpi/rma/rput.c
index fe2164b..fd4393e 100644
--- a/src/mpi/rma/rput.c
+++ b/src/mpi/rma/rput.c
@@ -156,10 +156,9 @@ int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,
- Rput(origin_addr, origin_count, origin_datatype,
- target_rank, target_disp, target_count,
- target_datatype, win_ptr, &request_ptr));
+ mpi_errno = MPID_Rput(origin_addr, origin_count, origin_datatype,
+ target_rank, target_disp, target_count,
+ target_datatype, win_ptr, &request_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
*request = request_ptr->handle;
diff --git a/src/mpi/rma/win_attach.c b/src/mpi/rma/win_attach.c
index 789b8c0..ffad72f 100644
--- a/src/mpi/rma/win_attach.c
+++ b/src/mpi/rma/win_attach.c
@@ -120,8 +120,7 @@ int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size)
if (size == 0) goto fn_exit;
- mpi_errno = MPIR_RMA_CALL(win_ptr,
- Win_attach(win_ptr, base, size));
+ mpi_errno = MPID_Win_attach(win_ptr, base, size);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_complete.c b/src/mpi/rma/win_complete.c
index fbd9a4d..95e8f7b 100644
--- a/src/mpi/rma/win_complete.c
+++ b/src/mpi/rma/win_complete.c
@@ -87,7 +87,7 @@ int MPI_Win_complete(MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_complete(win_ptr));
+ mpi_errno = MPID_Win_complete(win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_detach.c b/src/mpi/rma/win_detach.c
index 773329a..0cf90e3 100644
--- a/src/mpi/rma/win_detach.c
+++ b/src/mpi/rma/win_detach.c
@@ -102,8 +102,7 @@ int MPI_Win_detach(MPI_Win win, const void *base)
if (base == NULL) goto fn_exit;
- mpi_errno = MPIR_RMA_CALL(win_ptr,
- Win_detach(win_ptr, base));
+ mpi_errno = MPID_Win_detach(win_ptr, base);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_fence.c b/src/mpi/rma/win_fence.c
index 9625dff..bfff382 100644
--- a/src/mpi/rma/win_fence.c
+++ b/src/mpi/rma/win_fence.c
@@ -108,7 +108,7 @@ int MPI_Win_fence(int assert, MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_fence(assert, win_ptr));
+ mpi_errno = MPID_Win_fence(assert, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_flush.c b/src/mpi/rma/win_flush.c
index 2b19292..2fa6e67 100644
--- a/src/mpi/rma/win_flush.c
+++ b/src/mpi/rma/win_flush.c
@@ -103,7 +103,7 @@ int MPI_Win_flush(int rank, MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_flush(rank, win_ptr));
+ mpi_errno = MPID_Win_flush(rank, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_flush_all.c b/src/mpi/rma/win_flush_all.c
index 06275d5..e5aedac 100644
--- a/src/mpi/rma/win_flush_all.c
+++ b/src/mpi/rma/win_flush_all.c
@@ -97,7 +97,7 @@ int MPI_Win_flush_all(MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_flush_all(win_ptr));
+ mpi_errno = MPID_Win_flush_all(win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_flush_local.c b/src/mpi/rma/win_flush_local.c
index bde4a50..7a63b2c 100644
--- a/src/mpi/rma/win_flush_local.c
+++ b/src/mpi/rma/win_flush_local.c
@@ -105,7 +105,7 @@ int MPI_Win_flush_local(int rank, MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_flush_local(rank, win_ptr));
+ mpi_errno = MPID_Win_flush_local(rank, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_flush_local_all.c b/src/mpi/rma/win_flush_local_all.c
index 5780952..829e216 100644
--- a/src/mpi/rma/win_flush_local_all.c
+++ b/src/mpi/rma/win_flush_local_all.c
@@ -95,7 +95,7 @@ int MPI_Win_flush_local_all(MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_flush_local_all(win_ptr));
+ mpi_errno = MPID_Win_flush_local_all(win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_free.c b/src/mpi/rma/win_free.c
index 3772364..b96be5a 100644
--- a/src/mpi/rma/win_free.c
+++ b/src/mpi/rma/win_free.c
@@ -117,7 +117,7 @@ int MPI_Win_free(MPI_Win *win)
}
}
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_free(&win_ptr));
+ mpi_errno = MPID_Win_free(&win_ptr);
if (mpi_errno) goto fn_fail;
*win = MPI_WIN_NULL;
diff --git a/src/mpi/rma/win_lock.c b/src/mpi/rma/win_lock.c
index af8556b..4cc647d 100644
--- a/src/mpi/rma/win_lock.c
+++ b/src/mpi/rma/win_lock.c
@@ -136,8 +136,7 @@ int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,
- Win_lock(lock_type, rank, assert, win_ptr));
+ mpi_errno = MPID_Win_lock(lock_type, rank, assert, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_lock_all.c b/src/mpi/rma/win_lock_all.c
index f1a7bd0..c50b5c2 100644
--- a/src/mpi/rma/win_lock_all.c
+++ b/src/mpi/rma/win_lock_all.c
@@ -130,8 +130,7 @@ int MPI_Win_lock_all(int assert, MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,
- Win_lock_all(assert, win_ptr));
+ mpi_errno = MPID_Win_lock_all(assert, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_post.c b/src/mpi/rma/win_post.c
index ca6534c..c89cd7f 100644
--- a/src/mpi/rma/win_post.c
+++ b/src/mpi/rma/win_post.c
@@ -111,7 +111,7 @@ int MPI_Win_post(MPI_Group group, int assert, MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_post(group_ptr, assert, win_ptr));
+ mpi_errno = MPID_Win_post(group_ptr, assert, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_shared_query.c b/src/mpi/rma/win_shared_query.c
index 800c432..a7140b0 100644
--- a/src/mpi/rma/win_shared_query.c
+++ b/src/mpi/rma/win_shared_query.c
@@ -122,8 +122,7 @@ int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit,
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,
- Win_shared_query(win_ptr, rank, size, disp_unit, baseptr));
+ mpi_errno = MPID_Win_shared_query(win_ptr, rank, size, disp_unit, baseptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_start.c b/src/mpi/rma/win_start.c
index c73a915..373cfab 100644
--- a/src/mpi/rma/win_start.c
+++ b/src/mpi/rma/win_start.c
@@ -112,7 +112,7 @@ int MPI_Win_start(MPI_Group group, int assert, MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_start(group_ptr, assert, win_ptr));
+ mpi_errno = MPID_Win_start(group_ptr, assert, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_sync.c b/src/mpi/rma/win_sync.c
index b7e660e..1719a18 100644
--- a/src/mpi/rma/win_sync.c
+++ b/src/mpi/rma/win_sync.c
@@ -97,7 +97,7 @@ int MPI_Win_sync(MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_sync(win_ptr));
+ mpi_errno = MPID_Win_sync(win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_test.c b/src/mpi/rma/win_test.c
index 2983379..804e02a 100644
--- a/src/mpi/rma/win_test.c
+++ b/src/mpi/rma/win_test.c
@@ -98,7 +98,7 @@ int MPI_Win_test(MPI_Win win, int *flag)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_test(win_ptr, flag));
+ mpi_errno = MPID_Win_test(win_ptr, flag);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_unlock.c b/src/mpi/rma/win_unlock.c
index db59daa..cbfa6f8 100644
--- a/src/mpi/rma/win_unlock.c
+++ b/src/mpi/rma/win_unlock.c
@@ -98,7 +98,7 @@ int MPI_Win_unlock(int rank, MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_unlock(rank, win_ptr));
+ mpi_errno = MPID_Win_unlock(rank, win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_unlock_all.c b/src/mpi/rma/win_unlock_all.c
index 89b0b74..a4bc0f8 100644
--- a/src/mpi/rma/win_unlock_all.c
+++ b/src/mpi/rma/win_unlock_all.c
@@ -100,7 +100,7 @@ int MPI_Win_unlock_all(MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_unlock_all(win_ptr));
+ mpi_errno = MPID_Win_unlock_all(win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpi/rma/win_wait.c b/src/mpi/rma/win_wait.c
index bfb59d1..c51dcf5 100644
--- a/src/mpi/rma/win_wait.c
+++ b/src/mpi/rma/win_wait.c
@@ -88,7 +88,7 @@ int MPI_Win_wait(MPI_Win win)
/* ... body of routine ... */
- mpi_errno = MPIR_RMA_CALL(win_ptr,Win_wait(win_ptr));
+ mpi_errno = MPID_Win_wait(win_ptr);
if (mpi_errno != MPI_SUCCESS) goto fn_fail;
/* ... end of body of routine ... */
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 3045dca..2fef156 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -1194,83 +1194,6 @@ int MPIDI_CH3U_Win_gather_info(void *, MPI_Aint, int, MPID_Info *, MPID_Comm *,
MPID_Win **);
-/* MPI-2 RMA Routines */
-
-int MPIDI_Win_create(void *, MPI_Aint, int, MPID_Info *, MPID_Comm *,
- MPID_Win **);
-int MPIDI_Win_free(MPID_Win **);
-
-int MPIDI_Put(const void *, int, MPI_Datatype, int, MPI_Aint, int,
- MPI_Datatype, MPID_Win *);
-int MPIDI_Get(void *, int, MPI_Datatype, int, MPI_Aint, int,
- MPI_Datatype, MPID_Win *);
-int MPIDI_Accumulate(const void *, int, MPI_Datatype, int, MPI_Aint, int,
- MPI_Datatype, MPI_Op, MPID_Win *);
-
-int MPIDI_Win_fence(int, MPID_Win *);
-int MPIDI_Win_post(MPID_Group *group_ptr, int assert, MPID_Win *win_ptr);
-int MPIDI_Win_start(MPID_Group *group_ptr, int assert, MPID_Win *win_ptr);
-int MPIDI_Win_test(MPID_Win *win_ptr, int *flag);
-int MPIDI_Win_wait(MPID_Win *win_ptr);
-int MPIDI_Win_complete(MPID_Win *win_ptr);
-
-int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win *win_ptr);
-int MPIDI_Win_unlock(int dest, MPID_Win *win_ptr);
-
-/* MPI-3 RMA Routines */
-
-int MPIDI_Win_allocate(MPI_Aint size, int disp_unit, MPID_Info *info,
- MPID_Comm *comm, void *baseptr, MPID_Win **win);
-int MPIDI_Win_allocate_shared(MPI_Aint size, MPID_Info *info_ptr, MPID_Comm *comm_ptr,
- void **baseptr, MPID_Win **win_ptr);
-int MPIDI_Win_create_dynamic(MPID_Info *info, MPID_Comm *comm, MPID_Win **win);
-int MPIDI_Win_attach(MPID_Win *win, void *base, MPI_Aint size);
-int MPIDI_Win_detach(MPID_Win *win, const void *base);
-int MPIDI_Win_shared_query(MPID_Win *win_ptr, int rank, MPI_Aint *size, int *disp_unit, void *base);
-
-int MPIDI_Win_set_info(MPID_Win *win, MPID_Info *info);
-int MPIDI_Win_get_info(MPID_Win *win, MPID_Info **info_used);
-
-int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
- MPI_Datatype origin_datatype, void *result_addr, int result_count,
- MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPI_Op op, MPID_Win *win);
-int MPIDI_Fetch_and_op(const void *origin_addr, void *result_addr,
- MPI_Datatype datatype, int target_rank, MPI_Aint target_disp,
- MPI_Op op, MPID_Win *win);
-int MPIDI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
- void *result_addr, MPI_Datatype datatype, int target_rank,
- MPI_Aint target_disp, MPID_Win *win);
-int MPIDI_Rput(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,
- MPID_Request **request);
-int MPIDI_Rget(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,
- MPID_Request **request);
-int MPIDI_Raccumulate(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,
- MPID_Request **request);
-int MPIDI_Rget_accumulate(const void *origin_addr, int origin_count,
- MPI_Datatype origin_datatype, void *result_addr, int result_count,
- MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPI_Op op, MPID_Win *win,
- MPID_Request **request);
-
-int MPIDI_Win_lock_all(int assert, MPID_Win *win);
-int MPIDI_Win_unlock_all(MPID_Win *win);
-int MPIDI_Win_flush(int rank, MPID_Win *win);
-int MPIDI_Win_flush_all(MPID_Win *win);
-int MPIDI_Win_flush_local(int rank, MPID_Win *win);
-int MPIDI_Win_flush_local_all(MPID_Win *win);
-int MPIDI_Win_sync(MPID_Win *win);
-
-
-void *MPIDI_Alloc_mem(size_t size, MPID_Info *info_ptr);
-int MPIDI_Free_mem(void *ptr);
-
#ifdef MPIDI_CH3I_HAS_ALLOC_MEM
void* MPIDI_CH3I_Alloc_mem(size_t size, MPID_Info *info_ptr);
/* fallback to MPIU_Malloc if channel does not have its own RMA memory allocator */
diff --git a/src/mpid/ch3/include/mpidpre.h b/src/mpid/ch3/include/mpidpre.h
index bfba003..c5d8c47 100644
--- a/src/mpid/ch3/include/mpidpre.h
+++ b/src/mpid/ch3/include/mpidpre.h
@@ -485,8 +485,4 @@ MPID_REQUEST_DECL
/* Tell initthread to prepare a private comm_world */
#define MPID_NEEDS_ICOMM_WORLD
-/* Tell the RMA code to use a table of RMA functions provided by the
- ADI */
-#define USE_MPID_RMA_TABLE
-
#endif /* !defined(MPICH_MPIDPRE_H_INCLUDED) */
diff --git a/src/mpid/ch3/src/ch3u_rma_ops.c b/src/mpid/ch3/src/ch3u_rma_ops.c
index 3cb0b36..357db59 100644
--- a/src/mpid/ch3/src/ch3u_rma_ops.c
+++ b/src/mpid/ch3/src/ch3u_rma_ops.c
@@ -853,24 +853,24 @@ int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count,
#undef FUNCNAME
-#define FUNCNAME MPIDI_Put
+#define FUNCNAME MPID_Put
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_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 MPID_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 mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_PUT);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_PUT);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_PUT);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_PUT);
mpi_errno = MPIDI_CH3I_Put(origin_addr, origin_count, origin_datatype,
target_rank, target_disp, target_count, target_datatype,
win_ptr, NULL);
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_PUT);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_PUT);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
@@ -880,24 +880,24 @@ int MPIDI_Put(const void *origin_addr, int origin_count, MPI_Datatype
}
#undef FUNCNAME
-#define FUNCNAME MPIDI_Get
+#define FUNCNAME MPID_Get
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_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 MPID_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 mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_GET);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_GET);
mpi_errno = MPIDI_CH3I_Get(origin_addr, origin_count, origin_datatype,
target_rank, target_disp, target_count, target_datatype,
win_ptr, NULL);
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_GET);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_GET);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
@@ -907,24 +907,24 @@ int MPIDI_Get(void *origin_addr, int origin_count, MPI_Datatype
}
#undef FUNCNAME
-#define FUNCNAME MPIDI_Accumulate
+#define FUNCNAME MPID_Accumulate
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_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 MPID_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 mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_ACCUMULATE);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_ACCUMULATE);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_ACCUMULATE);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_ACCUMULATE);
mpi_errno = MPIDI_CH3I_Accumulate(origin_addr, origin_count, origin_datatype,
target_rank, target_disp, target_count, target_datatype,
op, win_ptr, NULL);
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_ACCUMULATE);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_ACCUMULATE);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
@@ -934,19 +934,19 @@ int MPIDI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype
}
#undef FUNCNAME
-#define FUNCNAME MPIDI_Get_accumulate
+#define FUNCNAME MPID_Get_accumulate
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
- MPI_Datatype origin_datatype, void *result_addr, int result_count,
- MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPI_Op op,
- MPID_Win * win_ptr)
+int MPID_Get_accumulate(const void *origin_addr, int origin_count,
+ MPI_Datatype origin_datatype, void *result_addr, int result_count,
+ MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPI_Op op,
+ MPID_Win * win_ptr)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_GET_ACCUMULATE);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_GET_ACCUMULATE);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_GET_ACCUMULATE);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_GET_ACCUMULATE);
mpi_errno = MPIDI_CH3I_Get_accumulate(origin_addr, origin_count, origin_datatype,
result_addr, result_count, result_datatype,
@@ -954,7 +954,7 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
target_datatype, op, win_ptr, NULL);
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_GET_ACCUMULATE);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_GET_ACCUMULATE);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
@@ -965,21 +965,21 @@ int MPIDI_Get_accumulate(const void *origin_addr, int origin_count,
#undef FUNCNAME
-#define FUNCNAME MPIDI_Compare_and_swap
+#define FUNCNAME MPID_Compare_and_swap
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
- void *result_addr, MPI_Datatype datatype, int target_rank,
- MPI_Aint target_disp, MPID_Win * win_ptr)
+int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr,
+ void *result_addr, MPI_Datatype datatype, int target_rank,
+ MPI_Aint target_disp, MPID_Win * win_ptr)
{
int mpi_errno = MPI_SUCCESS;
int rank;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
int made_progress = 0;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_COMPARE_AND_SWAP);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_COMPARE_AND_SWAP);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_COMPARE_AND_SWAP);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_COMPARE_AND_SWAP);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state == MPIDI_RMA_NONE,
mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
@@ -1094,7 +1094,7 @@ int MPIDI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_COMPARE_AND_SWAP);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_COMPARE_AND_SWAP);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1104,21 +1104,21 @@ int MPIDI_Compare_and_swap(const void *origin_addr, const void *compare_addr,
#undef FUNCNAME
-#define FUNCNAME MPIDI_Fetch_and_op
+#define FUNCNAME MPID_Fetch_and_op
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Fetch_and_op(const void *origin_addr, void *result_addr,
- MPI_Datatype datatype, int target_rank,
- MPI_Aint target_disp, MPI_Op op, MPID_Win * win_ptr)
+int MPID_Fetch_and_op(const void *origin_addr, void *result_addr,
+ MPI_Datatype datatype, int target_rank,
+ MPI_Aint target_disp, MPI_Op op, MPID_Win * win_ptr)
{
int mpi_errno = MPI_SUCCESS;
int rank;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
int made_progress = 0;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_FETCH_AND_OP);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_FETCH_AND_OP);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_FETCH_AND_OP);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_FETCH_AND_OP);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state == MPIDI_RMA_NONE,
mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
@@ -1241,7 +1241,7 @@ int MPIDI_Fetch_and_op(const void *origin_addr, void *result_addr,
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_FETCH_AND_OP);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_FETCH_AND_OP);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
diff --git a/src/mpid/ch3/src/ch3u_rma_reqops.c b/src/mpid/ch3/src/ch3u_rma_reqops.c
index 9737925..0a870ce 100644
--- a/src/mpid/ch3/src/ch3u_rma_reqops.c
+++ b/src/mpid/ch3/src/ch3u_rma_reqops.c
@@ -9,13 +9,13 @@
#include "mpidrma.h"
#undef FUNCNAME
-#define FUNCNAME MPIDI_Rput
+#define FUNCNAME MPID_Rput
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Rput(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,
- MPID_Request ** request)
+int MPID_Rput(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,
+ MPID_Request ** request)
{
int mpi_errno = MPI_SUCCESS;
int dt_contig ATTRIBUTE((unused));
@@ -23,9 +23,9 @@ int MPIDI_Rput(const void *origin_addr, int origin_count,
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPIDI_msg_sz_t data_sz;
MPID_Request *ureq;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_RPUT);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_RPUT);
- MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_RPUT);
+ MPIDI_FUNC_ENTER(MPID_STATE_MPID_RPUT);
/* request-based RMA operations are only valid within a passive epoch */
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PER_TARGET &&
@@ -63,7 +63,7 @@ int MPIDI_Rput(const void *origin_addr, int origin_count,
*request = ureq;
fn_exit:
- MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_RPUT);
+ MPIDI_FUNC_EXIT(MPID_STATE_MPID_RPUT);
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -71,13 +71,13 @@ int MPIDI_Rput(const void *origin_addr, int origin_count,
#undef FUNCNAME
-#define FUNCNAME MPIDI_Rget
+#define FUNCNAME MPID_Rget
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Rget(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,
- MPID_Request ** request)
+int MPID_Rget(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,
+ MPID_Request ** request)
{
int mpi_errno = MPI_SUCCESS;
int dt_contig ATTRIBUTE((unused));
@@ -85,9 +85,9 @@ int MPIDI_Rget(void *origin_addr, int origin_count,
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPIDI_msg_sz_t data_sz;
MPID_Request *ureq;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_RGET);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_RGET);
- MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_RGET);
+ MPIDI_FUNC_ENTER(MPID_STATE_MPID_RGET);
/* request-based RMA operations are only valid within a passive epoch */
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PER_TARGET &&
@@ -125,7 +125,7 @@ int MPIDI_Rget(void *origin_addr, int origin_count,
*request = ureq;
fn_exit:
- MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_RGET);
+ MPIDI_FUNC_EXIT(MPID_STATE_MPID_RGET);
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -133,13 +133,13 @@ int MPIDI_Rget(void *origin_addr, int origin_count,
#undef FUNCNAME
-#define FUNCNAME MPIDI_Raccumulate
+#define FUNCNAME MPID_Raccumulate
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Raccumulate(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,
- MPID_Request ** request)
+int MPID_Raccumulate(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,
+ MPID_Request ** request)
{
int mpi_errno = MPI_SUCCESS;
int dt_contig ATTRIBUTE((unused));
@@ -147,9 +147,9 @@ int MPIDI_Raccumulate(const void *origin_addr, int origin_count,
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPIDI_msg_sz_t data_sz;
MPID_Request *ureq;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_RACCUMULATE);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_RACCUMULATE);
- MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_RACCUMULATE);
+ MPIDI_FUNC_ENTER(MPID_STATE_MPID_RACCUMULATE);
/* request-based RMA operations are only valid within a passive epoch */
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PER_TARGET &&
@@ -187,7 +187,7 @@ int MPIDI_Raccumulate(const void *origin_addr, int origin_count,
*request = ureq;
fn_exit:
- MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_RACCUMULATE);
+ MPIDI_FUNC_EXIT(MPID_STATE_MPID_RACCUMULATE);
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -195,14 +195,14 @@ int MPIDI_Raccumulate(const void *origin_addr, int origin_count,
#undef FUNCNAME
-#define FUNCNAME MPIDI_Rget_accumulate
+#define FUNCNAME MPID_Rget_accumulate
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Rget_accumulate(const void *origin_addr, int origin_count,
- MPI_Datatype origin_datatype, void *result_addr, int result_count,
- MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
- int target_count, MPI_Datatype target_datatype, MPI_Op op,
- MPID_Win * win_ptr, MPID_Request ** request)
+int MPID_Rget_accumulate(const void *origin_addr, int origin_count,
+ MPI_Datatype origin_datatype, void *result_addr, int result_count,
+ MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
+ int target_count, MPI_Datatype target_datatype, MPI_Op op,
+ MPID_Win * win_ptr, MPID_Request ** request)
{
int mpi_errno = MPI_SUCCESS;
int dt_contig ATTRIBUTE((unused));
@@ -210,9 +210,9 @@ int MPIDI_Rget_accumulate(const void *origin_addr, int origin_count,
MPI_Aint dt_true_lb ATTRIBUTE((unused));
MPIDI_msg_sz_t data_sz, trg_data_sz;
MPID_Request *ureq;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_RGET_ACCUMULATE);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_RGET_ACCUMULATE);
- MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_RGET_ACCUMULATE);
+ MPIDI_FUNC_ENTER(MPID_STATE_MPID_RGET_ACCUMULATE);
/* request-based RMA operations are only valid within a passive epoch */
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PER_TARGET &&
@@ -253,7 +253,7 @@ int MPIDI_Rget_accumulate(const void *origin_addr, int origin_count,
*request = ureq;
fn_exit:
- MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_RGET_ACCUMULATE);
+ MPIDI_FUNC_EXIT(MPID_STATE_MPID_RGET_ACCUMULATE);
return mpi_errno;
fn_fail:
goto fn_exit;
diff --git a/src/mpid/ch3/src/ch3u_rma_sync.c b/src/mpid/ch3/src/ch3u_rma_sync.c
index 6a6b29c..5d15c47 100644
--- a/src/mpid/ch3/src/ch3u_rma_sync.c
+++ b/src/mpid/ch3/src/ch3u_rma_sync.c
@@ -320,9 +320,7 @@ void MPIDI_CH3_RMA_Init_sync_pvars(void)
/*
* 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 overriding
- * the MPID functions in the RMAFns section of MPID_Win object.
+ * in terms of the low-level, two-sided channel operations.
*/
#define SYNC_POST_TAG 100
@@ -473,10 +471,10 @@ static inline int flush_all(MPID_Win * win_ptr)
/********************************************************************************/
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_fence
+#define FUNCNAME MPID_Win_fence
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_fence(int assert, MPID_Win * win_ptr)
+int MPID_Win_fence(int assert, MPID_Win * win_ptr)
{
int i;
MPIDI_RMA_Target_t *curr_target = NULL;
@@ -486,9 +484,9 @@ int MPIDI_Win_fence(int assert, MPID_Win * win_ptr)
int *rma_target_marks = NULL;
int mpi_errno = MPI_SUCCESS;
MPIU_CHKLMEM_DECL(1);
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_FENCE);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_FENCE);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_FENCE);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_FENCE);
MPIU_ERR_CHKANDJUMP((win_ptr->states.access_state != MPIDI_RMA_NONE &&
win_ptr->states.access_state != MPIDI_RMA_FENCE_ISSUED &&
@@ -683,7 +681,7 @@ int MPIDI_Win_fence(int assert, MPID_Win * win_ptr)
fn_exit:
MPIU_CHKLMEM_FREEALL();
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_FENCE);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_FENCE);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -693,17 +691,17 @@ int MPIDI_Win_fence(int assert, MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_post
+#define FUNCNAME MPID_Win_post
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_post(MPID_Group * post_grp_ptr, int assert, MPID_Win * win_ptr)
+int MPID_Win_post(MPID_Group * post_grp_ptr, int assert, MPID_Win * win_ptr)
{
int *post_ranks_in_win_grp;
int mpi_errno = MPI_SUCCESS;
MPIU_CHKLMEM_DECL(3);
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_POST);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_POST);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_POST);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_POST);
/* Note that here we cannot distinguish if this exposure epoch is overlapped
* with an exposure epoch of FENCE (which is not allowed), since FENCE may be
@@ -781,7 +779,7 @@ int MPIDI_Win_post(MPID_Group * post_grp_ptr, int assert, MPID_Win * win_ptr)
fn_exit:
MPIU_CHKLMEM_FREEALL();
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_POST);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_POST);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -791,17 +789,17 @@ int MPIDI_Win_post(MPID_Group * post_grp_ptr, int assert, MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_start
+#define FUNCNAME MPID_Win_start
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_start(MPID_Group * group_ptr, int assert, MPID_Win * win_ptr)
+int MPID_Win_start(MPID_Group * group_ptr, int assert, MPID_Win * win_ptr)
{
int mpi_errno = MPI_SUCCESS;
MPIU_CHKLMEM_DECL(2);
MPIU_CHKPMEM_DECL(2);
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_START);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_START);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_START);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_START);
/* Note that here we cannot distinguish if this access epoch is overlapped
* with an access epoch of FENCE (which is not allowed), since FENCE may be
@@ -905,7 +903,7 @@ int MPIDI_Win_start(MPID_Group * group_ptr, int assert, MPID_Win * win_ptr)
fn_exit:
MPIU_CHKLMEM_FREEALL();
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_START);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_START);
return mpi_errno;
fn_fail:
MPIU_CHKPMEM_REAP();
@@ -915,18 +913,18 @@ int MPIDI_Win_start(MPID_Group * group_ptr, int assert, MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_complete
+#define FUNCNAME MPID_Win_complete
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_complete(MPID_Win * win_ptr)
+int MPID_Win_complete(MPID_Win * win_ptr)
{
int mpi_errno = MPI_SUCCESS;
int i, dst, rank = win_ptr->comm_ptr->rank;
MPID_Comm *win_comm_ptr = win_ptr->comm_ptr;
MPIDI_RMA_Target_t *curr_target;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_COMPLETE);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_COMPLETE);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_COMPLETE);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_COMPLETE);
/* Access epochs on the same window must be disjoint. */
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PSCW_ISSUED &&
@@ -996,7 +994,7 @@ int MPIDI_Win_complete(MPID_Win * win_ptr)
MPIU_Assert(win_ptr->active_req_cnt == 0);
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_COMPLETE);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_COMPLETE);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1007,15 +1005,15 @@ int MPIDI_Win_complete(MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_wait
+#define FUNCNAME MPID_Win_wait
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_wait(MPID_Win * win_ptr)
+int MPID_Win_wait(MPID_Win * win_ptr)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_WAIT);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_WAIT);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_WAIT);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_WAIT);
MPIU_ERR_CHKANDJUMP(win_ptr->states.exposure_state != MPIDI_RMA_PSCW_EXPO,
mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
@@ -1036,7 +1034,7 @@ int MPIDI_Win_wait(MPID_Win * win_ptr)
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_WAIT);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_WAIT);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1046,15 +1044,15 @@ int MPIDI_Win_wait(MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_test
+#define FUNCNAME MPID_Win_test
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_test(MPID_Win * win_ptr, int *flag)
+int MPID_Win_test(MPID_Win * win_ptr, int *flag)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_TEST);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_TEST);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_TEST);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_TEST);
MPIU_ERR_CHKANDJUMP(win_ptr->states.exposure_state != MPIDI_RMA_PSCW_EXPO,
mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
@@ -1076,7 +1074,7 @@ int MPIDI_Win_test(MPID_Win * win_ptr, int *flag)
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_TEST);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_TEST);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1092,10 +1090,10 @@ int MPIDI_Win_test(MPID_Win * win_ptr, int *flag)
/********************************************************************************/
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_lock
+#define FUNCNAME MPID_Win_lock
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win * win_ptr)
+int MPID_Win_lock(int lock_type, int dest, int assert, MPID_Win * win_ptr)
{
int made_progress = 0;
int shm_target = FALSE;
@@ -1103,9 +1101,9 @@ int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win * win_ptr)
MPIDI_RMA_Target_t *target = NULL;
MPIDI_VC_t *orig_vc = NULL, *target_vc = NULL;
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_LOCK);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_LOCK);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_LOCK);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_LOCK);
/* Note that here we cannot distinguish if this access epoch is overlapped
* with an access epoch of FENCE (which is not allowed), since FENCE may be
@@ -1194,7 +1192,7 @@ int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win * win_ptr)
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_LOCK);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_LOCK);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1203,19 +1201,19 @@ int MPIDI_Win_lock(int lock_type, int dest, int assert, MPID_Win * win_ptr)
}
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_unlock
+#define FUNCNAME MPID_Win_unlock
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_unlock(int dest, MPID_Win * win_ptr)
+int MPID_Win_unlock(int dest, MPID_Win * win_ptr)
{
int made_progress = 0;
int local_completed ATTRIBUTE((unused)) = 0, remote_completed = 0;
MPIDI_RMA_Target_t *target = NULL;
enum MPIDI_RMA_sync_types sync_flag;
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_UNLOCK);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_UNLOCK);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_UNLOCK);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_UNLOCK);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PER_TARGET,
mpi_errno, MPI_ERR_RMA_SYNC, "**rmasync");
@@ -1298,7 +1296,7 @@ int MPIDI_Win_unlock(int dest, MPID_Win * win_ptr)
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_UNLOCK);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_UNLOCK);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1308,19 +1306,19 @@ int MPIDI_Win_unlock(int dest, MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_flush
+#define FUNCNAME MPID_Win_flush
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_flush(int dest, MPID_Win * win_ptr)
+int MPID_Win_flush(int dest, MPID_Win * win_ptr)
{
int made_progress = 0;
int local_completed ATTRIBUTE((unused)) = 0, remote_completed = 0;
int rank = win_ptr->comm_ptr->rank;
MPIDI_RMA_Target_t *target = NULL;
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_FLUSH);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_FLUSH);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_FLUSH);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_FLUSH);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PER_TARGET &&
win_ptr->states.access_state != MPIDI_RMA_LOCK_ALL_CALLED &&
@@ -1398,7 +1396,7 @@ int MPIDI_Win_flush(int dest, MPID_Win * win_ptr)
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_FLUSH);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_FLUSH);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1408,19 +1406,19 @@ int MPIDI_Win_flush(int dest, MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_flush_local
+#define FUNCNAME MPID_Win_flush_local
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_flush_local(int dest, MPID_Win * win_ptr)
+int MPID_Win_flush_local(int dest, MPID_Win * win_ptr)
{
int made_progress = 0;
int local_completed = 0, remote_completed = 0;
int rank = win_ptr->comm_ptr->rank;
MPIDI_RMA_Target_t *target = NULL;
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_FLUSH_LOCAL);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_FLUSH_LOCAL);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_FLUSH_LOCAL);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_FLUSH_LOCAL);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PER_TARGET &&
win_ptr->states.access_state != MPIDI_RMA_LOCK_ALL_CALLED &&
@@ -1493,7 +1491,7 @@ int MPIDI_Win_flush_local(int dest, MPID_Win * win_ptr)
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_FLUSH_LOCAL);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_FLUSH_LOCAL);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1503,16 +1501,16 @@ int MPIDI_Win_flush_local(int dest, MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_lock_all
+#define FUNCNAME MPID_Win_lock_all
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_lock_all(int assert, MPID_Win * win_ptr)
+int MPID_Win_lock_all(int assert, MPID_Win * win_ptr)
{
int i, rank = win_ptr->comm_ptr->rank;
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_LOCK_ALL);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_LOCK_ALL);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_LOCK_ALL);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_LOCK_ALL);
/* Note that here we cannot distinguish if this access epoch is overlapped
* with an access epoch of FENCE (which is not allowed), since FENCE may be
@@ -1575,7 +1573,7 @@ int MPIDI_Win_lock_all(int assert, MPID_Win * win_ptr)
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_LOCK_ALL);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_LOCK_ALL);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1585,10 +1583,10 @@ int MPIDI_Win_lock_all(int assert, MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_unlock_all
+#define FUNCNAME MPID_Win_unlock_all
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_unlock_all(MPID_Win * win_ptr)
+int MPID_Win_unlock_all(MPID_Win * win_ptr)
{
int i, made_progress = 0;
int local_completed = 0, remote_completed = 0;
@@ -1596,9 +1594,9 @@ int MPIDI_Win_unlock_all(MPID_Win * win_ptr)
MPIDI_RMA_Target_t *curr_target = NULL;
enum MPIDI_RMA_sync_types sync_flag;
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_UNLOCK_ALL);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_UNLOCK_ALL);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_UNLOCK_ALL);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_UNLOCK_ALL);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_LOCK_ALL_CALLED &&
win_ptr->states.access_state != MPIDI_RMA_LOCK_ALL_ISSUED &&
@@ -1720,7 +1718,7 @@ int MPIDI_Win_unlock_all(MPID_Win * win_ptr)
MPIU_Assert(win_ptr->active_req_cnt == 0);
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_UNLOCK_ALL);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_UNLOCK_ALL);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1730,17 +1728,17 @@ int MPIDI_Win_unlock_all(MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_flush_all
+#define FUNCNAME MPID_Win_flush_all
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_flush_all(MPID_Win * win_ptr)
+int MPID_Win_flush_all(MPID_Win * win_ptr)
{
int i;
MPIDI_RMA_Target_t *curr_target = NULL;
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPIDI_STATE_MPIDI_WIN_FLUSH_ALL);
+ MPIDI_STATE_DECL(MPIDI_STATE_MPID_WIN_FLUSH_ALL);
- MPIDI_RMA_FUNC_ENTER(MPIDI_STATE_MPIDI_WIN_FLUSH_ALL);
+ MPIDI_RMA_FUNC_ENTER(MPIDI_STATE_MPID_WIN_FLUSH_ALL);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PER_TARGET &&
win_ptr->states.access_state != MPIDI_RMA_LOCK_ALL_CALLED &&
@@ -1769,7 +1767,7 @@ int MPIDI_Win_flush_all(MPID_Win * win_ptr)
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPIDI_STATE_MPIDI_WIN_FLUSH_ALL);
+ MPIDI_RMA_FUNC_EXIT(MPIDI_STATE_MPID_WIN_FLUSH_ALL);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1779,17 +1777,17 @@ int MPIDI_Win_flush_all(MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_flush_local_all
+#define FUNCNAME MPID_Win_flush_local_all
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_flush_local_all(MPID_Win * win_ptr)
+int MPID_Win_flush_local_all(MPID_Win * win_ptr)
{
int i;
MPIDI_RMA_Target_t *curr_target = NULL;
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_FLUSH_LOCAL_ALL);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_FLUSH_LOCAL_ALL);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_FLUSH_LOCAL_ALL);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_FLUSH_LOCAL_ALL);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PER_TARGET &&
win_ptr->states.access_state != MPIDI_RMA_LOCK_ALL_CALLED &&
@@ -1818,7 +1816,7 @@ int MPIDI_Win_flush_local_all(MPID_Win * win_ptr)
}
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_FLUSH_LOCAL_ALL);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_FLUSH_LOCAL_ALL);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -1828,15 +1826,15 @@ int MPIDI_Win_flush_local_all(MPID_Win * win_ptr)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_sync
+#define FUNCNAME MPID_Win_sync
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_sync(MPID_Win * win_ptr)
+int MPID_Win_sync(MPID_Win * win_ptr)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_SYNC);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_SYNC);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_SYNC);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_SYNC);
MPIU_ERR_CHKANDJUMP(win_ptr->states.access_state != MPIDI_RMA_PER_TARGET &&
win_ptr->states.access_state != MPIDI_RMA_LOCK_ALL_CALLED &&
@@ -1847,7 +1845,7 @@ int MPIDI_Win_sync(MPID_Win * win_ptr)
OPA_read_write_barrier();
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_SYNC);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_SYNC);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
diff --git a/src/mpid/ch3/src/ch3u_win_fns.c b/src/mpid/ch3/src/ch3u_win_fns.c
index 87c1ce7..4fee88f 100644
--- a/src/mpid/ch3/src/ch3u_win_fns.c
+++ b/src/mpid/ch3/src/ch3u_win_fns.c
@@ -160,22 +160,21 @@ int MPIDI_CH3U_Win_create_dynamic(MPID_Info * info, MPID_Comm * comm_ptr, MPID_W
/* --END ERROR HANDLING-- */
}
-
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_attach
+#define FUNCNAME MPID_Win_attach
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_attach(MPID_Win * win, void *base, MPI_Aint size)
+int MPID_Win_attach(MPID_Win * win, void *base, MPI_Aint size)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_ATTACH);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_ATTACH);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_ATTACH);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_ATTACH);
/* no op, all of memory is exposed */
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_ATTACH);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_ATTACH);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -185,20 +184,20 @@ int MPIDI_Win_attach(MPID_Win * win, void *base, MPI_Aint size)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_detach
+#define FUNCNAME MPID_Win_detach
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_detach(MPID_Win * win, const void *base)
+int MPID_Win_detach(MPID_Win * win, const void *base)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_DETACH);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_DETACH);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_DETACH);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_DETACH);
/* no op, all of memory is exposed */
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_DETACH);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_DETACH);
return mpi_errno;
/* --BEGIN ERROR HANDLING-- */
fn_fail:
@@ -284,15 +283,41 @@ int MPIDI_CH3U_Win_allocate_no_shm(MPI_Aint size, int disp_unit, MPID_Info * inf
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_set_info
+#define FUNCNAME MPIDI_CH3U_Win_shared_query
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+int MPIDI_CH3U_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_CH3U_WIN_SHARED_QUERY);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3U_WIN_SHARED_QUERY);
+
+ *(void **) baseptr = win_ptr->base;
+ *size = win_ptr->size;
+ *disp_unit = win_ptr->disp_unit;
+
+ fn_exit:
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_CH3U_WIN_SHARED_QUERY);
+ return mpi_errno;
+ /* --BEGIN ERROR HANDLING-- */
+ fn_fail:
+ goto fn_exit;
+ /* --END ERROR HANDLING-- */
+}
+
+
+#undef FUNCNAME
+#define FUNCNAME MPID_Win_set_info
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_set_info(MPID_Win * win, MPID_Info * info)
+int MPID_Win_set_info(MPID_Win * win, MPID_Info * info)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_SET_INFO);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_SET_INFO);
- MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_WIN_SET_INFO);
+ MPIDI_FUNC_ENTER(MPID_STATE_MPID_WIN_SET_INFO);
/********************************************************/
/************** check for info no_locks *****************/
@@ -355,7 +380,7 @@ int MPIDI_Win_set_info(MPID_Win * win, MPID_Info * info)
}
fn_exit:
- MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_WIN_SET_INFO);
+ MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_SET_INFO);
return mpi_errno;
fn_fail:
goto fn_exit;
@@ -363,15 +388,15 @@ int MPIDI_Win_set_info(MPID_Win * win, MPID_Info * info)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_get_info
+#define FUNCNAME MPID_Win_get_info
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_get_info(MPID_Win * win, MPID_Info ** info_used)
+int MPID_Win_get_info(MPID_Win * win, MPID_Info ** info_used)
{
int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_GET_INFO);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_GET_INFO);
- MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_WIN_GET_INFO);
+ MPIDI_FUNC_ENTER(MPID_STATE_MPID_WIN_GET_INFO);
/* Allocate an empty info object */
mpi_errno = MPIU_Info_alloc(info_used);
@@ -449,7 +474,7 @@ int MPIDI_Win_get_info(MPID_Win * win, MPID_Info ** info_used)
}
fn_exit:
- MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_WIN_GET_INFO);
+ MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_GET_INFO);
return mpi_errno;
fn_fail:
goto fn_exit;
diff --git a/src/mpid/ch3/src/mpid_rma.c b/src/mpid/ch3/src/mpid_rma.c
index ba82445..d43852f 100644
--- a/src/mpid/ch3/src/mpid_rma.c
+++ b/src/mpid/ch3/src/mpid_rma.c
@@ -47,50 +47,6 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
MPID_Comm * comm_ptr, MPID_Win ** win_ptr);
-#define MPID_WIN_FTABLE_SET_DEFAULTS(win_ptr) \
- do { \
- /* Get ptr to RMAFns, which is embedded in MPID_Win */ \
- MPID_RMAFns *ftable = &(*(win_ptr))->RMAFns; \
- ftable->Win_free = MPIDI_Win_free; \
- ftable->Win_attach = MPIDI_Win_attach; \
- ftable->Win_detach = MPIDI_Win_detach; \
- ftable->Win_shared_query = MPIDI_Win_shared_query; \
- \
- ftable->Win_set_info = MPIDI_Win_set_info; \
- ftable->Win_get_info = MPIDI_Win_get_info; \
- \
- ftable->Put = MPIDI_Put; \
- ftable->Get = MPIDI_Get; \
- ftable->Accumulate = MPIDI_Accumulate; \
- ftable->Get_accumulate = MPIDI_Get_accumulate; \
- ftable->Fetch_and_op = MPIDI_Fetch_and_op; \
- ftable->Compare_and_swap = MPIDI_Compare_and_swap; \
- \
- ftable->Rput = MPIDI_Rput; \
- ftable->Rget = MPIDI_Rget; \
- ftable->Raccumulate = MPIDI_Raccumulate; \
- ftable->Rget_accumulate = MPIDI_Rget_accumulate; \
- \
- ftable->Win_fence = MPIDI_Win_fence; \
- ftable->Win_post = MPIDI_Win_post; \
- ftable->Win_start = MPIDI_Win_start; \
- ftable->Win_complete = MPIDI_Win_complete; \
- ftable->Win_wait = MPIDI_Win_wait; \
- ftable->Win_test = MPIDI_Win_test; \
- \
- ftable->Win_lock = MPIDI_Win_lock; \
- ftable->Win_unlock = MPIDI_Win_unlock; \
- ftable->Win_lock_all = MPIDI_Win_lock_all; \
- ftable->Win_unlock_all = MPIDI_Win_unlock_all; \
- \
- ftable->Win_flush = MPIDI_Win_flush; \
- ftable->Win_flush_all = MPIDI_Win_flush_all; \
- ftable->Win_flush_local = MPIDI_Win_flush_local; \
- ftable->Win_flush_local_all = MPIDI_Win_flush_local_all;\
- ftable->Win_sync = MPIDI_Win_sync; \
- } while (0)
-
-
#undef FUNCNAME
#define FUNCNAME MPID_Win_create
#undef FCNAME
@@ -200,7 +156,7 @@ void *MPID_Alloc_mem(size_t size, MPID_Info * info_ptr)
MPIDI_FUNC_ENTER(MPID_STATE_MPID_ALLOC_MEM);
- ap = MPIDI_Alloc_mem(size, info_ptr);
+ ap = MPIDI_CH3I_Alloc_mem(size, info_ptr);
MPIDI_FUNC_EXIT(MPID_STATE_MPID_ALLOC_MEM);
return ap;
@@ -218,10 +174,7 @@ int MPID_Free_mem(void *ptr)
MPIDI_FUNC_ENTER(MPID_STATE_MPID_FREE_MEM);
- mpi_errno = MPIDI_Free_mem(ptr);
- if (mpi_errno != MPI_SUCCESS) {
- MPIU_ERR_POP(mpi_errno);
- }
+ MPIDI_CH3I_Free_mem(ptr);
fn_fail:
MPIDI_FUNC_EXIT(MPID_STATE_MPID_FREE_MEM);
@@ -357,11 +310,8 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
(*win_ptr)->info_args.alloc_shared_noncontig = 0;
(*win_ptr)->info_args.alloc_shm = FALSE;
- /* Set function pointers on window */
- MPID_WIN_FTABLE_SET_DEFAULTS(win_ptr);
-
/* Set info_args on window based on info provided by user */
- mpi_errno = (*win_ptr)->RMAFns.Win_set_info((*win_ptr), info);
+ mpi_errno = MPID_Win_set_info((*win_ptr), info);
if (mpi_errno != MPI_SUCCESS)
MPIU_ERR_POP(mpi_errno);
@@ -437,51 +387,3 @@ static int win_init(MPI_Aint size, int disp_unit, int create_flavor, int model,
MPIU_CHKPMEM_REAP();
goto fn_exit;
}
-
-
-#undef FUNCNAME
-#define FUNCNAME MPID_Win_set_info
-#undef FCNAME
-#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_Win_set_info(MPID_Win * win, MPID_Info * info)
-{
- int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_SET_INFO);
-
- MPIDI_FUNC_ENTER(MPID_STATE_MPID_WIN_SET_INFO);
-
- mpi_errno = win->RMAFns.Win_set_info(win, info);
- if (mpi_errno != MPI_SUCCESS) {
- MPIU_ERR_POP(mpi_errno);
- }
-
- fn_exit:
- MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_SET_INFO);
- return mpi_errno;
- fn_fail:
- goto fn_exit;
-}
-
-
-#undef FUNCNAME
-#define FUNCNAME MPID_Win_get_info
-#undef FCNAME
-#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPID_Win_get_info(MPID_Win * win, MPID_Info ** info_used)
-{
- int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_GET_INFO);
-
- MPIDI_FUNC_ENTER(MPID_STATE_MPID_WIN_GET_INFO);
-
- mpi_errno = win->RMAFns.Win_get_info(win, info_used);
- if (mpi_errno != MPI_SUCCESS) {
- MPIU_ERR_POP(mpi_errno);
- }
-
- fn_exit:
- MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_GET_INFO);
- return mpi_errno;
- fn_fail:
- goto fn_exit;
-}
diff --git a/src/mpid/ch3/src/mpidi_rma.c b/src/mpid/ch3/src/mpidi_rma.c
index 8240ae2..f105e97 100644
--- a/src/mpid/ch3/src/mpidi_rma.c
+++ b/src/mpid/ch3/src/mpidi_rma.c
@@ -144,19 +144,19 @@ void MPIDI_RMA_finalize(void)
#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_free
+#define FUNCNAME MPID_Win_free
#undef FCNAME
#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Win_free(MPID_Win ** win_ptr)
+int MPID_Win_free(MPID_Win ** win_ptr)
{
int mpi_errno = MPI_SUCCESS;
int in_use;
MPID_Comm *comm_ptr;
mpir_errflag_t errflag = MPIR_ERR_NONE;
MPIDI_RMA_Win_list_t *win_elem;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_WIN_FREE);
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_FREE);
- MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_WIN_FREE);
+ MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPID_WIN_FREE);
/* it is possible that there is a IBARRIER in MPI_WIN_FENCE with
* MODE_NOPRECEDE not being completed, we let the progress engine
@@ -246,71 +246,9 @@ int MPIDI_Win_free(MPID_Win ** win_ptr)
MPIU_Handle_obj_free(&MPID_Win_mem, *win_ptr);
fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_FREE);
+ MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPID_WIN_FREE);
return mpi_errno;
fn_fail:
goto fn_exit;
}
-
-
-#undef FUNCNAME
-#define FUNCNAME MPIDI_Win_shared_query
-#undef FCNAME
-#define FCNAME MPIU_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;
- *size = win_ptr->size;
- *disp_unit = win_ptr->disp_unit;
-
- fn_exit:
- MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_SHARED_QUERY);
- return mpi_errno;
- /* --BEGIN ERROR HANDLING-- */
- fn_fail:
- goto fn_exit;
- /* --END ERROR HANDLING-- */
-}
-
-
-#undef FUNCNAME
-#define FUNCNAME MPIDI_Alloc_mem
-#undef FCNAME
-#define FCNAME MPIU_QUOTE(FUNCNAME)
-void *MPIDI_Alloc_mem(size_t size, MPID_Info * info_ptr)
-{
- void *ap;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_ALLOC_MEM);
-
- MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_ALLOC_MEM);
-
- ap = MPIDI_CH3I_Alloc_mem(size, info_ptr);
-
- MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_ALLOC_MEM);
- return ap;
-}
-
-
-#undef FUNCNAME
-#define FUNCNAME MPIDI_Free_mem
-#undef FCNAME
-#define FCNAME MPIU_QUOTE(FUNCNAME)
-int MPIDI_Free_mem(void *ptr)
-{
- int mpi_errno = MPI_SUCCESS;
- MPIDI_STATE_DECL(MPID_STATE_MPIDI_FREE_MEM);
-
- MPIDI_FUNC_ENTER(MPID_STATE_MPIDI_FREE_MEM);
-
- MPIDI_CH3I_Free_mem(ptr);
-
- MPIDI_FUNC_EXIT(MPID_STATE_MPIDI_FREE_MEM);
- return mpi_errno;
-}
http://git.mpich.org/mpich.git/commitdiff/9466c93eace5e6f6274fe9dcdb24e7f445d2b297
commit 9466c93eace5e6f6274fe9dcdb24e7f445d2b297
Author: Xin Zhao <xinzhao3 at illinois.edu>
Date: Wed Jul 15 17:44:38 2015 -0500
Move win_shared_query to Win_fns table to let Nemesis override it.
Signed-off-by: Pavan Balaji <balaji at anl.gov>
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
index 2b1a1a8..31bbf6a 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c
@@ -21,6 +21,14 @@ int MPIDI_CH3_SHM_Win_shared_query(MPID_Win * win_ptr, int target_rank, MPI_Aint
MPIDI_RMA_FUNC_ENTER(MPID_STATE_MPIDI_CH3_WIN_SHARED_QUERY);
+ if (win_ptr->comm_ptr->node_comm == NULL) {
+ mpi_errno = MPIDI_CH3U_Win_shared_query(win_ptr, target_rank, size, disp_unit, baseptr);
+ if (mpi_errno != MPI_SUCCESS) {
+ MPIU_ERR_POP(mpi_errno);
+ }
+ goto fn_exit;
+ }
+
comm_size = win_ptr->comm_ptr->local_size;
/* Scan the sizes to locate the first process that allocated a nonzero
diff --git a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
index e901c7d..0eb6c6a 100644
--- a/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
+++ b/src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c
@@ -44,6 +44,7 @@ int MPIDI_CH3_Win_fns_init(MPIDI_CH3U_Win_fns_t * win_fns)
win_fns->allocate_shm = MPIDI_CH3I_Win_allocate_shm;
win_fns->detect_shm = MPIDI_CH3I_Win_detect_shm;
win_fns->gather_info = MPIDI_CH3I_Win_gather_info;
+ win_fns->shared_query = MPIDI_CH3_SHM_Win_shared_query;
}
MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_CH3_WIN_FNS_INIT);
@@ -748,9 +749,6 @@ static int MPIDI_CH3I_Win_allocate_shm(MPI_Aint size, int disp_unit, MPID_Info *
if (mpi_errno != MPI_SUCCESS)
MPIU_ERR_POP(mpi_errno);
- /* Provide operation overrides for this window flavor */
- (*win_ptr)->RMAFns.Win_shared_query = MPIDI_CH3_SHM_Win_shared_query;
-
/* Cache SHM windows */
MPIDI_CH3I_SHM_Wins_append(&shm_wins_list, (*win_ptr));
diff --git a/src/mpid/ch3/include/mpidimpl.h b/src/mpid/ch3/include/mpidimpl.h
index 9cc3fee..3045dca 100644
--- a/src/mpid/ch3/include/mpidimpl.h
+++ b/src/mpid/ch3/include/mpidimpl.h
@@ -1144,6 +1144,7 @@ typedef struct {
int (*create_dynamic)(MPID_Info *, MPID_Comm *, MPID_Win **);
int (*detect_shm)(MPID_Win **);
int (*gather_info)(void *, MPI_Aint, int, MPID_Info *, MPID_Comm *, MPID_Win **);
+ int (*shared_query)(MPID_Win *, int, MPI_Aint *, int *, void *);
} MPIDI_CH3U_Win_fns_t;
extern MPIDI_CH3U_Win_fns_t MPIDI_CH3U_Win_fns;
@@ -1184,7 +1185,8 @@ int MPIDI_CH3U_Win_allocate(MPI_Aint size, int disp_unit, MPID_Info *info,
int MPIDI_CH3U_Win_allocate_no_shm(MPI_Aint size, int disp_unit, MPID_Info *info,
MPID_Comm *comm_ptr, void *baseptr, MPID_Win **win_ptr);
int MPIDI_CH3U_Win_create_dynamic(MPID_Info *info, MPID_Comm *comm, MPID_Win **win);
-
+int MPIDI_CH3U_Win_shared_query(MPID_Win * win_ptr, int target_rank, MPI_Aint * size,
+ int *disp_unit, void *baseptr);
/* MPI RMA Utility functions */
diff --git a/src/mpid/ch3/src/ch3u_win_fns.c b/src/mpid/ch3/src/ch3u_win_fns.c
index 3507d88..87c1ce7 100644
--- a/src/mpid/ch3/src/ch3u_win_fns.c
+++ b/src/mpid/ch3/src/ch3u_win_fns.c
@@ -26,6 +26,7 @@ int MPIDI_Win_fns_init(MPIDI_CH3U_Win_fns_t * win_fns)
win_fns->allocate_shared = MPIDI_CH3U_Win_allocate;
win_fns->create_dynamic = MPIDI_CH3U_Win_create_dynamic;
win_fns->gather_info = MPIDI_CH3U_Win_gather_info;
+ win_fns->shared_query = MPIDI_CH3U_Win_shared_query;
MPIDI_RMA_FUNC_EXIT(MPID_STATE_MPIDI_WIN_FNS_INIT);
diff --git a/src/mpid/ch3/src/mpid_rma.c b/src/mpid/ch3/src/mpid_rma.c
index 5fcaebf..ba82445 100644
--- a/src/mpid/ch3/src/mpid_rma.c
+++ b/src/mpid/ch3/src/mpid_rma.c
@@ -257,6 +257,29 @@ int MPID_Win_allocate_shared(MPI_Aint size, int disp_unit, MPID_Info * info, MPI
return mpi_errno;
}
+#undef FUNCNAME
+#define FUNCNAME MPID_Win_shared_query
+#undef FCNAME
+#define FCNAME MPIU_QUOTE(FUNCNAME)
+int MPID_Win_shared_query(MPID_Win * win, int rank, MPI_Aint * size, int *disp_unit, void *baseptr)
+{
+ int mpi_errno = MPI_SUCCESS;
+
+ MPIDI_STATE_DECL(MPID_STATE_MPID_WIN_SHARED_QUERY);
+
+ MPIDI_FUNC_ENTER(MPID_STATE_MPID_WIN_SHARED_QUERY);
+
+ mpi_errno = MPIDI_CH3U_Win_fns.shared_query(win, rank, size, disp_unit, baseptr);
+ if (mpi_errno != MPI_SUCCESS) {
+ MPIU_ERR_POP(mpi_errno);
+ }
+
+ fn_exit:
+ MPIDI_FUNC_EXIT(MPID_STATE_MPID_WIN_SHARED_QUERY);
+ return mpi_errno;
+ fn_fail:
+ goto fn_exit;
+}
#undef FUNCNAME
#define FUNCNAME win_init
-----------------------------------------------------------------------
Summary of changes:
src/include/mpiimpl.h | 99 ---------------
src/mpi/rma/accumulate.c | 10 +-
src/mpi/rma/compare_and_swap.c | 8 +-
src/mpi/rma/fetch_and_op.c | 8 +-
src/mpi/rma/get.c | 9 +-
src/mpi/rma/get_accumulate.c | 12 +-
src/mpi/rma/put.c | 7 +-
src/mpi/rma/raccumulate.c | 8 +-
src/mpi/rma/rget.c | 7 +-
src/mpi/rma/rget_accumulate.c | 14 +-
src/mpi/rma/rput.c | 7 +-
src/mpi/rma/win_attach.c | 3 +-
src/mpi/rma/win_complete.c | 2 +-
src/mpi/rma/win_detach.c | 3 +-
src/mpi/rma/win_fence.c | 2 +-
src/mpi/rma/win_flush.c | 2 +-
src/mpi/rma/win_flush_all.c | 2 +-
src/mpi/rma/win_flush_local.c | 2 +-
src/mpi/rma/win_flush_local_all.c | 2 +-
src/mpi/rma/win_free.c | 2 +-
src/mpi/rma/win_lock.c | 3 +-
src/mpi/rma/win_lock_all.c | 3 +-
src/mpi/rma/win_post.c | 2 +-
src/mpi/rma/win_shared_query.c | 3 +-
src/mpi/rma/win_start.c | 2 +-
src/mpi/rma/win_sync.c | 2 +-
src/mpi/rma/win_test.c | 2 +-
src/mpi/rma/win_unlock.c | 2 +-
src/mpi/rma/win_unlock_all.c | 2 +-
src/mpi/rma/win_wait.c | 2 +-
src/mpid/ch3/channels/nemesis/src/ch3_rma_shm.c | 8 ++
src/mpid/ch3/channels/nemesis/src/ch3_win_fns.c | 4 +-
src/mpid/ch3/include/mpidimpl.h | 81 +------------
src/mpid/ch3/include/mpidpre.h | 4 -
src/mpid/ch3/src/ch3u_rma_ops.c | 88 +++++++-------
src/mpid/ch3/src/ch3u_rma_reqops.c | 66 +++++-----
src/mpid/ch3/src/ch3u_rma_sync.c | 154 +++++++++++------------
src/mpid/ch3/src/ch3u_win_fns.c | 68 +++++++---
src/mpid/ch3/src/mpid_rma.c | 127 ++++---------------
src/mpid/ch3/src/mpidi_rma.c | 72 +----------
40 files changed, 305 insertions(+), 599 deletions(-)
hooks/post-receive
--
MPICH primary repository
More information about the commits
mailing list