From 38455845dbb8a1ba6cbcb101411e8b4a1133c88f Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Wed, 20 Dec 2017 11:51:35 -0500 Subject: [PATCH] Fix asserts. In both cases we were comparing with the wrong size, it should be either the number of local processes or the number of nodes, and not the size of the communicator. Signed-off-by: George Bosilca --- ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 ac0ba769c2..47e9ec4571 100644 --- a/ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c +++ b/ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c @@ -665,8 +665,6 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module, comm_tree = tm_build_tree_from_topology(tm_topology,aff_mat, NULL, NULL); sol = tm_compute_mapping(tm_topology, comm_tree); - assert((int)sol->k_length == size); - k = (int *)calloc(sol->k_length, sizeof(int)); for(idx = 0 ; idx < (int)sol->k_length ; idx++) k[idx] = sol->k[idx][0]; @@ -853,7 +851,7 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module, comm_tree = tm_build_tree_from_topology(tm_topology,aff_mat, NULL, NULL); sol = tm_compute_mapping(tm_topology, comm_tree); - assert((int)sol->k_length == num_procs_in_node); + assert((int)sol->k_length == num_objs_in_node); k = (int *)calloc(sol->k_length, sizeof(int)); for(idx = 0 ; idx < (int)sol->k_length ; idx++)