From 50823fe9a9ef4f93e55ee2087b311303d49f90a8 Mon Sep 17 00:00:00 2001 From: William Zhang Date: Thu, 14 May 2020 12:17:52 -0700 Subject: [PATCH] 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 --- ompi/mca/coll/tuned/coll_tuned_decision_dynamic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ompi/mca/coll/tuned/coll_tuned_decision_dynamic.c b/ompi/mca/coll/tuned/coll_tuned_decision_dynamic.c index f52686caa0..9fb5b82e6b 100644 --- a/ompi/mca/coll/tuned/coll_tuned_decision_dynamic.c +++ b/ompi/mca/coll/tuned/coll_tuned_decision_dynamic.c @@ -12,6 +12,8 @@ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. * Copyright (c) 2015-2018 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2020 Amazon.com, Inc. or its affiliates. + * All Rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -586,7 +588,7 @@ int ompi_coll_tuned_gather_intra_dec_dynamic(const void *sbuf, int scount, comsize = ompi_comm_size(comm); ompi_datatype_type_size (sdtype, &dsize); - dsize *= comsize; + dsize *= scount * comsize; alg = ompi_coll_tuned_get_target_method_params (tuned_module->com_rules[GATHER], dsize, &faninout, &segsize, &max_requests); @@ -635,7 +637,7 @@ int ompi_coll_tuned_scatter_intra_dec_dynamic(const void *sbuf, int scount, comsize = ompi_comm_size(comm); ompi_datatype_type_size (sdtype, &dsize); - dsize *= comsize; + dsize *= scount * comsize; alg = ompi_coll_tuned_get_target_method_params (tuned_module->com_rules[SCATTER], dsize, &faninout, &segsize, &max_requests);