Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions ompi/include/mpi.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* and Technology (RIST). All rights reserved.
* Copyright (c) 2017-2019 IBM Corporation. All rights reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* Copyright (c) 2021 Google, LLC. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -1918,7 +1919,7 @@ OMPI_DECLSPEC int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_at
OMPI_DECLSPEC int MPI_Win_delete_attr(MPI_Win win, int win_keyval);
OMPI_DECLSPEC int MPI_Win_detach(MPI_Win win, const void *base);
OMPI_DECLSPEC MPI_Win MPI_Win_f2c(MPI_Fint win);
OMPI_DECLSPEC int MPI_Win_fence(int assert, MPI_Win win);
OMPI_DECLSPEC int MPI_Win_fence(int mpi_assert, MPI_Win win);
OMPI_DECLSPEC int MPI_Win_flush(int rank, MPI_Win win);
OMPI_DECLSPEC int MPI_Win_flush_all(MPI_Win win);
OMPI_DECLSPEC int MPI_Win_flush_local(int rank, MPI_Win win);
Expand All @@ -1931,15 +1932,15 @@ OMPI_DECLSPEC int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandle
OMPI_DECLSPEC int MPI_Win_get_group(MPI_Win win, MPI_Group *group);
OMPI_DECLSPEC int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used);
OMPI_DECLSPEC int MPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen);
OMPI_DECLSPEC int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win);
OMPI_DECLSPEC int MPI_Win_lock_all(int assert, MPI_Win win);
OMPI_DECLSPEC int MPI_Win_post(MPI_Group group, int assert, MPI_Win win);
OMPI_DECLSPEC int MPI_Win_lock(int lock_type, int rank, int mpi_assert, MPI_Win win);
OMPI_DECLSPEC int MPI_Win_lock_all(int mpi_assert, MPI_Win win);
OMPI_DECLSPEC int MPI_Win_post(MPI_Group group, int mpi_assert, MPI_Win win);
OMPI_DECLSPEC int MPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val);
OMPI_DECLSPEC int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler);
OMPI_DECLSPEC int MPI_Win_set_info(MPI_Win win, MPI_Info info);
OMPI_DECLSPEC int MPI_Win_set_name(MPI_Win win, const char *win_name);
OMPI_DECLSPEC int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit, void *baseptr);
OMPI_DECLSPEC int MPI_Win_start(MPI_Group group, int assert, MPI_Win win);
OMPI_DECLSPEC int MPI_Win_start(MPI_Group group, int mpi_assert, MPI_Win win);
OMPI_DECLSPEC int MPI_Win_sync(MPI_Win win);
OMPI_DECLSPEC int MPI_Win_test(MPI_Win win, int *flag);
OMPI_DECLSPEC int MPI_Win_unlock(int rank, MPI_Win win);
Expand Down Expand Up @@ -2583,7 +2584,7 @@ OMPI_DECLSPEC int PMPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_a
OMPI_DECLSPEC int PMPI_Win_delete_attr(MPI_Win win, int win_keyval);
OMPI_DECLSPEC int PMPI_Win_detach(MPI_Win win, const void *base);
OMPI_DECLSPEC MPI_Win PMPI_Win_f2c(MPI_Fint win);
OMPI_DECLSPEC int PMPI_Win_fence(int assert, MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_fence(int mpi_assert, MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_flush(int rank, MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_flush_all(MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_flush_local(int rank, MPI_Win win);
Expand All @@ -2596,15 +2597,15 @@ OMPI_DECLSPEC int PMPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandl
OMPI_DECLSPEC int PMPI_Win_get_group(MPI_Win win, MPI_Group *group);
OMPI_DECLSPEC int PMPI_Win_get_info(MPI_Win win, MPI_Info *info_used);
OMPI_DECLSPEC int PMPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen);
OMPI_DECLSPEC int PMPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_lock_all(int assert, MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_post(MPI_Group group, int assert, MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_lock(int lock_type, int rank, int mpi_assert, MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_lock_all(int mpi_assert, MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_post(MPI_Group group, int mpi_assert, MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val);
OMPI_DECLSPEC int PMPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler);
OMPI_DECLSPEC int PMPI_Win_set_info(MPI_Win win, MPI_Info info);
OMPI_DECLSPEC int PMPI_Win_set_name(MPI_Win win, const char *win_name);
OMPI_DECLSPEC int PMPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit, void *baseptr);
OMPI_DECLSPEC int PMPI_Win_start(MPI_Group group, int assert, MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_start(MPI_Group group, int mpi_assert, MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_sync(MPI_Win win);
OMPI_DECLSPEC int PMPI_Win_test(MPI_Win win, int *flag);
OMPI_DECLSPEC int PMPI_Win_unlock(int rank, MPI_Win win);
Expand Down
12 changes: 6 additions & 6 deletions ompi/mca/osc/monitoring/osc_monitoring_active_target.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

#define OSC_MONITORING_GENERATE_TEMPLATE_ACTIVE_TARGET(template) \
\
static int ompi_osc_monitoring_## template ##_post (ompi_group_t *group, int assert, ompi_win_t *win) \
static int ompi_osc_monitoring_## template ##_post (ompi_group_t *group, int mpi_assert, ompi_win_t *win) \
{ \
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_post(group, assert, win); \
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_post(group, mpi_assert, win); \
} \
\
static int ompi_osc_monitoring_## template ##_start (ompi_group_t *group, int assert, ompi_win_t *win) \
static int ompi_osc_monitoring_## template ##_start (ompi_group_t *group, int mpi_assert, ompi_win_t *win) \
{ \
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_start(group, assert, win); \
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_start(group, mpi_assert, win); \
} \
\
static int ompi_osc_monitoring_## template ##_complete (ompi_win_t *win) \
Expand All @@ -42,9 +42,9 @@
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_test(win, flag); \
} \
\
static int ompi_osc_monitoring_## template ##_fence (int assert, ompi_win_t *win) \
static int ompi_osc_monitoring_## template ##_fence (int mpi_assert, ompi_win_t *win) \
{ \
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_fence(assert, win); \
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_fence(mpi_assert, win); \
}

#endif /* MCA_OSC_MONITORING_ACTIVE_TARGET_H */
8 changes: 4 additions & 4 deletions ompi/mca/osc/monitoring/osc_monitoring_passive_target.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,19 @@
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_flush_local_all(win); \
} \
\
static int ompi_osc_monitoring_## template ##_lock (int lock_type, int target, int assert, ompi_win_t *win) \
static int ompi_osc_monitoring_## template ##_lock (int lock_type, int target, int mpi_assert, ompi_win_t *win) \
{ \
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_lock(lock_type, target, assert, win); \
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_lock(lock_type, target, mpi_assert, win); \
} \
\
static int ompi_osc_monitoring_## template ##_unlock (int target, ompi_win_t *win) \
{ \
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_unlock(target, win); \
} \
\
static int ompi_osc_monitoring_## template ##_lock_all (int assert, struct ompi_win_t *win) \
static int ompi_osc_monitoring_## template ##_lock_all (int mpi_assert, struct ompi_win_t *win) \
{ \
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_lock_all(assert, win); \
return OMPI_OSC_MONITORING_MODULE_VARIABLE(template).osc_lock_all(mpi_assert, win); \
} \
\
static int ompi_osc_monitoring_## template ##_unlock_all (struct ompi_win_t *win) \
Expand Down
10 changes: 5 additions & 5 deletions ompi/mca/osc/osc.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,19 +309,19 @@ typedef int (*ompi_osc_base_module_rget_accumulate_fn_t)(const void *origin_addr
struct ompi_win_t *win,
struct ompi_request_t **request);

typedef int (*ompi_osc_base_module_fence_fn_t)(int assert, struct ompi_win_t *win);
typedef int (*ompi_osc_base_module_fence_fn_t)(int mpi_assert, struct ompi_win_t *win);


typedef int (*ompi_osc_base_module_start_fn_t)(struct ompi_group_t *group,
int assert,
int mpi_assert,
struct ompi_win_t *win);


typedef int (*ompi_osc_base_module_complete_fn_t)(struct ompi_win_t *win);


typedef int (*ompi_osc_base_module_post_fn_t)(struct ompi_group_t *group,
int assert,
int mpi_assert,
struct ompi_win_t *win);


Expand All @@ -334,13 +334,13 @@ typedef int (*ompi_osc_base_module_test_fn_t)(struct ompi_win_t *win,

typedef int (*ompi_osc_base_module_lock_fn_t)(int lock_type,
int target,
int assert,
int mpi_assert,
struct ompi_win_t *win);

typedef int (*ompi_osc_base_module_unlock_fn_t)(int target,
struct ompi_win_t *win);

typedef int (*ompi_osc_base_module_lock_all_fn_t)(int assert,
typedef int (*ompi_osc_base_module_lock_all_fn_t)(int mpi_assert,
struct ompi_win_t *win);

typedef int (*ompi_osc_base_module_unlock_all_fn_t)(struct ompi_win_t *win);
Expand Down
10 changes: 5 additions & 5 deletions ompi/mca/osc/portals4/osc_portals4.h
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,16 @@ int ompi_osc_portals4_rget_accumulate(const void *origin_addr,
struct ompi_win_t *win,
struct ompi_request_t **request);

int ompi_osc_portals4_fence(int assert, struct ompi_win_t *win);
int ompi_osc_portals4_fence(int mpi_assert, struct ompi_win_t *win);

int ompi_osc_portals4_start(struct ompi_group_t *group,
int assert,
int mpi_assert,
struct ompi_win_t *win);

int ompi_osc_portals4_complete(struct ompi_win_t *win);

int ompi_osc_portals4_post(struct ompi_group_t *group,
int assert,
int mpi_assert,
struct ompi_win_t *win);

int ompi_osc_portals4_wait(struct ompi_win_t *win);
Expand All @@ -261,14 +261,14 @@ int ompi_osc_portals4_test(struct ompi_win_t *win,

int ompi_osc_portals4_lock(int lock_type,
int target,
int assert,
int mpi_assert,
struct ompi_win_t *win);

int ompi_osc_portals4_unlock(int target,
struct ompi_win_t *win);


int ompi_osc_portals4_lock_all(int assert,
int ompi_osc_portals4_lock_all(int mpi_assert,
struct ompi_win_t *win);

int ompi_osc_portals4_unlock_all(struct ompi_win_t *win);
Expand Down
10 changes: 5 additions & 5 deletions ompi/mca/osc/portals4/osc_portals4_active_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


int
ompi_osc_portals4_fence(int assert, struct ompi_win_t *win)
ompi_osc_portals4_fence(int mpi_assert, struct ompi_win_t *win)
{
ompi_osc_portals4_module_t *module =
(ompi_osc_portals4_module_t*) win->w_osc_module;
Expand All @@ -42,7 +42,7 @@ ompi_osc_portals4_fence(int assert, struct ompi_win_t *win)

int
ompi_osc_portals4_start(struct ompi_group_t *group,
int assert,
int mpi_assert,
struct ompi_win_t *win)
{
ompi_osc_portals4_module_t *module =
Expand All @@ -53,7 +53,7 @@ ompi_osc_portals4_start(struct ompi_group_t *group,
return OMPI_ERR_RMA_SYNC;
}

if (0 == (assert & MPI_MODE_NOCHECK)) {
if (0 == (mpi_assert & MPI_MODE_NOCHECK)) {
int size;

OBJ_RETAIN(group);
Expand Down Expand Up @@ -115,14 +115,14 @@ ompi_osc_portals4_complete(struct ompi_win_t *win)

int
ompi_osc_portals4_post(struct ompi_group_t *group,
int assert,
int mpi_assert,
struct ompi_win_t *win)
{
ompi_osc_portals4_module_t *module =
(ompi_osc_portals4_module_t*) win->w_osc_module;
int ret, i, size;

if (0 == (assert & MPI_MODE_NOCHECK)) {
if (0 == (mpi_assert & MPI_MODE_NOCHECK)) {
OBJ_RETAIN(group);
module->post_group = group;

Expand Down
8 changes: 4 additions & 4 deletions ompi/mca/osc/portals4/osc_portals4_passive_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ end_shared(ompi_osc_portals4_module_t *module,
int
ompi_osc_portals4_lock(int lock_type,
int target,
int assert,
int mpi_assert,
struct ompi_win_t *win)
{
ompi_osc_portals4_module_t *module =
Expand All @@ -211,7 +211,7 @@ ompi_osc_portals4_lock(int lock_type,
lock = OBJ_NEW(ompi_osc_portals4_outstanding_lock_t);
lock->target = target;

if (0 == (assert & MPI_MODE_NOCHECK)) {
if (0 == (mpi_assert & MPI_MODE_NOCHECK)) {
if (MPI_LOCK_EXCLUSIVE == lock_type) {
lock->lock_type = lock_exclusive;
ret = start_exclusive(module, target);
Expand Down Expand Up @@ -276,7 +276,7 @@ ompi_osc_portals4_unlock(int target,


int
ompi_osc_portals4_lock_all(int assert,
ompi_osc_portals4_lock_all(int mpi_assert,
struct ompi_win_t *win)
{
ompi_osc_portals4_module_t *module =
Expand All @@ -289,7 +289,7 @@ ompi_osc_portals4_lock_all(int assert,
lock = OBJ_NEW(ompi_osc_portals4_outstanding_lock_t);
lock->target = -1;

if (0 == (assert & MPI_MODE_NOCHECK)) {
if (0 == (mpi_assert & MPI_MODE_NOCHECK)) {
int i, comm_size;

lock->lock_type = lock_shared;
Expand Down
21 changes: 11 additions & 10 deletions ompi/mca/osc/rdma/osc_rdma_active_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2017-2018 Intel, Inc. All rights reserved.
* Copyright (c) 2021 Google, LLC. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -297,14 +298,14 @@ static int ompi_osc_rdma_post_peer (ompi_osc_rdma_module_t *module, ompi_osc_rdm
return OMPI_SUCCESS;
}

int ompi_osc_rdma_post_atomic (ompi_group_t *group, int assert, ompi_win_t *win)
int ompi_osc_rdma_post_atomic (ompi_group_t *group, int mpi_assert, ompi_win_t *win)
{
ompi_osc_rdma_module_t *module = GET_MODULE(win);
ompi_osc_rdma_peer_t **peers;
ompi_osc_rdma_state_t *state = module->state;
int ret = OMPI_SUCCESS;

OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "post: %p, %d, %s", (void*) group, assert, win->w_name);
OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "post: %p, %d, %s", (void*) group, mpi_assert, win->w_name);

/* check if we are already in a post epoch */
if (module->pw_group) {
Expand All @@ -329,7 +330,7 @@ int ompi_osc_rdma_post_atomic (ompi_group_t *group, int assert, ompi_win_t *win)
state->num_complete_msgs = 0;
OPAL_THREAD_UNLOCK(&module->lock);

if ((assert & MPI_MODE_NOCHECK) || 0 == ompi_group_size (group)) {
if ((mpi_assert & MPI_MODE_NOCHECK) || 0 == ompi_group_size (group)) {
return OMPI_SUCCESS;
}

Expand All @@ -356,15 +357,15 @@ int ompi_osc_rdma_post_atomic (ompi_group_t *group, int assert, ompi_win_t *win)
return ret;
}

int ompi_osc_rdma_start_atomic (ompi_group_t *group, int assert, ompi_win_t *win)
int ompi_osc_rdma_start_atomic (ompi_group_t *group, int mpi_assert, ompi_win_t *win)
{
ompi_osc_rdma_module_t *module = GET_MODULE(win);
ompi_osc_rdma_pending_post_t *pending_post, *next;
ompi_osc_rdma_state_t *state = module->state;
ompi_osc_rdma_sync_t *sync = &module->all_sync;
int group_size = ompi_group_size (group);

OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "start: %p, %d, %s", (void*) group, assert,
OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "start: %p, %d, %s", (void*) group, mpi_assert,
win->w_name);

OPAL_THREAD_LOCK(&module->lock);
Expand Down Expand Up @@ -408,7 +409,7 @@ int ompi_osc_rdma_start_atomic (ompi_group_t *group, int assert, ompi_win_t *win
/* save the group */
OBJ_RETAIN(group);

if (!(assert & MPI_MODE_NOCHECK)) {
if (!(mpi_assert & MPI_MODE_NOCHECK)) {
/* look through list of pending posts */
OPAL_LIST_FOREACH_SAFE(pending_post, next, &module->pending_posts, ompi_osc_rdma_pending_post_t) {
for (int i = 0 ; i < group_size ; ++i) {
Expand Down Expand Up @@ -586,12 +587,12 @@ int ompi_osc_rdma_test_atomic (ompi_win_t *win, int *flag)
return OMPI_SUCCESS;
}

int ompi_osc_rdma_fence_atomic (int assert, ompi_win_t *win)
int ompi_osc_rdma_fence_atomic (int mpi_assert, ompi_win_t *win)
{
ompi_osc_rdma_module_t *module = GET_MODULE(win);
int ret = OMPI_SUCCESS;

OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "fence: %d, %s", assert, win->w_name);
OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "fence: %d, %s", mpi_assert, win->w_name);

/* can't enter an active target epoch while a lock is active */
if (ompi_osc_rdma_in_passive_epoch (module) || module->pw_group) {
Expand All @@ -604,7 +605,7 @@ int ompi_osc_rdma_fence_atomic (int assert, ompi_win_t *win)
OPAL_THREAD_LOCK(&module->lock);

/* active sends are now active (we will close the epoch if NOSUCCEED is specified) */
if (0 == (assert & MPI_MODE_NOSUCCEED)) {
if (0 == (mpi_assert & MPI_MODE_NOSUCCEED)) {
module->all_sync.type = OMPI_OSC_RDMA_SYNC_TYPE_FENCE;
module->all_sync.num_peers = ompi_comm_size (module->comm);
/* NTH: should add a fast access array for peers here later. for now just use the
Expand All @@ -625,7 +626,7 @@ int ompi_osc_rdma_fence_atomic (int assert, ompi_win_t *win)
/* ensure all writes to my memory are complete (both local stores, and RMA operations) */
ret = module->comm->c_coll->coll_barrier(module->comm, module->comm->c_coll->coll_barrier_module);

if (assert & MPI_MODE_NOSUCCEED) {
if (mpi_assert & MPI_MODE_NOSUCCEED) {
/* as specified in MPI-3 p 438 3-5 the fence can end an epoch. it isn't explicitly
* stated that MPI_MODE_NOSUCCEED ends the epoch but it is a safe assumption. */
module->all_sync.type = OMPI_OSC_RDMA_SYNC_TYPE_NONE;
Expand Down
Loading