Skip to content

Commit 5ff314c

Browse files
author
Luke Robison
committed
btl/usnic: move btl_usnic_lock initialization
Previously it was in component_init, but after #12057 I noticed MPI finalize would find an uninitialized object and segfault. This change moves the initialization to component_open, so that component_close() can rely on the opal object initialization having been completed. Signed-off-by: Luke Robison <lrbison@amazon.com>
1 parent 3e82472 commit 5ff314c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opal/mca/btl/usnic/btl_usnic_component.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ static int usnic_component_open(void)
160160

161161
/* initialize objects */
162162
OBJ_CONSTRUCT(&mca_btl_usnic_component.usnic_procs, opal_list_t);
163+
OBJ_CONSTRUCT(&btl_usnic_lock, opal_recursive_mutex_t);
164+
163165

164166
/* Sanity check: if_include and if_exclude need to be mutually
165167
exclusive */
@@ -587,8 +589,6 @@ usnic_component_init(int *num_btl_modules, bool want_progress_threads, bool want
587589
}
588590
}
589591

590-
OBJ_CONSTRUCT(&btl_usnic_lock, opal_recursive_mutex_t);
591-
592592
/* There are multiple dimensions to consider when requesting an
593593
API version number from libfabric:
594594

0 commit comments

Comments
 (0)