File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -417,6 +417,12 @@ static int mca_btl_ofi_init_device(struct fi_info *info)
417
417
ep_attr = ofi_info -> ep_attr ;
418
418
domain_attr = ofi_info -> domain_attr ;
419
419
420
+ /* mtl_btl_ofi_rcache_init() initializes patcher which should only
421
+ * take place things are single threaded. OFI providers may start
422
+ * spawn threads, so initialize the rcache before creating OFI objects
423
+ * to prevent races. */
424
+ mca_btl_ofi_rcache_init (module );
425
+
420
426
linux_device_name = info -> domain_attr -> name ;
421
427
BTL_VERBOSE (("initializing dev:%s provider:%s" ,
422
428
linux_device_name ,
@@ -547,9 +553,6 @@ static int mca_btl_ofi_init_device(struct fi_info *info)
547
553
module -> use_virt_addr = true;
548
554
}
549
555
550
- /* initialize the rcache */
551
- mca_btl_ofi_rcache_init (module );
552
-
553
556
/* create endpoint list */
554
557
OBJ_CONSTRUCT (& module -> endpoints , opal_list_t );
555
558
OBJ_CONSTRUCT (& module -> module_lock , opal_mutex_t );
You can’t perform that action at this time.
0 commit comments