@@ -110,7 +110,7 @@ mca_scoll_mpi_comm_query(oshmem_group_t *osh_group, int *priority)
110
110
mca_scoll_mpi_module_t * mpi_module ;
111
111
int err , i ;
112
112
int tag ;
113
- ompi_group_t * parent_group , * new_group ;
113
+ ompi_group_t * world_group , * new_group ;
114
114
ompi_communicator_t * newcomm = NULL ;
115
115
* priority = 0 ;
116
116
mca_scoll_mpi_component_t * cm ;
@@ -129,7 +129,7 @@ mca_scoll_mpi_comm_query(oshmem_group_t *osh_group, int *priority)
129
129
osh_group -> ompi_comm = & (ompi_mpi_comm_world .comm );
130
130
OPAL_TIMING_ENV_NEXT (comm_query , "ompi_mpi_comm_world" );
131
131
} 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 );
133
133
if (OPAL_UNLIKELY (OMPI_SUCCESS != err )) {
134
134
return NULL ;
135
135
}
@@ -143,20 +143,14 @@ mca_scoll_mpi_comm_query(oshmem_group_t *osh_group, int *priority)
143
143
144
144
OPAL_TIMING_ENV_NEXT (comm_query , "malloc" );
145
145
146
+ /* Fill the map "group_rank-to-world_rank" in order to create a new proc group */
146
147
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 ;
155
149
}
156
150
157
151
OPAL_TIMING_ENV_NEXT (comm_query , "build_ranks" );
158
152
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 );
160
154
if (OPAL_UNLIKELY (OMPI_SUCCESS != err )) {
161
155
free (ranks );
162
156
return NULL ;
0 commit comments