File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,6 @@ static mca_bml_base_endpoint_t *mca_bml_r2_allocate_endpoint (ompi_proc_t *proc)
160
160
mca_bml_base_btl_array_reserve (& bml_endpoint -> btl_rdma , mca_bml_r2 .num_btl_modules );
161
161
bml_endpoint -> btl_max_send_size = -1 ;
162
162
bml_endpoint -> btl_proc = proc ;
163
- proc -> proc_endpoints [OMPI_PROC_ENDPOINT_TAG_BML ] = bml_endpoint ;
164
163
165
164
bml_endpoint -> btl_flags_or = 0 ;
166
165
return bml_endpoint ;
@@ -430,6 +429,12 @@ static int mca_bml_r2_add_proc (struct ompi_proc_t *proc)
430
429
/* compute metrics for registered btls */
431
430
mca_bml_r2_compute_endpoint_metrics (bml_endpoint );
432
431
432
+ /* do it last, for the lazy initialization check in bml_base_get* */
433
+ #if OPAL_ENABLE_THREAD_MULTI
434
+ opal_atomic_wmb ();
435
+ #endif /* OPAL_ENABLE_THREAD_MULTI */
436
+ proc -> proc_endpoints [OMPI_PROC_ENDPOINT_TAG_BML ] = bml_endpoint ;
437
+
433
438
return OMPI_SUCCESS ;
434
439
}
435
440
@@ -523,6 +528,7 @@ static int mca_bml_r2_add_procs( size_t nprocs,
523
528
524
529
if (NULL == bml_endpoint ) {
525
530
bml_endpoint = mca_bml_r2_allocate_endpoint (proc );
531
+ proc -> proc_endpoints [OMPI_PROC_ENDPOINT_TAG_BML ] = bml_endpoint ;
526
532
if (NULL == bml_endpoint ) {
527
533
free (btl_endpoints );
528
534
free (new_procs );
You can’t perform that action at this time.
0 commit comments