Skip to content

Commit 3845584

Browse files
committed
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 <[email protected]>
1 parent 808f865 commit 3845584

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ompi/mca/topo/treematch/topo_treematch_dist_graph_create.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,8 +665,6 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module,
665665
comm_tree = tm_build_tree_from_topology(tm_topology,aff_mat, NULL, NULL);
666666
sol = tm_compute_mapping(tm_topology, comm_tree);
667667

668-
assert((int)sol->k_length == size);
669-
670668
k = (int *)calloc(sol->k_length, sizeof(int));
671669
for(idx = 0 ; idx < (int)sol->k_length ; idx++)
672670
k[idx] = sol->k[idx][0];
@@ -853,7 +851,7 @@ int mca_topo_treematch_dist_graph_create(mca_topo_base_module_t* topo_module,
853851
comm_tree = tm_build_tree_from_topology(tm_topology,aff_mat, NULL, NULL);
854852
sol = tm_compute_mapping(tm_topology, comm_tree);
855853

856-
assert((int)sol->k_length == num_procs_in_node);
854+
assert((int)sol->k_length == num_objs_in_node);
857855

858856
k = (int *)calloc(sol->k_length, sizeof(int));
859857
for(idx = 0 ; idx < (int)sol->k_length ; idx++)

0 commit comments

Comments
 (0)