Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions ompi/mca/topo/treematch/treematch/tm_kpartitioning.c
Original file line number Diff line number Diff line change
Expand Up @@ -480,19 +480,17 @@ tree_t *kpartition_build_tree_from_topology(tm_topology_t *topology,double **com
/* we assume all objects have the same arity*/
/* assign the root of the tree*/
root = (tree_t*) MALLOC (sizeof(tree_t));


root->id = 0;

/*build the tree downward from the root*/
kpartition_build_level_topology(root, &com_mat, N+K, depth, topology, local_vertices,
constraints, nb_constraints, obj_weight, com_speed);
constraints, nb_constraints, obj_weight, com_speed);

/*print_1D_tab(local_vertices,K+N);*/
if(verbose_level>=INFO)
printf("Build (bottom-up) tree done!\n");



FREE(local_vertices);


Expand Down
2 changes: 1 addition & 1 deletion ompi/mca/topo/treematch/treematch/tm_mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ int build_binding_constraints(char *filename, int **ptab)
n++;
}

tab = (int*)MALLOC(n*sizeof(int));
tab = (int*)MALLOC((n+1)*sizeof(int));

rewind(pf);
fgets(line, LINE_SIZE, pf);
Expand Down
9 changes: 4 additions & 5 deletions ompi/mca/topo/treematch/treematch/tm_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ void FREE_tab_child(tree_t *tree)

void FREE_non_constraint_tree(tree_t *tree)
{

FREE_list_child(tree);
int free_tree = tree->dumb;
FREE_tab_child(tree);
FREE(tree);
FREE_list_child(tree);
if(free_tree)
FREE(tree);
}

void FREE_constraint_tree(tree_t *tree)
Expand Down Expand Up @@ -1458,8 +1459,6 @@ tree_t *build_level_topology(tree_t *tab_node, affinity_mat_t *aff_mat,int arity
FREE(new_aff_mat);
FREE(new_obj_weight);

FREE(new_obj_weight);

return res;
}

Expand Down