From 2c9a3b1376778e7273e6c992ce00da6fd9164576 Mon Sep 17 00:00:00 2001 From: Thilina Rathnayake Date: Tue, 12 Feb 2019 12:28:37 -0600 Subject: [PATCH] Kind of a fix? --- src/genmap-comm.c | 4 +++- src/parRSB.c | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/genmap-comm.c b/src/genmap-comm.c index 91f7a35e6..5e2bca3d5 100644 --- a/src/genmap-comm.c +++ b/src/genmap-comm.c @@ -83,7 +83,9 @@ void GenmapSplitComm(GenmapHandle h, GenmapComm *c, int bin) { } int GenmapCrystalInit(GenmapHandle h, GenmapComm c) { - crystal_init(&(h->cr), &(c->gsComm)); + if(&(h->cr)) + crystal_free(&(h->cr)); + crystal_init(&(h->cr), &(h->global->gsComm)); return 0; } diff --git a/src/parRSB.c b/src/parRSB.c index 8aaa7fbd1..a7789c951 100644 --- a/src/parRSB.c +++ b/src/parRSB.c @@ -56,9 +56,11 @@ int parRSB_partMesh(int *part, long long *vtx, int nel, int nve, int *options, GenmapRSB(h); -/* + crystal_init(&(h->cr), &(h->global->gsComm)); +// GenmapCrystalInit(h, GenmapGetGlobalComm(h)); GenmapCrystalTransfer(h, GENMAP_ORIGIN); - GenmapCrystalFinalize(h); +//GenmapCrystalFinalize(h); + crystal_free(&(h->cr)); // This should hold true assert(GenmapGetNLocalElements(h) == nel); @@ -66,7 +68,6 @@ int parRSB_partMesh(int *part, long long *vtx, int nel, int nve, int *options, for(i = 0; i < nel; i++) { part[i] = e[i].proc; } -*/ if(id == 0 && h->dbgLevel > 0) printf("\nfinished in %lfs\n", comm_time()-time0);