Skip to content

Commit 9f845f0

Browse files
authored
Merge pull request #8567 from hoopoepg/topic/ucx-atomic-dependencies
SPML/UCX: removed direct dependency to SPML UCX
2 parents d91e646 + 01d7164 commit 9f845f0

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

oshmem/mca/spml/ucx/spml_ucx.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ mca_spml_ucx_t mca_spml_ucx = {
7878
.num_disconnect = 1,
7979
.heap_reg_nb = 0,
8080
.enabled = 0,
81-
.get_mkey_slow = NULL,
82-
.synchronized_quiet = false
81+
.get_mkey_slow = NULL
8382
};
8483

8584
mca_spml_ucx_ctx_t mca_spml_ucx_ctx_default = {
86-
.ucp_worker = NULL,
87-
.ucp_peers = NULL,
88-
.options = 0
85+
.ucp_worker = NULL,
86+
.ucp_peers = NULL,
87+
.options = 0,
88+
.synchronized_quiet = false
8989
};
9090

9191
#if HAVE_DECL_UCP_ATOMIC_OP_NBX
@@ -673,6 +673,7 @@ static int mca_spml_ucx_ctx_create_common(long options, mca_spml_ucx_ctx_t **ucx
673673
ucx_ctx->options = options;
674674
ucx_ctx->ucp_worker = calloc(1, sizeof(ucp_worker_h));
675675
ucx_ctx->ucp_workers = 1;
676+
ucx_ctx->synchronized_quiet = mca_spml_ucx_ctx_default.synchronized_quiet;
676677

677678
params.field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE;
678679
if (oshmem_mpi_thread_provided == SHMEM_THREAD_SINGLE || options & SHMEM_CTX_PRIVATE || options & SHMEM_CTX_SERIALIZED) {

oshmem/mca/spml/ucx/spml_ucx.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ struct mca_spml_ucx_ctx {
7575
unsigned int ucp_workers;
7676
int *put_proc_indexes;
7777
unsigned put_proc_count;
78+
bool synchronized_quiet;
7879
};
7980
typedef struct mca_spml_ucx_ctx mca_spml_ucx_ctx_t;
8081

@@ -256,7 +257,7 @@ static inline int ucx_status_to_oshmem_nb(ucs_status_t status)
256257

257258
static inline void mca_spml_ucx_remote_op_posted(mca_spml_ucx_ctx_t *ctx, int dst)
258259
{
259-
if (OPAL_UNLIKELY(mca_spml_ucx.synchronized_quiet)) {
260+
if (OPAL_UNLIKELY(ctx->synchronized_quiet)) {
260261
if (!opal_bitmap_is_set_bit(&ctx->put_op_bitmap, dst)) {
261262
ctx->put_proc_indexes[ctx->put_proc_count++] = dst;
262263
opal_bitmap_set_bit(&ctx->put_op_bitmap, dst);

oshmem/mca/spml/ucx/spml_ucx_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static int mca_spml_ucx_component_register(void)
159159

160160
mca_spml_ucx_param_register_bool("synchronized_quiet", 0,
161161
"Use synchronized quiet on shmem_quiet or shmem_barrier_all operations",
162-
&mca_spml_ucx.synchronized_quiet);
162+
&mca_spml_ucx_ctx_default.synchronized_quiet);
163163

164164
mca_spml_ucx_param_register_ulong("nb_progress_thresh_global", 0,
165165
"Number of nb_put or nb_get operations before ucx progress is triggered. Disabled by default (0). Setting this value will override nb_put/get_progress_thresh.",

0 commit comments

Comments
 (0)