From 01584a2f230b8e9a5367580cb5f457692df347dd Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Fri, 2 Feb 2018 18:48:23 -0500 Subject: fixed graph free --- lib/graph.h | 2 ++ src/wolff.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/graph.h b/lib/graph.h index eda7630..9c80dd6 100644 --- a/lib/graph.h +++ b/lib/graph.h @@ -16,3 +16,5 @@ graph_t *graph_create_square(D_t D, L_t L); graph_t *graph_add_ext(const graph_t *G); +void graph_free(graph_t *h); + diff --git a/src/wolff.c b/src/wolff.c index 2a10b7a..d577b00 100644 --- a/src/wolff.c +++ b/src/wolff.c @@ -139,7 +139,7 @@ int main(int argc, char *argv[]) { if (pretend_ising) { fprintf(outfile, - "%u %.15f %" PRIu64 " %.15f %.15f %.15f %.15f %.15f %.15f %.15f %.15f\n", + "%" PRIL " %.15f %" PRIcount " %.15f %.15f %.15f %.15f %.15f %.15f %.15f %.15f\n", L, 2 * T, n_runs, (2 * E->x - h->ne) / h->nv, 2 * E->dx / h->nv, (M[0]->x - M[1]->x) / h->nv, M[0]->dx / h->nv, 4 * E->c / h->nv, 4 * E->dc / h->nv, 4 * M[0]->c / h->nv, 4 * M[0]->dc / h->nv); } else { @@ -178,10 +178,10 @@ int main(int argc, char *argv[]) { free(s->H_probs); free(s->M); free(s->spins); - free(s->g); + graph_free(s->g); free(s); free(H); - free(h); + graph_free(h); return 0; } -- cgit v1.2.3-70-g09d2