@@ -536,6 +536,10 @@ static int ompi_mpi_instance_init_common (int argc, char **argv)
536536 return ompi_instance_print_error ("mca_pml_base_select() failed" , ret );
537537 }
538538
539+ if (OMPI_SUCCESS != (ret = ompi_osc_base_find_available (OPAL_ENABLE_PROGRESS_THREADS , ompi_mpi_thread_multiple ))) {
540+ return ompi_instance_print_error ("ompi_osc_base_find_available() failed" , ret );
541+ }
542+
539543 OMPI_TIMING_IMPORT_OPAL ("orte_init" );
540544 OMPI_TIMING_NEXT ("rte_init-commit" );
541545
@@ -617,10 +621,6 @@ static int ompi_mpi_instance_init_common (int argc, char **argv)
617621 return ompi_instance_print_error ("mca_coll_base_find_available() failed" , ret );
618622 }
619623
620- if (OMPI_SUCCESS != (ret = ompi_osc_base_find_available (OPAL_ENABLE_PROGRESS_THREADS , ompi_mpi_thread_multiple ))) {
621- return ompi_instance_print_error ("ompi_osc_base_find_available() failed" , ret );
622- }
623-
624624 /* io and topo components are not selected here -- see comment
625625 above about the io and topo frameworks being loaded lazily */
626626
@@ -654,7 +654,8 @@ static int ompi_mpi_instance_init_common (int argc, char **argv)
654654 return ompi_instance_print_error ("ompi_attr_create_predefined_keyvals() failed" , ret );
655655 }
656656
657- if (mca_pml_base_requires_world ()) {
657+ if (mca_pml_base_requires_world () ||
658+ mca_osc_base_requires_world ()) {
658659 /* need to set up comm world for this instance -- XXX -- FIXME -- probably won't always
659660 * be the case. */
660661 if (OMPI_SUCCESS != (ret = ompi_comm_init_mpi3 ())) {
@@ -699,7 +700,8 @@ static int ompi_mpi_instance_init_common (int argc, char **argv)
699700 /* some btls/mtls require we call add_procs with all procs in the job.
700701 * since the btls/mtls have no visibility here it is up to the pml to
701702 * convey this requirement */
702- if (mca_pml_base_requires_world ()) {
703+ if (mca_pml_base_requires_world () ||
704+ mca_osc_base_requires_world ()) {
703705 if (NULL == (procs = ompi_proc_world (& nprocs ))) {
704706 return ompi_instance_print_error ("ompi_proc_get_allocated () failed" , ret );
705707 }
0 commit comments