Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coll/adapt and coll/han: fix trivial compiler warnings #8159

Merged
merged 1 commit into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ompi/mca/coll/adapt/coll_adapt_ireduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion ompi/mca/coll/adapt/coll_adapt_topocache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion ompi/mca/coll/han/coll_han_allreduce.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"));
Expand Down
6 changes: 5 additions & 1 deletion ompi/mca/coll/han/coll_han_bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions ompi/mca/coll/han/coll_han_gather.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down