Skip to content

Commit

Permalink
Fix asserts.
Browse files Browse the repository at this point in the history
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 <bosilca@icl.utk.edu>
  • Loading branch information
bosilca committed Dec 20, 2017
1 parent 808f865 commit 3845584
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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++)
Expand Down

0 comments on commit 3845584

Please sign in to comment.