@@ -110,7 +110,7 @@ mca_scoll_mpi_comm_query(oshmem_group_t *osh_group, int *priority)
110110 mca_scoll_mpi_module_t * mpi_module ;
111111 int err , i ;
112112 int tag ;
113- ompi_group_t * parent_group , * new_group ;
113+ ompi_group_t * world_group , * new_group ;
114114 ompi_communicator_t * newcomm = NULL ;
115115 * priority = 0 ;
116116 mca_scoll_mpi_component_t * cm ;
@@ -129,7 +129,7 @@ mca_scoll_mpi_comm_query(oshmem_group_t *osh_group, int *priority)
129129 osh_group -> ompi_comm = & (ompi_mpi_comm_world .comm );
130130 OPAL_TIMING_ENV_NEXT (comm_query , "ompi_mpi_comm_world" );
131131 } else {
132- err = ompi_comm_group (& (ompi_mpi_comm_world .comm ), & parent_group );
132+ err = ompi_comm_group (& (ompi_mpi_comm_world .comm ), & world_group );
133133 if (OPAL_UNLIKELY (OMPI_SUCCESS != err )) {
134134 return NULL ;
135135 }
@@ -143,20 +143,14 @@ mca_scoll_mpi_comm_query(oshmem_group_t *osh_group, int *priority)
143143
144144 OPAL_TIMING_ENV_NEXT (comm_query , "malloc" );
145145
146+ /* Fill the map "group_rank-to-world_rank" in order to create a new proc group */
146147 for (i = 0 ; i < osh_group -> proc_count ; i ++ ) {
147- ompi_proc_t * ompi_proc ;
148- for ( int j = 0 ; j < ompi_group_size (parent_group ); j ++ ) {
149- ompi_proc = ompi_group_peer_lookup (parent_group , j );
150- if ( 0 == opal_compare_proc (ompi_proc -> super .proc_name , osh_group -> proc_array [i ]-> super .proc_name )) {
151- ranks [i ] = j ;
152- break ;
153- }
154- }
148+ ranks [i ] = osh_group -> proc_array [i ]-> super .proc_name .vpid ;
155149 }
156150
157151 OPAL_TIMING_ENV_NEXT (comm_query , "build_ranks" );
158152
159- err = ompi_group_incl (parent_group , osh_group -> proc_count , ranks , & new_group );
153+ err = ompi_group_incl (world_group , osh_group -> proc_count , ranks , & new_group );
160154 if (OPAL_UNLIKELY (OMPI_SUCCESS != err )) {
161155 free (ranks );
162156 return NULL ;
0 commit comments