From ee405ccaa51683c4a6429d8dc02e53445d47a410 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 30 Oct 2020 10:41:14 -0400 Subject: [PATCH] coll/adapt and coll/han: fix trivial compiler warnings Signed-off-by: Jeff Squyres --- ompi/mca/coll/adapt/coll_adapt_ireduce.c | 4 ++-- ompi/mca/coll/adapt/coll_adapt_topocache.h | 3 ++- ompi/mca/coll/han/coll_han_allreduce.c | 5 ++++- ompi/mca/coll/han/coll_han_bcast.c | 6 +++++- ompi/mca/coll/han/coll_han_gather.c | 3 +++ 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ompi/mca/coll/adapt/coll_adapt_ireduce.c b/ompi/mca/coll/adapt/coll_adapt_ireduce.c index e5c3f952cd..32705e6e4b 100644 --- a/ompi/mca/coll/adapt/coll_adapt_ireduce.c +++ b/ompi/mca/coll/adapt/coll_adapt_ireduce.c @@ -2,6 +2,7 @@ * Copyright (c) 2014-2020 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. + * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -524,7 +525,6 @@ int ompi_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, int count, char **accumbuf = NULL; opal_mutex_t *mutex_op_list; /* A list to store the segments need to be sent */ - opal_list_t *recv_list; mca_pml_base_send_mode_t sendmode = (mca_coll_adapt_component.adapt_ireduce_synchronous_send) ? MCA_PML_BASE_SEND_SYNCHRONOUS : MCA_PML_BASE_SEND_STANDARD; @@ -604,7 +604,7 @@ int ompi_coll_adapt_ireduce_generic(const void *sbuf, void *rbuf, int count, /* If the current process is not leaf */ if (tree->tree_nextsize > 0) { size_t num_allocate_elems = mca_coll_adapt_component.adapt_inbuf_free_list_min; - if (tree->tree_nextsize * num_segs < num_allocate_elems) { + if (((size_t) tree->tree_nextsize * num_segs) < num_allocate_elems) { num_allocate_elems = tree->tree_nextsize * num_segs; } opal_free_list_init(&con->inbuf_list, diff --git a/ompi/mca/coll/adapt/coll_adapt_topocache.h b/ompi/mca/coll/adapt/coll_adapt_topocache.h index 6910089ee0..3fae7562d1 100644 --- a/ompi/mca/coll/adapt/coll_adapt_topocache.h +++ b/ompi/mca/coll/adapt/coll_adapt_topocache.h @@ -2,6 +2,7 @@ * Copyright (c) 2014-2020 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. + * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -20,7 +21,7 @@ typedef struct adapt_topology_cache_item_t { opal_list_item_t super; ompi_coll_tree_t *tree; int root; - int algorithm; + ompi_coll_adapt_algorithm_t algorithm; } adapt_topology_cache_item_t; OBJ_CLASS_DECLARATION(adapt_topology_cache_item_t); diff --git a/ompi/mca/coll/han/coll_han_allreduce.c b/ompi/mca/coll/han/coll_han_allreduce.c index afa0e0a220..3082ac6e05 100644 --- a/ompi/mca/coll/han/coll_han_allreduce.c +++ b/ompi/mca/coll/han/coll_han_allreduce.c @@ -4,6 +4,7 @@ * reserved. * Copyright (c) 2020 Bull S.A.S. All rights reserved. * + * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -410,8 +411,10 @@ mca_coll_han_allreduce_intra_simple(const void *sbuf, int root_low_rank = 0; int low_rank; int ret; - mca_coll_han_component_t *cs = &mca_coll_han_component; mca_coll_han_module_t *han_module = (mca_coll_han_module_t *)module; +#if OPAL_ENABLE_DEBUG + mca_coll_han_component_t *cs = &mca_coll_han_component; +#endif OPAL_OUTPUT_VERBOSE((10, cs->han_output, "[OMPI][han] in mca_coll_han_reduce_intra_simple\n")); diff --git a/ompi/mca/coll/han/coll_han_bcast.c b/ompi/mca/coll/han/coll_han_bcast.c index c32ea745b0..1e79834d1b 100644 --- a/ompi/mca/coll/han/coll_han_bcast.c +++ b/ompi/mca/coll/han/coll_han_bcast.c @@ -3,6 +3,7 @@ * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2020 Bull S.A.S. All rights reserved. + * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -221,7 +222,10 @@ mca_coll_han_bcast_intra_simple(void *buff, /* create the subcommunicators */ mca_coll_han_module_t *han_module = (mca_coll_han_module_t *)module; ompi_communicator_t *low_comm, *up_comm; - int err, w_rank = ompi_comm_rank(comm); + int err; +#if OPAL_ENABLE_DEBUG + int w_rank = ompi_comm_rank(comm); +#endif /* Create the subcommunicators */ err = mca_coll_han_comm_create_new(comm, han_module); diff --git a/ompi/mca/coll/han/coll_han_gather.c b/ompi/mca/coll/han/coll_han_gather.c index 14b87bde92..e5c10878a6 100644 --- a/ompi/mca/coll/han/coll_han_gather.c +++ b/ompi/mca/coll/han/coll_han_gather.c @@ -3,6 +3,7 @@ * of Tennessee Research Foundation. All rights * reserved. * Copyright (c) 2020 Bull S.A.S. All rights reserved. + * Copyright (c) 2020 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -490,7 +491,9 @@ ompi_coll_han_reorder_gather(const void *sbuf, int * topo) { int i, topolevel = 2; // always 2 levels in topo +#if OPAL_ENABLE_DEBUG int w_rank = ompi_comm_rank(comm); +#endif int w_size = ompi_comm_size(comm); ptrdiff_t rextent; ompi_datatype_type_extent(dtype, &rextent);