Skip to content
Snippets Groups Projects
Commit bab203b4 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Weight file is open when there are no weights

parent 1873fa94
No related branches found
No related tags found
1 merge request!61 METIS fixes
...@@ -200,7 +200,9 @@ void dumpMETISGraph(const char *prefix, idx_t nvertices, idx_t nvertexweights, ...@@ -200,7 +200,9 @@ void dumpMETISGraph(const char *prefix, idx_t nvertices, idx_t nvertexweights,
for (i = 0; i < nvertices; i++) { for (i = 0; i < nvertices; i++) {
fprintf(stdfile, "\n"); fprintf(stdfile, "\n");
fprintf(simplefile, "\n"); fprintf(simplefile, "\n");
fprintf(weightfile, "\n"); if (weightfile != NULL) {
fprintf(weightfile, "\n");
}
if (havevertexsize) { if (havevertexsize) {
fprintf(stdfile, " %" PRIDX, vertexsizes[i]); fprintf(stdfile, " %" PRIDX, vertexsizes[i]);
...@@ -225,7 +227,9 @@ void dumpMETISGraph(const char *prefix, idx_t nvertices, idx_t nvertexweights, ...@@ -225,7 +227,9 @@ void dumpMETISGraph(const char *prefix, idx_t nvertices, idx_t nvertexweights,
} }
fprintf(stdfile, "\n"); fprintf(stdfile, "\n");
fprintf(simplefile, "\n"); fprintf(simplefile, "\n");
fprintf(weightfile, "\n"); if (weightfile != NULL) {
fprintf(weightfile, "\n");
}
fclose(stdfile); fclose(stdfile);
fclose(simplefile); fclose(simplefile);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment