Skip to content

Commit 12d771c

Browse files
authored
Merge pull request #53 from devreal/fix-han-dynamic-inplace
COLL HAN: Fix handling of MPI_IN_PLACE in dynamic rule section
2 parents 20a8f4f + cea7be6 commit 12d771c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ompi/mca/coll/han/coll_han_dynamic.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,8 +757,13 @@ mca_coll_han_gather_intra_dynamic(const void *sbuf, int scount,
757757
int rank, verbosity = 0;
758758

759759
/* Compute configuration information for dynamic rules */
760-
ompi_datatype_type_size(sdtype, &dtype_size);
761-
dtype_size = dtype_size * scount;
760+
if( MPI_IN_PLACE != sbuf ) {
761+
ompi_datatype_type_size(sdtype, &dtype_size);
762+
dtype_size = dtype_size * scount;
763+
} else {
764+
ompi_datatype_type_size(rdtype, &dtype_size);
765+
dtype_size = dtype_size * rcount;
766+
}
762767

763768
sub_module = get_module(GATHER,
764769
dtype_size,

0 commit comments

Comments
 (0)