Skip to content

Commit 50823fe

Browse files
committed
coll/tuned: Fix dynamic message size for gather and scatter
The gather and scatter operations did not use the correct message size (Only did datatype size * com size). This did not correctly reflect the total message size and prevents fine tuning within a com size. This patch multiplies the value by the number of elements sent. Signed-off-by: William Zhang <wilzhang@amazon.com>
1 parent 9996b9f commit 50823fe

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)