@@ -156,12 +156,19 @@ int mca_coll_hcoll_gather(const void *sbuf, int scount,
156
156
struct ompi_datatype_t * rdtype ,
157
157
int root ,
158
158
struct ompi_communicator_t * comm ,
159
- mca_coll_base_module_t * module ){
159
+ mca_coll_base_module_t * module )
160
+ {
161
+ mca_coll_hcoll_module_t * hcoll_module = (mca_coll_hcoll_module_t * )module ;
160
162
dte_data_representation_t stype ;
161
163
dte_data_representation_t rtype ;
162
164
int rc ;
165
+
163
166
HCOL_VERBOSE (20 ,"RUNNING HCOL GATHER" );
164
- mca_coll_hcoll_module_t * hcoll_module = (mca_coll_hcoll_module_t * )module ;
167
+
168
+ if (root != comm -> c_my_rank ) {
169
+ rdtype = sdtype ;
170
+ }
171
+
165
172
stype = ompi_dtype_2_hcoll_dtype (sdtype , NO_DERIVED );
166
173
rtype = ompi_dtype_2_hcoll_dtype (rdtype , NO_DERIVED );
167
174
if (OPAL_UNLIKELY (HCOL_DTE_IS_ZERO (stype ) || HCOL_DTE_IS_ZERO (rtype ))) {
@@ -368,13 +375,19 @@ int mca_coll_hcoll_gatherv(const void* sbuf, int scount,
368
375
struct ompi_communicator_t * comm ,
369
376
mca_coll_base_module_t * module )
370
377
{
378
+ mca_coll_hcoll_module_t * hcoll_module = (mca_coll_hcoll_module_t * )module ;
371
379
dte_data_representation_t stype ;
372
380
dte_data_representation_t rtype ;
373
381
int rc ;
374
382
HCOL_VERBOSE (20 ,"RUNNING HCOL GATHERV" );
375
- mca_coll_hcoll_module_t * hcoll_module = (mca_coll_hcoll_module_t * )module ;
383
+
384
+ if (root != comm -> c_my_rank ) {
385
+ rdtype = sdtype ;
386
+ }
387
+
376
388
stype = ompi_dtype_2_hcoll_dtype (sdtype , NO_DERIVED );
377
389
rtype = ompi_dtype_2_hcoll_dtype (rdtype , NO_DERIVED );
390
+
378
391
if (OPAL_UNLIKELY (HCOL_DTE_IS_ZERO (stype ) || HCOL_DTE_IS_ZERO (rtype ))) {
379
392
/*If we are here then datatype is not simple predefined datatype */
380
393
/*In future we need to add more complex mapping to the dte_data_representation_t */
@@ -387,7 +400,9 @@ int mca_coll_hcoll_gatherv(const void* sbuf, int scount,
387
400
comm , hcoll_module -> previous_gatherv_module );
388
401
return rc ;
389
402
}
390
- rc = hcoll_collectives .coll_gatherv ((void * )sbuf , scount , stype , rbuf , (int * )rcounts , (int * )displs , rtype , root , hcoll_module -> hcoll_context );
403
+ rc = hcoll_collectives .coll_gatherv ((void * )sbuf , scount , stype , rbuf ,
404
+ (int * )rcounts , (int * )displs , rtype ,
405
+ root , hcoll_module -> hcoll_context );
391
406
if (HCOLL_SUCCESS != rc ){
392
407
HCOL_VERBOSE (20 ,"RUNNING FALLBACK GATHERV" );
393
408
rc = hcoll_module -> previous_gatherv (sbuf ,scount ,sdtype ,
@@ -406,13 +421,20 @@ int mca_coll_hcoll_scatterv(const void* sbuf, const int *scounts, const int *dis
406
421
struct ompi_communicator_t * comm ,
407
422
mca_coll_base_module_t * module )
408
423
{
424
+ mca_coll_hcoll_module_t * hcoll_module = (mca_coll_hcoll_module_t * )module ;
409
425
dte_data_representation_t stype ;
410
426
dte_data_representation_t rtype ;
411
427
int rc ;
428
+
412
429
HCOL_VERBOSE (20 ,"RUNNING HCOL SCATTERV" );
413
- mca_coll_hcoll_module_t * hcoll_module = (mca_coll_hcoll_module_t * )module ;
430
+
431
+ if (root != comm -> c_my_rank ) {
432
+ sdtype = rdtype ;
433
+ }
434
+
414
435
stype = ompi_dtype_2_hcoll_dtype (sdtype , NO_DERIVED );
415
436
rtype = ompi_dtype_2_hcoll_dtype (rdtype , NO_DERIVED );
437
+
416
438
if (rbuf == MPI_IN_PLACE ) {
417
439
assert (root == comm -> c_my_rank );
418
440
rtype = stype ;
@@ -693,13 +715,20 @@ int mca_coll_hcoll_igatherv(const void* sbuf, int scount,
693
715
ompi_request_t * * request ,
694
716
mca_coll_base_module_t * module )
695
717
{
718
+ mca_coll_hcoll_module_t * hcoll_module = (mca_coll_hcoll_module_t * )module ;
696
719
dte_data_representation_t stype ;
697
720
dte_data_representation_t rtype ;
698
721
int rc ;
699
722
void * * rt_handle ;
723
+
700
724
HCOL_VERBOSE (20 ,"RUNNING HCOL IGATHERV" );
701
- mca_coll_hcoll_module_t * hcoll_module = ( mca_coll_hcoll_module_t * ) module ;
725
+
702
726
rt_handle = (void * * ) request ;
727
+
728
+ if (root != comm -> c_my_rank ) {
729
+ rdtype = sdtype ;
730
+ }
731
+
703
732
stype = ompi_dtype_2_hcoll_dtype (sdtype , NO_DERIVED );
704
733
rtype = ompi_dtype_2_hcoll_dtype (rdtype , NO_DERIVED );
705
734
if (OPAL_UNLIKELY (HCOL_DTE_IS_ZERO (stype ) || HCOL_DTE_IS_ZERO (rtype ))) {
0 commit comments