Skip to content

MPI_T Events #13133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2bb827b
Modify PERUSE code to implement MPI_T Events based on MPI 4.0 proposal.
hjelmn Apr 11, 2018
a91b0b8
Modifications for changes to proposed MPI_T Events API as well as min…
cchambreau Mar 23, 2020
bbd690e
remove include of dss.h
hppritcha Nov 24, 2021
4785005
Remove non-conformant event_get_info extent argument and internal tra…
cchambreau Dec 23, 2021
f96df24
Add user_data argument to MPI_T_event_handle_free function.
cchambreau Dec 23, 2021
0b2f31e
Fix generation of event_get_info displacements and related copy_data …
cchambreau Dec 24, 2021
1f5eaf5
Minor cleanup
cchambreau Dec 24, 2021
3fc89db
mpi_t events: convert to new profiling approach
hppritcha Jan 18, 2022
ce3e773
mpi_t events fix some missing files for
hppritcha Jan 18, 2022
9d323e0
pr review feedback
hppritcha Jan 18, 2022
050f06c
pr feedback - switch to opal_clock_gettime
hppritcha Jan 18, 2022
8b683d4
suppress a compiler warning
hppritcha Jan 18, 2022
700ac10
pr feedback - remove assert
cchambreau Jun 1, 2022
9b42cd4
pr feedback - corrected comment references to events
cchambreau Jun 1, 2022
94027c4
pr feedback - added locking for setting dropped event handler
cchambreau Jun 1, 2022
881b652
Protect source data access with thread locking.
cchambreau Jun 29, 2022
60c4102
Add OPAL_LIKELY
cchambreau Jun 29, 2022
00536b5
Correct OSC event descriptions.
cchambreau Jun 29, 2022
bb40829
Ensure consistency between ompi and opal callback safety requirement
cchambreau Jun 30, 2022
4fdca83
Ensure thread safety for incremented variables.
cchambreau Jun 30, 2022
596a04e
Add function to lookup ompi datatype from opal datatype id.
cchambreau Jun 30, 2022
2233aef
fix compile problem after rebase
hppritcha Jan 2, 2024
40a6606
Do not use mutex lock during mca_base_source_get_by_name()
kingshuk00 Mar 10, 2025
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
1 change: 1 addition & 0 deletions ompi/datatype/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ libdatatype_la_SOURCES = \
ompi_datatype_create_subarray.c \
ompi_datatype_external.c \
ompi_datatype_external32.c \
ompi_datatype_lookup_by_opal_id.c \
ompi_datatype_match_size.c \
ompi_datatype_module.c \
ompi_datatype_sndrcv.c \
Expand Down
2 changes: 2 additions & 0 deletions ompi/datatype/ompi_datatype.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ ompi_datatype_copy_content_same_ddt( const ompi_datatype_t* type, size_t count,
return 0;
}

OMPI_DECLSPEC ompi_datatype_t* ompi_datatype_lookup_by_opal_id( uint16_t opal_id );

OMPI_DECLSPEC const ompi_datatype_t* ompi_datatype_match_size( int size, uint16_t datakind, uint16_t datalang );

/*
Expand Down
28 changes: 28 additions & 0 deletions ompi/datatype/ompi_datatype_lookup_by_opal_id.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/

#include "ompi_config.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/datatype/ompi_datatype_internal.h"


ompi_datatype_t* ompi_datatype_lookup_by_opal_id( uint16_t opal_id )
{
int32_t i;
const ompi_datatype_t* datatype = NULL;

for (int j = 0 ; j < OMPI_DATATYPE_MPI_MAX_PREDEFINED ; ++j) {
if (ompi_datatype_basicDatatypes[j]->super.id == opal_id) {
datatype = (ompi_datatype_t *) ompi_datatype_basicDatatypes[j];
break;
}
}

return datatype;
}
4 changes: 2 additions & 2 deletions ompi/include/mpi.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -454,8 +454,8 @@ typedef struct ompi_mpit_cvar_handle_t *MPI_T_cvar_handle;
typedef struct mca_base_pvar_handle_t *MPI_T_pvar_handle;
typedef struct mca_base_pvar_session_t *MPI_T_pvar_session;
typedef struct ompi_instance_t *MPI_Session;
typedef unsigned long *MPI_T_event_instance;
typedef unsigned long *MPI_T_event_registration;
typedef struct mca_base_raised_event_t *MPI_T_event_instance;
typedef struct mca_base_event_registration_t *MPI_T_event_registration;

/*
* MPI_Status
Expand Down
28 changes: 28 additions & 0 deletions ompi/mca/osc/rdma/osc_rdma.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,34 @@
#include "osc_rdma_peer.h"

#include "opal_stdint.h"
#include "opal/mca/base/mca_base_event.h"

enum {
OMPI_OSC_RDMA_EVENT_LOCK_ACQUIRED,
OMPI_OSC_RDMA_EVENT_LOCK_RELEASED,
OMPI_OSC_RDMA_EVENT_PUT_STARTED,
OMPI_OSC_RDMA_EVENT_PUT_COMPLETE,
OMPI_OSC_RDMA_EVENT_GET_STARTED,
OMPI_OSC_RDMA_EVENT_GET_COMPLETE,
OMPI_OSC_RDMA_EVENT_FLUSH_STARTED,
OMPI_OSC_RDMA_EVENT_FLUSH_COMPLETE,
OMPI_OSC_RDMA_EVENT_PSCW_EXPOSE_START,
OMPI_OSC_RDMA_EVENT_PSCW_EXPOSE_COMPLETE,
OMPI_OSC_RDMA_EVENT_PSCW_ACCESS_START,
OMPI_OSC_RDMA_EVENT_PSCW_ACCESS_COMPLETE,
OMPI_OSC_RDMA_EVENT_FENCE,
OMPI_OSC_RDMA_EVENT_MAX,
};

struct mca_osc_rdma_rdma_event_t {
int target;
uint64_t address;
uint64_t size;
};

typedef struct mca_osc_rdma_rdma_event_t mca_osc_rdma_rdma_event_t;

extern mca_base_event_list_item_t mca_osc_rdma_events[];

#define RANK_ARRAY_COUNT(module) ((ompi_comm_size ((module)->comm) + (module)->node_count - 1) / (module)->node_count)

Expand Down
16 changes: 16 additions & 0 deletions ompi/mca/osc/rdma/osc_rdma_active_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ static void ompi_osc_rdma_handle_post (ompi_osc_rdma_module_t *module, int rank,
rank, (int) (npeers - state->num_post_msgs - 1));
/* an atomic is not really necessary as this function is currently used but it doesn't hurt */
ompi_osc_rdma_counter_add (&state->num_post_msgs, 1);
MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_PSCW_ACCESS_START].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &rank);
return;
}
}
Expand Down Expand Up @@ -307,6 +309,9 @@ int ompi_osc_rdma_post_atomic (ompi_group_t *group, int mpi_assert, ompi_win_t *
return OMPI_SUCCESS;
}

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_PSCW_EXPOSE_START].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, NULL);

/* translate group ranks into the communicator */
peers = ompi_osc_rdma_get_peers (module, module->pw_group);
if (OPAL_UNLIKELY(NULL == peers)) {
Expand Down Expand Up @@ -394,6 +399,8 @@ int ompi_osc_rdma_start_atomic (ompi_group_t *group, int mpi_assert, ompi_win_t
"from %d processes", peer->rank, (int) (group_size - state->num_post_msgs - 1));
opal_list_remove_item (&module->pending_posts, &pending_post->super);
OBJ_RELEASE(pending_post);
MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_PSCW_ACCESS_START].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &peer->rank);
ompi_osc_rdma_counter_add (&state->num_post_msgs, 1);
break;
}
Expand Down Expand Up @@ -464,6 +471,9 @@ int ompi_osc_rdma_complete_atomic (ompi_win_t *win)
ompi_osc_rdma_peer_t *peer = peers[i];
intptr_t target = (intptr_t) peer->state + offsetof (ompi_osc_rdma_state_t, num_complete_msgs);

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_PSCW_ACCESS_COMPLETE].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &peer->rank);

if (!ompi_osc_rdma_peer_local_state (peer)) {
ret = ompi_osc_rdma_lock_btl_op (module, peer, target, MCA_BTL_ATOMIC_ADD, 1, true);
assert (OMPI_SUCCESS == ret);
Expand Down Expand Up @@ -507,6 +517,9 @@ int ompi_osc_rdma_wait_atomic (ompi_win_t *win)
opal_atomic_mb ();
}

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_PSCW_EXPOSE_COMPLETE].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, NULL);

OPAL_THREAD_LOCK(&module->lock);
group = module->pw_group;
module->pw_group = NULL;
Expand Down Expand Up @@ -556,6 +569,9 @@ int ompi_osc_rdma_test_atomic (ompi_win_t *win, int *flag)
module->pw_group = NULL;
OPAL_THREAD_UNLOCK(&(module->lock));

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_PSCW_EXPOSE_COMPLETE].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, NULL);

OBJ_RELEASE(group);

OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "test complete. returning flag: true");
Expand Down
9 changes: 7 additions & 2 deletions ompi/mca/osc/rdma/osc_rdma_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* $HEADER$
*/

#include "ompi_config.h"

#include "osc_rdma.h"
#include "osc_rdma_comm.h"
#include "osc_rdma_frag.h"
#include "osc_rdma_sync.h"
Expand Down Expand Up @@ -461,6 +460,9 @@ static int ompi_osc_rdma_put_real (ompi_osc_rdma_sync_t *sync, ompi_osc_rdma_pee
OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "initiating btl put of %lu bytes to remote address %" PRIx64 ", sync "
"object %p...", (unsigned long) size, target_address, (void *) sync);

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_PUT_STARTED].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &((mca_osc_rdma_rdma_event_t){.target = peer->rank, .address = target_address, .size = size}));

/* flag outstanding rma requests */
ompi_osc_rdma_sync_rdma_inc (sync);

Expand Down Expand Up @@ -725,6 +727,9 @@ static int ompi_osc_rdma_get_contig (ompi_osc_rdma_sync_t *sync, ompi_osc_rdma_p
ompi_osc_rdma_sync_rdma_inc (sync);
}

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_GET_STARTED].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &((mca_osc_rdma_rdma_event_t){.target = peer->rank, .address = source_address, .size = size}));

do {
ret = ompi_osc_rdma_btl_get(module, peer->data_btl_index, peer->data_endpoint,
ptr, aligned_source_base, local_handle, source_handle,
Expand Down
83 changes: 83 additions & 0 deletions ompi/mca/osc/rdma/osc_rdma_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,87 @@ static const char* ompi_osc_rdma_set_no_lock_info(opal_infosubscriber_t *obj, co

static char *ompi_osc_rdma_full_connectivity_btls;

static char *mca_osc_rdma_target_element[] = {
"target", NULL,
};

static opal_datatype_t *mca_osc_rdma_rdma_event_types[] = {
&ompi_mpi_int.dt.super, &ompi_mpi_int64_t.dt.super, &ompi_mpi_int64_t.dt.super,
};

static char *mca_osc_rdma_rdma_event_elements[] = {
"target", "address", "size_bytes", NULL,
};

static unsigned long mca_osc_rdma_rdma_event_offsets[] = {
offsetof (mca_osc_rdma_rdma_event_t, target), offsetof (mca_osc_rdma_rdma_event_t, address),
offsetof (mca_osc_rdma_rdma_event_t, size),
};

mca_base_event_list_item_t mca_osc_rdma_events[] = {
[OMPI_OSC_RDMA_EVENT_LOCK_ACQUIRED] = {.name = "lock_acquired", .desc = "Passive-target lock aquired",
.verbosity = OPAL_INFO_LVL_5, .datatypes = &(opal_datatype_t *) {&ompi_mpi_int.dt.super},
.offsets = &(unsigned long) {0}, .num_datatypes = 1, .elements = mca_osc_rdma_target_element,
.bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_LOCK_RELEASED] = {.name = "lock_released", .desc = "Passive-target lock released",
.verbosity = OPAL_INFO_LVL_5, .datatypes = &(opal_datatype_t *) {&ompi_mpi_int.dt.super},
.offsets = &(unsigned long) {0}, .num_datatypes = 1, .elements = mca_osc_rdma_target_element,
.bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_PUT_STARTED] = {.name = "put_started", .desc = "Put started to target. Complete event may not exist.",
.verbosity = OPAL_INFO_LVL_5, .datatypes = mca_osc_rdma_rdma_event_types,
.offsets = mca_osc_rdma_rdma_event_offsets, .num_datatypes = 3,
.elements = mca_osc_rdma_rdma_event_elements, .bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_PUT_COMPLETE] = {.name = "put_complete", .desc = "Put completed on target",
.verbosity = OPAL_INFO_LVL_5, .datatypes = mca_osc_rdma_rdma_event_types,
.offsets = mca_osc_rdma_rdma_event_offsets, .num_datatypes = 3,
.elements = mca_osc_rdma_rdma_event_elements, .bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_GET_STARTED] = {.name = "get_started", .desc = "Get started to target. Complete event may not exist.",
.verbosity = OPAL_INFO_LVL_5, .datatypes = mca_osc_rdma_rdma_event_types,
.offsets = mca_osc_rdma_rdma_event_offsets, .num_datatypes = 3,
.elements = mca_osc_rdma_rdma_event_elements, .bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_GET_COMPLETE] = {.name = "get_complete", .desc = "Get completed on target",
.verbosity = OPAL_INFO_LVL_5, .datatypes = mca_osc_rdma_rdma_event_types,
.offsets = mca_osc_rdma_rdma_event_offsets, .num_datatypes = 3,
.elements = mca_osc_rdma_rdma_event_elements, .bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_FLUSH_STARTED] = {.name = "flush_started", .desc = "Flush started on target",
.verbosity = OPAL_INFO_LVL_5, .datatypes = &(opal_datatype_t *) {&ompi_mpi_int.dt.super},
.offsets = &(unsigned long) {0}, .num_datatypes = 1, .elements = mca_osc_rdma_target_element,
.bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_FLUSH_COMPLETE] = {.name = "flush_complete", .desc = "Flush complete on target",
.verbosity = OPAL_INFO_LVL_5, .datatypes = &(opal_datatype_t *) {&ompi_mpi_int.dt.super},
.offsets = &(unsigned long) {0}, .num_datatypes = 1, .elements = mca_osc_rdma_target_element,
.bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_PSCW_EXPOSE_START] = {.name = "pscw_expose_start", .desc = "PSCW exposure started",
.verbosity = OPAL_INFO_LVL_5, .datatypes = &(opal_datatype_t *) {&ompi_mpi_int.dt.super},
.offsets = &(unsigned long) {0}, .num_datatypes = 0, .elements = mca_osc_rdma_target_element,
.bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_PSCW_EXPOSE_COMPLETE] = {.name = "pscw_expose_complete", .desc = "PSCW exposure complete",
.verbosity = OPAL_INFO_LVL_5, .datatypes = &(opal_datatype_t *) {&ompi_mpi_int.dt.super},
.offsets = &(unsigned long) {0}, .num_datatypes = 0, .elements = mca_osc_rdma_target_element,
.bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_PSCW_ACCESS_START] = {.name = "pscw_access_start", .desc = "PSCW access epoch started",
.verbosity = OPAL_INFO_LVL_5, .datatypes = &(opal_datatype_t *) {&ompi_mpi_int.dt.super},
.offsets = &(unsigned long) {0}, .num_datatypes = 1, .elements = mca_osc_rdma_target_element,
.bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_PSCW_ACCESS_COMPLETE] = {.name = "pscw_access_complete", .desc = "PSCW access epoch complete",
.verbosity = OPAL_INFO_LVL_5, .datatypes = &(opal_datatype_t *) {&ompi_mpi_int.dt.super},
.offsets = &(unsigned long) {0}, .num_datatypes = 1, .elements = mca_osc_rdma_target_element,
.bind = MCA_BASE_VAR_BIND_MPI_WIN},

[OMPI_OSC_RDMA_EVENT_FENCE] = {.name = "fence", .desc = "Fence called", .verbosity = OPAL_INFO_LVL_5, .bind = MCA_BASE_VAR_BIND_MPI_WIN},
};

static const mca_base_var_enum_value_t ompi_osc_rdma_locking_modes[] = {
{.value = OMPI_OSC_RDMA_LOCKING_TWO_LEVEL, .string = "two_level"},
{.value = OMPI_OSC_RDMA_LOCKING_ON_DEMAND, .string = "on_demand"},
Expand Down Expand Up @@ -305,6 +386,8 @@ static int ompi_osc_rdma_component_register (void)
ompi_osc_rdma_pvar_read, NULL, NULL,
(void *) (intptr_t) offsetof (ompi_osc_rdma_module_t, get_retry_count));

mca_base_component_event_register_list (&mca_osc_rdma_component.super.osc_version, mca_osc_rdma_events, OMPI_OSC_RDMA_EVENT_MAX);

return OMPI_SUCCESS;
}

Expand Down
25 changes: 25 additions & 0 deletions ompi/mca/osc/rdma/osc_rdma_passive_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@ int ompi_osc_rdma_flush (int target, struct ompi_win_t *win)
}
OPAL_THREAD_UNLOCK(&module->lock);

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_FLUSH_STARTED].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &target);

/* finish all outstanding fragments */
ompi_osc_rdma_sync_rdma_complete (lock);

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_FLUSH_COMPLETE].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &target);

OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "flush on target %d complete", target);

return OMPI_SUCCESS;
Expand All @@ -85,6 +91,9 @@ int ompi_osc_rdma_flush_all (struct ompi_win_t *win)
ompi_osc_rdma_sync_rdma_complete (&module->all_sync);
}

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_FLUSH_STARTED].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &(int) {-1});

/* flush all locks */
ret = opal_hash_table_get_first_key_uint32 (&module->outstanding_locks, &key, (void **) &lock, &node);
while (OPAL_SUCCESS == ret) {
Expand All @@ -94,6 +103,9 @@ int ompi_osc_rdma_flush_all (struct ompi_win_t *win)
node, &node);
}

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_FLUSH_COMPLETE].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &(int) {-1});

OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "flush_all complete");

return OPAL_SUCCESS;
Expand Down Expand Up @@ -159,6 +171,9 @@ static inline int ompi_osc_rdma_lock_atomic_internal (ompi_osc_rdma_module_t *mo
} while (1);
}

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_LOCK_ACQUIRED].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &peer->rank);

return OMPI_SUCCESS;
}

Expand All @@ -183,6 +198,10 @@ static inline int ompi_osc_rdma_unlock_atomic_internal (ompi_osc_rdma_module_t *
peer->flags &= ~OMPI_OSC_RDMA_PEER_DEMAND_LOCKED;
}

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_LOCK_RELEASED].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &peer->rank);


return OMPI_SUCCESS;
}

Expand Down Expand Up @@ -355,6 +374,9 @@ int ompi_osc_rdma_lock_all_atomic (int mpi_assert, struct ompi_win_t *win)
ret = ompi_osc_rdma_lock_acquire_shared (module, module->leader, 0x0000000100000000UL,
offsetof(ompi_osc_rdma_state_t, global_lock),
0x00000000ffffffffUL);

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_LOCK_ACQUIRED].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &(int) {-1});
} else {
/* always lock myself */
ret = ompi_osc_rdma_demand_lock_peer (module, module->my_peer);
Expand Down Expand Up @@ -410,6 +432,9 @@ int ompi_osc_rdma_unlock_all_atomic (struct ompi_win_t *win)
/* decrement the master lock shared count */
(void) ompi_osc_rdma_lock_release_shared (module, module->leader, -0x0000000100000000UL,
offsetof (ompi_osc_rdma_state_t, global_lock));

MCA_BASE_EVENT_RAISE(mca_osc_rdma_events[OMPI_OSC_RDMA_EVENT_LOCK_RELEASED].event, MCA_BASE_CB_REQUIRE_ASYNC_SIGNAL_SAFE,
module->win, NULL, &(int) {-1});
}
}

Expand Down
Loading