@@ -535,6 +535,10 @@ static int ompi_mpi_instance_init_common (int argc, char **argv)
535535 return ompi_instance_print_error ("mca_pml_base_select() failed" , ret );
536536 }
537537
538+ if (OMPI_SUCCESS != (ret = ompi_osc_base_find_available (OPAL_ENABLE_PROGRESS_THREADS , ompi_mpi_thread_multiple ))) {
539+ return ompi_instance_print_error ("ompi_osc_base_find_available() failed" , ret );
540+ }
541+
538542 OMPI_TIMING_IMPORT_OPAL ("orte_init" );
539543 OMPI_TIMING_NEXT ("rte_init-commit" );
540544
@@ -616,10 +620,6 @@ static int ompi_mpi_instance_init_common (int argc, char **argv)
616620 return ompi_instance_print_error ("mca_coll_base_find_available() failed" , ret );
617621 }
618622
619- if (OMPI_SUCCESS != (ret = ompi_osc_base_find_available (OPAL_ENABLE_PROGRESS_THREADS , ompi_mpi_thread_multiple ))) {
620- return ompi_instance_print_error ("ompi_osc_base_find_available() failed" , ret );
621- }
622-
623623 /* io and topo components are not selected here -- see comment
624624 above about the io and topo frameworks being loaded lazily */
625625
@@ -653,7 +653,8 @@ static int ompi_mpi_instance_init_common (int argc, char **argv)
653653 return ompi_instance_print_error ("ompi_attr_create_predefined_keyvals() failed" , ret );
654654 }
655655
656- if (mca_pml_base_requires_world ()) {
656+ if (mca_pml_base_requires_world () ||
657+ mca_osc_base_requires_world ()) {
657658 /* need to set up comm world for this instance -- XXX -- FIXME -- probably won't always
658659 * be the case. */
659660 if (OMPI_SUCCESS != (ret = ompi_comm_init_mpi3 ())) {
@@ -702,7 +703,8 @@ static int ompi_mpi_instance_init_common (int argc, char **argv)
702703 /* some btls/mtls require we call add_procs with all procs in the job.
703704 * since the btls/mtls have no visibility here it is up to the pml to
704705 * convey this requirement */
705- if (mca_pml_base_requires_world ()) {
706+ if (mca_pml_base_requires_world () ||
707+ mca_osc_base_requires_world ()) {
706708 if (NULL == (procs = ompi_proc_world (& nprocs ))) {
707709 return ompi_instance_print_error ("ompi_proc_get_allocated () failed" , ret );
708710 }
0 commit comments