@@ -101,8 +101,8 @@ mca_coll_inter_scatterv_inter(const void *sbuf, ompi_count_array_t *scounts,
101
101
}
102
102
}
103
103
/* perform the scatterv locally */
104
- OMPI_COUNT_ARRAY_INIT (& counts_arg , counts );
105
- OMPI_DISP_ARRAY_INIT (& displace_arg , displace );
104
+ OMPI_COUNT_ARRAY_INIT (& counts_arg , counts );
105
+ OMPI_DISP_ARRAY_INIT (& displace_arg , displace );
106
106
err = comm -> c_local_comm -> c_coll -> coll_scatterv (ptmp , & counts_arg , & displace_arg ,
107
107
rdtype , rbuf , rcount ,
108
108
rdtype , 0 , comm -> c_local_comm ,
@@ -122,37 +122,37 @@ mca_coll_inter_scatterv_inter(const void *sbuf, ompi_count_array_t *scounts,
122
122
}
123
123
124
124
} else {
125
- /* We must ensure that rank 0 receives a size_t array */
126
- size_t * tmp_scounts_root = malloc (sizeof (size_t ) * size );
127
- if (NULL == tmp_scounts_root ) {
128
- return OMPI_ERR_OUT_OF_RESOURCE ;
129
- }
130
- for (i = 0 ; i < size ; ++ i ) {
131
- tmp_scounts_root [i ] = ompi_count_array_get (scounts , i );
132
- }
125
+ /* We must ensure that rank 0 receives a size_t array */
126
+ size_t * tmp_scounts_root = malloc (sizeof (size_t ) * size );
127
+ if (NULL == tmp_scounts_root ) {
128
+ return OMPI_ERR_OUT_OF_RESOURCE ;
129
+ }
130
+ for (i = 0 ; i < size ; ++ i ) {
131
+ tmp_scounts_root [i ] = ompi_count_array_get (scounts , i );
132
+ }
133
133
err = MCA_PML_CALL (send (tmp_scounts_root , sizeof (size_t ) * size , MPI_BYTE , 0 ,
134
134
MCA_COLL_BASE_TAG_SCATTERV ,
135
135
MCA_PML_BASE_SEND_STANDARD , comm ));
136
- free (tmp_scounts_root );
136
+ free (tmp_scounts_root );
137
137
138
138
if (OMPI_SUCCESS != err ) {
139
139
return err ;
140
140
}
141
141
142
- /* TODO:BIGCOUNT: Remove these temporaries once ompi_datatype is updated for bigcount */
143
- int * tmp_scounts = malloc (sizeof (int ) * size );
144
- int * tmp_disps = malloc (sizeof (int ) * size );
145
- if (NULL == tmp_scounts || NULL == tmp_disps ) {
146
- return OMPI_ERR_OUT_OF_RESOURCE ;
147
- }
148
- for (i = 0 ; i < size ; ++ i ) {
149
- tmp_scounts [i ] = (int ) ompi_count_array_get (scounts , i );
150
- tmp_disps [i ] = (int ) ompi_disp_array_get (disps , i );
151
- }
142
+ /* TODO:BIGCOUNT: Remove these temporaries once ompi_datatype is updated for bigcount */
143
+ int * tmp_scounts = malloc (sizeof (int ) * size );
144
+ int * tmp_disps = malloc (sizeof (int ) * size );
145
+ if (NULL == tmp_scounts || NULL == tmp_disps ) {
146
+ return OMPI_ERR_OUT_OF_RESOURCE ;
147
+ }
148
+ for (i = 0 ; i < size ; ++ i ) {
149
+ tmp_scounts [i ] = (int ) ompi_count_array_get (scounts , i );
150
+ tmp_disps [i ] = (int ) ompi_disp_array_get (disps , i );
151
+ }
152
152
ompi_datatype_create_indexed (size ,tmp_scounts ,tmp_disps ,sdtype ,& ndtype );
153
153
ompi_datatype_commit (& ndtype );
154
- free (tmp_scounts );
155
- free (tmp_disps );
154
+ free (tmp_scounts );
155
+ free (tmp_disps );
156
156
157
157
err = MCA_PML_CALL (send (sbuf , 1 , ndtype , 0 ,
158
158
MCA_COLL_BASE_TAG_SCATTERV ,
0 commit comments