diff --git a/ompi/mca/coll/libnbc/nbc.c b/ompi/mca/coll/libnbc/nbc.c index 5b48d6b931..039e6d4c9b 100644 --- a/ompi/mca/coll/libnbc/nbc.c +++ b/ompi/mca/coll/libnbc/nbc.c @@ -319,8 +319,6 @@ int NBC_Progress(NBC_Handle *handle) { bool flag; unsigned long size = 0; char *delim; - int i; - ompi_status_public_t status; if (handle->nbc_complete) { return NBC_OK; diff --git a/ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c b/ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c index 891a5b041b..a2b53be066 100644 --- a/ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c +++ b/ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c @@ -135,7 +135,7 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module, int *lindex_to_grank = NULL; int *nodes_roots = NULL, *k = NULL; int *localrank_to_objnum = NULL; - int depth, effective_depth = 0, obj_rank = -1; + int depth = 0, effective_depth = 0, obj_rank = -1; int num_objs_in_node = 0, num_pus_in_node = 0; int numlevels = 0, num_nodes = 0, num_procs_in_node = 0; int rank, size, newrank = -1, hwloc_err, i, j, idx; diff --git a/ompi/mca/topo/treematch/treematch/tm_topology.c b/ompi/mca/topo/treematch/treematch/tm_topology.c index 4445b45634..1ecf51657b 100644 --- a/ompi/mca/topo/treematch/treematch/tm_topology.c +++ b/ompi/mca/topo/treematch/treematch/tm_topology.c @@ -141,7 +141,14 @@ double ** topology_to_arch(hwloc_topology_t topology) double **arch = NULL; nb_proc = hwloc_get_nbobjs_by_type(topology, HWLOC_OBJ_PU); + if( nb_proc <= 0 ) { /* if multiple levels with PUs */ + return NULL; + } arch = (double**)MALLOC(sizeof(double*)*nb_proc); + if( NULL == arch ) { + return NULL; + } + for( i = 0 ; i < nb_proc ; i++ ){ obj_proc1 = hwloc_get_obj_by_type(topology,HWLOC_OBJ_PU,i); arch[obj_proc1->os_index] = (double*)MALLOC(sizeof(double)*nb_proc); diff --git a/ompi/mca/topo/treematch/treematch/tm_tree.c b/ompi/mca/topo/treematch/treematch/tm_tree.c index ffac4e7615..35fc2aa2fe 100644 --- a/ompi/mca/topo/treematch/treematch/tm_tree.c +++ b/ompi/mca/topo/treematch/treematch/tm_tree.c @@ -918,7 +918,7 @@ static void partial_exhaustive_search(int nb_args, void **args, int thread_id){ work_unit_t *work = (work_unit_t *) args[7]; pthread_mutex_t *lock = (pthread_mutex_t *) args[8]; int *tab_i; - int id, id1, id2; + int id = 0, id1, id2; int total_work = work->nb_work; int cur_work = 0; @@ -1750,7 +1750,6 @@ void group_nodes(tm_affinity_mat_t *aff_mat, tm_tree_t *tab_node, tm_tree_t *new int mat_order = aff_mat -> order; tm_tree_t **cur_group = NULL; int j, l; - unsigned long int list_size; unsigned long int i; group_list_t list, **best_selection = NULL, **tab_group = NULL; double best_val, last_best; @@ -1810,8 +1809,7 @@ void group_nodes(tm_affinity_mat_t *aff_mat, tm_tree_t *tab_node, tm_tree_t *new best_selection = (group_list_t **)MALLOC(sizeof(group_list_t*)*solution_size); list_all_possible_groups(cost_mat, tab_node, 0, arity, 0, cur_group, &list); - list_size = (int)list.val; - assert( list_size == nb_groups); + assert( nb_groups == (unsigned long int)list.val ); tab_group = (group_list_t**)MALLOC(sizeof(group_list_t*)*nb_groups); list_to_tab(list.next, tab_group, nb_groups); if(verbose_level>=INFO) diff --git a/opal/mca/btl/vader/btl_vader_component.c b/opal/mca/btl/vader/btl_vader_component.c index 1119725997..5a163f637a 100644 --- a/opal/mca/btl/vader/btl_vader_component.c +++ b/opal/mca/btl/vader/btl_vader_component.c @@ -16,8 +16,8 @@ * All rights reserved. * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. * Copyright (c) 2014-2018 Intel, Inc. All rights reserved. - * Copyright (c) 2014-2018 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2014-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved. * Copyright (c) 2018 Triad National Security, LLC. All rights * reserved. @@ -341,6 +341,11 @@ static int mca_btl_vader_component_close(void) mca_btl_vader_knem_fini (); #endif + if (mca_btl_vader_component.mpool) { + mca_btl_vader_component.mpool->mpool_finalize (mca_btl_vader_component.mpool); + mca_btl_vader_component.mpool = NULL; + } + return OPAL_SUCCESS; } @@ -370,6 +375,7 @@ static int mca_btl_base_vader_modex_send (void) return rc; } +#if OPAL_BTL_VADER_HAVE_XPMEM || OPAL_BTL_VADER_HAVE_CMA || OPAL_BTL_VADER_HAVE_KNEM static void mca_btl_vader_select_next_single_copy_mechanism (void) { for (int i = 0 ; single_copy_mechanisms[i].value != MCA_BTL_VADER_NONE ; ++i) { @@ -379,10 +385,13 @@ static void mca_btl_vader_select_next_single_copy_mechanism (void) } } } +#endif static void mca_btl_vader_check_single_copy (void) { +#if OPAL_BTL_VADER_HAVE_XPMEM || OPAL_BTL_VADER_HAVE_CMA || OPAL_BTL_VADER_HAVE_KNEM int initial_mechanism = mca_btl_vader_component.single_copy_mechanism; +#endif /* single-copy emulation is always used to support AMO's right now */ mca_btl_vader_sc_emu_init (); @@ -526,7 +535,6 @@ static mca_btl_base_module_t **mca_btl_vader_component_init (int *num_btls, mca_btl_vader_check_single_copy (); if (MCA_BTL_VADER_XPMEM != mca_btl_vader_component.single_copy_mechanism) { - const char *base_dir = opal_process_info.proc_session_dir; char *sm_file; rc = asprintf(&sm_file, "%s" OPAL_PATH_SEP "vader_segment.%s.%x.%d", mca_btl_vader_component.backing_directory, diff --git a/opal/mca/btl/vader/btl_vader_module.c b/opal/mca/btl/vader/btl_vader_module.c index 36ec1f0061..a1cd167e22 100644 --- a/opal/mca/btl/vader/btl_vader_module.c +++ b/opal/mca/btl/vader/btl_vader_module.c @@ -15,8 +15,8 @@ * Copyright (c) 2010-2015 Los Alamos National Security, LLC. All rights * reserved. * Copyright (c) 2014-2015 Intel, Inc. All rights reserved. - * Copyright (c) 2014-2015 Research Organization for Information Science - * and Technology (RIST). All rights reserved. + * Copyright (c) 2014-2019 Research Organization for Information Science + * and Technology (RIST). All rights reserved. * Copyright (c) 2018-2019 Triad National Security, LLC. All rights * reserved. * $COPYRIGHT$ @@ -380,11 +380,6 @@ static int vader_finalize(struct mca_btl_base_module_t *btl) } #endif - if (component->mpool) { - component->mpool->mpool_finalize (component->mpool); - component->mpool = NULL; - } - return OPAL_SUCCESS; }