Skip to content

Commit

Permalink
Set the proc field to correct value
Browse files Browse the repository at this point in the history
  • Loading branch information
thilinarmtb committed Feb 12, 2019
1 parent 0168ced commit b3cfa5f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/genmap-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ struct GenmapElement_private {
GenmapLong globalId;
GenmapLong vertices[8];
GenmapInt proc;
GenmapInt procGlobal;
GenmapInt origin;
};
//
Expand Down
2 changes: 0 additions & 2 deletions src/genmap-rsb.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ GenmapInt GenmapSetFiedlerBin(GenmapHandle h) {
GenmapScalar end = min + (range * (id + 1)) / nbins;
if(start <= p->fiedler && p->fiedler < end) {
p->proc = id;
p->procGlobal = GenmapCommRank(GenmapGetGlobalComm(h));
break;
}
}
Expand Down Expand Up @@ -87,7 +86,6 @@ GenmapInt GenmapSetGlobalIdBin(GenmapHandle h) {
GenmapScalar end = min + (range * (id + 1)) / nbins;
if(start <= p->globalId && p->globalId < end) {
p->proc = id;
p->procGlobal = GenmapCommRank(GenmapGetGlobalComm(h));
break;
}
}
Expand Down
7 changes: 6 additions & 1 deletion src/parRSB.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ int parRSB_partMesh(int *part, long long *vtx, int nel, int nve, int *options,

GenmapRSB(h);

e = GenmapGetElements(h);
for(j = 0; j < GenmapGetNLocalElements(h); j++) {
e[j].proc = GenmapCommRank(GenmapGetGlobalComm(h));
}

GenmapCrystalInit(h, GenmapGetGlobalComm(h));
GenmapCrystalTransfer(h, GENMAP_ORIGIN);
GenmapCrystalFinalize(h);
Expand All @@ -68,7 +73,7 @@ int parRSB_partMesh(int *part, long long *vtx, int nel, int nve, int *options,
buffer_free(&buf);

for(i = 0; i < nel; i++) {
part[i] = e[i].procGlobal;
part[i] = e[i].proc;
}

if(id == 0 && h->dbgLevel > 0)
Expand Down

0 comments on commit b3cfa5f

Please sign in to comment.