From 60e44f32e13bb076e30ff111e2f74eeab47204b6 Mon Sep 17 00:00:00 2001 From: Shumpei Shiina Date: Mon, 21 Nov 2022 16:33:50 +0900 Subject: [PATCH] Add missing dynamic_lock member in ompi_osc_ucx_state struct Signed-off-by: Shumpei Shiina --- ompi/mca/osc/ucx/osc_ucx.h | 3 ++- ompi/mca/osc/ucx/osc_ucx_component.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ompi/mca/osc/ucx/osc_ucx.h b/ompi/mca/osc/ucx/osc_ucx.h index a54cff73722..d621d7e62fb 100644 --- a/ompi/mca/osc/ucx/osc_ucx.h +++ b/ompi/mca/osc/ucx/osc_ucx.h @@ -82,7 +82,7 @@ typedef struct ompi_osc_ucx_epoch_type { #define OSC_UCX_STATE_COMPLETE_COUNT_OFFSET (sizeof(uint64_t) * 3) #define OSC_UCX_STATE_POST_INDEX_OFFSET (sizeof(uint64_t) * 4) #define OSC_UCX_STATE_POST_STATE_OFFSET (sizeof(uint64_t) * 5) -#define OSC_UCX_STATE_DYNAMIC_LOCK_OFFSET (sizeof(uint64_t) * 6) +#define OSC_UCX_STATE_DYNAMIC_LOCK_OFFSET (sizeof(uint64_t) * (5 + OMPI_OSC_UCX_POST_PEER_MAX)) #define OSC_UCX_STATE_DYNAMIC_WIN_CNT_OFFSET (sizeof(uint64_t) * (6 + OMPI_OSC_UCX_POST_PEER_MAX)) typedef struct ompi_osc_dynamic_win_info { @@ -105,6 +105,7 @@ typedef struct ompi_osc_ucx_state { volatile uint64_t complete_count; /* # msgs received from complete processes */ volatile uint64_t post_index; volatile uint64_t post_state[OMPI_OSC_UCX_POST_PEER_MAX]; + volatile uint64_t dynamic_lock; volatile uint64_t dynamic_win_count; volatile ompi_osc_dynamic_win_info_t dynamic_wins[OMPI_OSC_UCX_ATTACH_MAX]; } ompi_osc_ucx_state_t; diff --git a/ompi/mca/osc/ucx/osc_ucx_component.c b/ompi/mca/osc/ucx/osc_ucx_component.c index a6a901d3a24..6518a0797ac 100644 --- a/ompi/mca/osc/ucx/osc_ucx_component.c +++ b/ompi/mca/osc/ucx/osc_ucx_component.c @@ -838,6 +838,7 @@ static int component_select(struct ompi_win_t *win, void **base, size_t size, in module->state.complete_count = 0; module->state.req_flag = 0; module->state.acc_lock = TARGET_LOCK_UNLOCKED; + module->state.dynamic_lock = TARGET_LOCK_UNLOCKED; module->state.dynamic_win_count = 0; for (i = 0; i < OMPI_OSC_UCX_ATTACH_MAX; i++) { module->local_dynamic_win_info[i].refcnt = 0;