Skip to content

Commit 076c509

Browse files
committed
ch4/ofi: gather vci init in MPIDI_OFI_vci_init
1 parent c4189eb commit 076c509

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/mpid/ch4/netmod/ofi/ofi_init.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,15 +707,16 @@ int MPIDI_OFI_init_local(int *tag_bits)
707707
mpi_errno = ofi_pvar_init();
708708
MPIR_ERR_CHECK(mpi_errno);
709709

710+
mpi_errno = MPIDI_OFI_vci_init();
711+
MPIR_ERR_CHECK(mpi_errno);
712+
710713
/* -------------------------------- */
711714
/* Set up the libfabric provider(s) */
712715
/* -------------------------------- */
713716

714717
/* WB TODO - I assume that after this function is done, there will be an array of providers in
715718
* MPIDI_OFI_global.prov_use that will map to the VNI contexts below. We can also use it to
716719
* generate the addresses in the business card exchange. */
717-
MPIDI_OFI_global.num_nics = 1;
718-
719720
struct fi_info *prov = NULL;
720721
mpi_errno = MPIDI_OFI_find_provider(&prov);
721722
MPIR_ERR_CHECK(mpi_errno);

src/mpid/ch4/netmod/ofi/ofi_init.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ int MPIDI_OFI_get_required_version(void);
1111
int MPIDI_OFI_find_provider(struct fi_info **prov_out);
1212
void MPIDI_OFI_find_provider_cleanup(void);
1313
int MPIDI_OFI_init_multi_nic(struct fi_info *prov);
14+
int MPIDI_OFI_vci_init(void);
1415

1516
/* set hints based on MPIDI_OFI_global.settings */
1617
int MPIDI_OFI_init_hints(struct fi_info *hints);

src/mpid/ch4/netmod/ofi/ofi_vci.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
#include "ofi_impl.h"
88
#include "ofi_init.h"
99

10+
int MPIDI_OFI_vci_init(void)
11+
{
12+
MPIDI_OFI_global.num_nics = 1;
13+
MPIDI_OFI_global.num_vcis = 1;
14+
return MPI_SUCCESS;
15+
}
16+
1017
/* Address exchange within comm and setup multiple vcis */
1118
static int addr_exchange_all_ctx(MPIR_Comm * comm);
1219

0 commit comments

Comments
 (0)