@@ -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
#ifdef HAVE_UCP_REQUEST_PARAM_T
@@ -402,7 +402,7 @@ int mca_spml_ucx_init_put_op_mask(mca_spml_ucx_ctx_t *ctx, size_t nprocs)
402
402
{
403
403
int res ;
404
404
405
- if (mca_spml_ucx_is_strong_ordering ()) {
405
+ if (mca_spml_ucx_is_strong_ordering (ctx )) {
406
406
ctx -> put_proc_indexes = malloc (nprocs * sizeof (* ctx -> put_proc_indexes ));
407
407
if (NULL == ctx -> put_proc_indexes ) {
408
408
return OSHMEM_ERR_OUT_OF_RESOURCE ;
@@ -424,7 +424,7 @@ int mca_spml_ucx_init_put_op_mask(mca_spml_ucx_ctx_t *ctx, size_t nprocs)
424
424
425
425
int mca_spml_ucx_clear_put_op_mask (mca_spml_ucx_ctx_t * ctx )
426
426
{
427
- if (mca_spml_ucx_is_strong_ordering () && ctx -> put_proc_indexes ) {
427
+ if (mca_spml_ucx_is_strong_ordering (ctx ) && ctx -> put_proc_indexes ) {
428
428
OBJ_DESTRUCT (& ctx -> put_op_bitmap );
429
429
free (ctx -> put_proc_indexes );
430
430
}
@@ -841,6 +841,8 @@ static int mca_spml_ucx_ctx_create_common(long options, mca_spml_ucx_ctx_t **ucx
841
841
ucx_ctx -> options = options ;
842
842
ucx_ctx -> ucp_worker = calloc (1 , sizeof (ucp_worker_h ));
843
843
ucx_ctx -> ucp_workers = 1 ;
844
+ ucx_ctx -> synchronized_quiet = mca_spml_ucx_ctx_default .synchronized_quiet ;
845
+ ucx_ctx -> strong_sync = mca_spml_ucx_ctx_default .strong_sync ;
844
846
845
847
params .field_mask = UCP_WORKER_PARAM_FIELD_THREAD_MODE ;
846
848
if (oshmem_mpi_thread_provided == SHMEM_THREAD_SINGLE || options & SHMEM_CTX_PRIVATE || options & SHMEM_CTX_SERIALIZED ) {
@@ -1190,7 +1192,7 @@ static int mca_spml_ucx_strong_sync(shmem_ctx_t ctx)
1190
1192
for (i = 0 ; i < ucx_ctx -> put_proc_count ; i ++ ) {
1191
1193
idx = ucx_ctx -> put_proc_indexes [i ];
1192
1194
1193
- switch (mca_spml_ucx . strong_sync ) {
1195
+ switch (ucx_ctx -> strong_sync ) {
1194
1196
case SPML_UCX_STRONG_ORDERING_NONE :
1195
1197
case SPML_UCX_STRONG_ORDERING_GETNB :
1196
1198
ret = mca_spml_ucx_get_nb (ctx ,
@@ -1242,7 +1244,7 @@ int mca_spml_ucx_fence(shmem_ctx_t ctx)
1242
1244
1243
1245
opal_atomic_wmb ();
1244
1246
1245
- if (mca_spml_ucx . strong_sync != SPML_UCX_STRONG_ORDERING_NONE ) {
1247
+ if (ucx_ctx -> strong_sync != SPML_UCX_STRONG_ORDERING_NONE ) {
1246
1248
ret = mca_spml_ucx_strong_sync (ctx );
1247
1249
if (ret != OSHMEM_SUCCESS ) {
1248
1250
oshmem_shmem_abort (-1 );
@@ -1269,7 +1271,7 @@ int mca_spml_ucx_quiet(shmem_ctx_t ctx)
1269
1271
unsigned i ;
1270
1272
mca_spml_ucx_ctx_t * ucx_ctx = (mca_spml_ucx_ctx_t * )ctx ;
1271
1273
1272
- if (mca_spml_ucx . synchronized_quiet ) {
1274
+ if (ucx_ctx -> synchronized_quiet ) {
1273
1275
ret = mca_spml_ucx_strong_sync (ctx );
1274
1276
if (ret != OSHMEM_SUCCESS ) {
1275
1277
oshmem_shmem_abort (-1 );
0 commit comments