@@ -78,15 +78,15 @@ mca_spml_ucx_t mca_spml_ucx = {
78
78
.num_disconnect = 1 ,
79
79
.heap_reg_nb = 0 ,
80
80
.enabled = 0 ,
81
- .get_mkey_slow = NULL ,
82
- .synchronized_quiet = false,
83
- .strong_sync = SPML_UCX_STRONG_ORDERING_NONE
81
+ .get_mkey_slow = NULL
84
82
};
85
83
86
84
mca_spml_ucx_ctx_t mca_spml_ucx_ctx_default = {
87
85
.ucp_worker = NULL ,
88
86
.ucp_peers = NULL ,
89
- .options = 0
87
+ .options = 0 ,
88
+ .synchronized_quiet = false,
89
+ .strong_sync = SPML_UCX_STRONG_ORDERING_NONE
90
90
};
91
91
92
92
#if HAVE_DECL_UCP_ATOMIC_OP_NBX
@@ -405,7 +405,7 @@ int mca_spml_ucx_init_put_op_mask(mca_spml_ucx_ctx_t *ctx, size_t nprocs)
405
405
{
406
406
int res ;
407
407
408
- if (mca_spml_ucx_is_strong_ordering ()) {
408
+ if (mca_spml_ucx_is_strong_ordering (ctx )) {
409
409
ctx -> put_proc_indexes = malloc (nprocs * sizeof (* ctx -> put_proc_indexes ));
410
410
if (NULL == ctx -> put_proc_indexes ) {
411
411
return OSHMEM_ERR_OUT_OF_RESOURCE ;
@@ -427,7 +427,7 @@ int mca_spml_ucx_init_put_op_mask(mca_spml_ucx_ctx_t *ctx, size_t nprocs)
427
427
428
428
int mca_spml_ucx_clear_put_op_mask (mca_spml_ucx_ctx_t * ctx )
429
429
{
430
- if (mca_spml_ucx_is_strong_ordering () && ctx -> put_proc_indexes ) {
430
+ if (mca_spml_ucx_is_strong_ordering (ctx ) && ctx -> put_proc_indexes ) {
431
431
OBJ_DESTRUCT (& ctx -> put_op_bitmap );
432
432
free (ctx -> put_proc_indexes );
433
433
}
@@ -844,6 +844,8 @@ static int mca_spml_ucx_ctx_create_common(long options, mca_spml_ucx_ctx_t **ucx
844
844
ucx_ctx -> options = options ;
845
845
ucx_ctx -> ucp_worker = calloc (1 , sizeof (ucp_worker_h ));
846
846
ucx_ctx -> ucp_workers = 1 ;
847
+ ucx_ctx -> synchronized_quiet = mca_spml_ucx_ctx_default .synchronized_quiet ;
848
+ ucx_ctx -> strong_sync = mca_spml_ucx_ctx_default .strong_sync ;
847
849
848
850
params .field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE ;
849
851
if (oshmem_mpi_thread_provided == SHMEM_THREAD_SINGLE || options & SHMEM_CTX_PRIVATE || options & SHMEM_CTX_SERIALIZED ) {
@@ -1193,7 +1195,7 @@ static int mca_spml_ucx_strong_sync(shmem_ctx_t ctx)
1193
1195
for (i = 0 ; i < ucx_ctx -> put_proc_count ; i ++ ) {
1194
1196
idx = ucx_ctx -> put_proc_indexes [i ];
1195
1197
1196
- switch (mca_spml_ucx . strong_sync ) {
1198
+ switch (ucx_ctx -> strong_sync ) {
1197
1199
case SPML_UCX_STRONG_ORDERING_NONE :
1198
1200
case SPML_UCX_STRONG_ORDERING_GETNB :
1199
1201
ret = mca_spml_ucx_get_nb (ctx ,
@@ -1245,7 +1247,7 @@ int mca_spml_ucx_fence(shmem_ctx_t ctx)
1245
1247
1246
1248
opal_atomic_wmb ();
1247
1249
1248
- if (mca_spml_ucx . strong_sync != SPML_UCX_STRONG_ORDERING_NONE ) {
1250
+ if (ucx_ctx -> strong_sync != SPML_UCX_STRONG_ORDERING_NONE ) {
1249
1251
ret = mca_spml_ucx_strong_sync (ctx );
1250
1252
if (ret != OSHMEM_SUCCESS ) {
1251
1253
oshmem_shmem_abort (-1 );
@@ -1272,7 +1274,7 @@ int mca_spml_ucx_quiet(shmem_ctx_t ctx)
1272
1274
unsigned i ;
1273
1275
mca_spml_ucx_ctx_t * ucx_ctx = (mca_spml_ucx_ctx_t * )ctx ;
1274
1276
1275
- if (mca_spml_ucx . synchronized_quiet ) {
1277
+ if (ucx_ctx -> synchronized_quiet ) {
1276
1278
ret = mca_spml_ucx_strong_sync (ctx );
1277
1279
if (ret != OSHMEM_SUCCESS ) {
1278
1280
oshmem_shmem_abort (-1 );
0 commit comments