Merge pull request #6651 from ggouaillardet/topic/v4.0.x/btl_vader
btl/vader: fix finalize sequence
Этот коммит содержится в:
Коммит
8c9a3d1d1f
@ -319,8 +319,6 @@ int NBC_Progress(NBC_Handle *handle) {
|
|||||||
bool flag;
|
bool flag;
|
||||||
unsigned long size = 0;
|
unsigned long size = 0;
|
||||||
char *delim;
|
char *delim;
|
||||||
int i;
|
|
||||||
ompi_status_public_t status;
|
|
||||||
|
|
||||||
if (handle->nbc_complete) {
|
if (handle->nbc_complete) {
|
||||||
return NBC_OK;
|
return NBC_OK;
|
||||||
|
@ -135,7 +135,7 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module,
|
|||||||
int *lindex_to_grank = NULL;
|
int *lindex_to_grank = NULL;
|
||||||
int *nodes_roots = NULL, *k = NULL;
|
int *nodes_roots = NULL, *k = NULL;
|
||||||
int *localrank_to_objnum = 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 num_objs_in_node = 0, num_pus_in_node = 0;
|
||||||
int numlevels = 0, num_nodes = 0, num_procs_in_node = 0;
|
int numlevels = 0, num_nodes = 0, num_procs_in_node = 0;
|
||||||
int rank, size, newrank = -1, hwloc_err, i, j, idx;
|
int rank, size, newrank = -1, hwloc_err, i, j, idx;
|
||||||
|
@ -141,7 +141,14 @@ double ** topology_to_arch(hwloc_topology_t topology)
|
|||||||
double **arch = NULL;
|
double **arch = NULL;
|
||||||
|
|
||||||
nb_proc = hwloc_get_nbobjs_by_type(topology, HWLOC_OBJ_PU);
|
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);
|
arch = (double**)MALLOC(sizeof(double*)*nb_proc);
|
||||||
|
if( NULL == arch ) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
for( i = 0 ; i < nb_proc ; i++ ){
|
for( i = 0 ; i < nb_proc ; i++ ){
|
||||||
obj_proc1 = hwloc_get_obj_by_type(topology,HWLOC_OBJ_PU,i);
|
obj_proc1 = hwloc_get_obj_by_type(topology,HWLOC_OBJ_PU,i);
|
||||||
arch[obj_proc1->os_index] = (double*)MALLOC(sizeof(double)*nb_proc);
|
arch[obj_proc1->os_index] = (double*)MALLOC(sizeof(double)*nb_proc);
|
||||||
|
@ -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];
|
work_unit_t *work = (work_unit_t *) args[7];
|
||||||
pthread_mutex_t *lock = (pthread_mutex_t *) args[8];
|
pthread_mutex_t *lock = (pthread_mutex_t *) args[8];
|
||||||
int *tab_i;
|
int *tab_i;
|
||||||
int id, id1, id2;
|
int id = 0, id1, id2;
|
||||||
int total_work = work->nb_work;
|
int total_work = work->nb_work;
|
||||||
int cur_work = 0;
|
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;
|
int mat_order = aff_mat -> order;
|
||||||
tm_tree_t **cur_group = NULL;
|
tm_tree_t **cur_group = NULL;
|
||||||
int j, l;
|
int j, l;
|
||||||
unsigned long int list_size;
|
|
||||||
unsigned long int i;
|
unsigned long int i;
|
||||||
group_list_t list, **best_selection = NULL, **tab_group = NULL;
|
group_list_t list, **best_selection = NULL, **tab_group = NULL;
|
||||||
double best_val, last_best;
|
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);
|
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_all_possible_groups(cost_mat, tab_node, 0, arity, 0, cur_group, &list);
|
||||||
list_size = (int)list.val;
|
assert( nb_groups == (unsigned long int)list.val );
|
||||||
assert( list_size == nb_groups);
|
|
||||||
tab_group = (group_list_t**)MALLOC(sizeof(group_list_t*)*nb_groups);
|
tab_group = (group_list_t**)MALLOC(sizeof(group_list_t*)*nb_groups);
|
||||||
list_to_tab(list.next, tab_group, nb_groups);
|
list_to_tab(list.next, tab_group, nb_groups);
|
||||||
if(verbose_level>=INFO)
|
if(verbose_level>=INFO)
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
|
* Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
|
||||||
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
|
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
|
||||||
* Copyright (c) 2014-2018 Research Organization for Information Science
|
* Copyright (c) 2014-2019 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
|
* Copyright (c) 2018 Amazon.com, Inc. or its affiliates. All Rights reserved.
|
||||||
* Copyright (c) 2018 Triad National Security, LLC. All rights
|
* Copyright (c) 2018 Triad National Security, LLC. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
@ -341,6 +341,11 @@ static int mca_btl_vader_component_close(void)
|
|||||||
mca_btl_vader_knem_fini ();
|
mca_btl_vader_knem_fini ();
|
||||||
#endif
|
#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;
|
return OPAL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -370,6 +375,7 @@ static int mca_btl_base_vader_modex_send (void)
|
|||||||
return rc;
|
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)
|
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) {
|
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)
|
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;
|
int initial_mechanism = mca_btl_vader_component.single_copy_mechanism;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* single-copy emulation is always used to support AMO's right now */
|
/* single-copy emulation is always used to support AMO's right now */
|
||||||
mca_btl_vader_sc_emu_init ();
|
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 ();
|
mca_btl_vader_check_single_copy ();
|
||||||
|
|
||||||
if (MCA_BTL_VADER_XPMEM != mca_btl_vader_component.single_copy_mechanism) {
|
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;
|
char *sm_file;
|
||||||
|
|
||||||
rc = asprintf(&sm_file, "%s" OPAL_PATH_SEP "vader_segment.%s.%x.%d", mca_btl_vader_component.backing_directory,
|
rc = asprintf(&sm_file, "%s" OPAL_PATH_SEP "vader_segment.%s.%x.%d", mca_btl_vader_component.backing_directory,
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
* Copyright (c) 2010-2015 Los Alamos National Security, LLC. All rights
|
* Copyright (c) 2010-2015 Los Alamos National Security, LLC. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
* Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
* Copyright (c) 2014-2019 Research Organization for Information Science
|
||||||
* and Technology (RIST). All rights reserved.
|
* and Technology (RIST). All rights reserved.
|
||||||
* Copyright (c) 2018-2019 Triad National Security, LLC. All rights
|
* Copyright (c) 2018-2019 Triad National Security, LLC. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
@ -380,11 +380,6 @@ static int vader_finalize(struct mca_btl_base_module_t *btl)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (component->mpool) {
|
|
||||||
component->mpool->mpool_finalize (component->mpool);
|
|
||||||
component->mpool = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return OPAL_SUCCESS;
|
return OPAL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user