Skip to content

Commit 42f20cb

Browse files
committed
ch4/ofi: skip ofi_initialized if world size is 1
The address exchange will be skipped if it is a single process, including inserting self address. This results in flush_send in finalize fail. Simply avoid setting ofi_initialized in the case of single process make it work.
1 parent 849b286 commit 42f20cb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,12 +811,11 @@ int MPIDI_OFI_init_world(void)
811811
{
812812
int mpi_errno = MPI_SUCCESS;
813813

814-
if (!MPIDI_OFI_global.got_named_av) {
814+
if (!MPIDI_OFI_global.got_named_av && MPIR_Process.size > 1) {
815815
MPIR_Assert(MPIR_Process.comm_world);
816816
mpi_errno = MPIDI_OFI_comm_addr_exchange(MPIR_Process.comm_world);
817817
MPIR_ERR_CHECK(mpi_errno);
818818
}
819-
820819
ofi_initialized = true;
821820

822821
fn_exit:

0 commit comments

Comments
 (0)