Skip to content

Commit 2b1f053

Browse files
authored
Merge pull request #7758 from wckzhang/fixdynamic
coll/tuned: Fix dynamic message size for gather and scatter
2 parents b419ede + 50823fe commit 2b1f053

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ompi/mca/coll/tuned/coll_tuned_decision_dynamic.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
1313
* Copyright (c) 2015-2018 Research Organization for Information Science
1414
* and Technology (RIST). All rights reserved.
15+
* Copyright (c) 2020 Amazon.com, Inc. or its affiliates.
16+
* All Rights reserved.
1517
* $COPYRIGHT$
1618
*
1719
* Additional copyrights may follow
@@ -586,7 +588,7 @@ int ompi_coll_tuned_gather_intra_dec_dynamic(const void *sbuf, int scount,
586588

587589
comsize = ompi_comm_size(comm);
588590
ompi_datatype_type_size (sdtype, &dsize);
589-
dsize *= comsize;
591+
dsize *= scount * comsize;
590592

591593
alg = ompi_coll_tuned_get_target_method_params (tuned_module->com_rules[GATHER],
592594
dsize, &faninout, &segsize, &max_requests);
@@ -635,7 +637,7 @@ int ompi_coll_tuned_scatter_intra_dec_dynamic(const void *sbuf, int scount,
635637

636638
comsize = ompi_comm_size(comm);
637639
ompi_datatype_type_size (sdtype, &dsize);
638-
dsize *= comsize;
640+
dsize *= scount * comsize;
639641

640642
alg = ompi_coll_tuned_get_target_method_params (tuned_module->com_rules[SCATTER],
641643
dsize, &faninout, &segsize, &max_requests);

0 commit comments

Comments
 (0)