Skip to content

Commit f65f900

Browse files
committed
btl/ofi: Set domain threading model based on MPI thread support
Signed-off-by: Jessie Yang <jiaxiyan@amazon.com>
1 parent fe33997 commit f65f900

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

opal/mca/btl/ofi/btl_ofi_component.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,12 @@ static mca_btl_base_module_t **mca_btl_ofi_component_init(int *num_btl_modules,
339339
domain_attr.control_progress = progress_mode;
340340
domain_attr.data_progress = progress_mode;
341341

342+
if (enable_mpi_threads) {
343+
domain_attr.threading = FI_THREAD_SAFE;
344+
} else {
345+
domain_attr.threading = FI_THREAD_DOMAIN;
346+
}
347+
342348
/* select endpoint type */
343349
ep_attr.type = FI_EP_RDM;
344350

0 commit comments

Comments
 (0)