Skip to content

Commit

Permalink
added more description to balancing+fix
Browse files Browse the repository at this point in the history
  • Loading branch information
egaburov committed May 1, 2013
1 parent e92dbeb commit e6c3ae7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions runtime/src/parallel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ void octree::exchangeSamplesAndUpdateBoundarySFC(uint4 *sampleKeys, int nSam

/* LB step */

double f = 1.0;
double f_lb = 1.0;
#if 1 /* LB: use load ballacing */
{
static double prevDurStep = -1;
Expand Down Expand Up @@ -908,7 +908,7 @@ void octree::exchangeSamplesAndUpdateBoundarySFC(uint4 *sampleKeys, int nSam

#endif /* MEMB: end memory balance */

f = std::max(std::min(fmax, timeLocal / timeSum * nProcs), fmin);
f_lb = std::max(std::min(fmax, timeLocal / timeSum * nProcs), fmin);
}
#endif /* LB: end LB */

Expand All @@ -922,8 +922,8 @@ void octree::exchangeSamplesAndUpdateBoundarySFC(uint4 *sampleKeys, int nSam
key_sample1d.reserve(nsamples_glb);
key_sample2d.reserve(nsamples_glb);

const double nsamples1d_glb = (f * nsamples_glb);
const double nsamples2d_glb = (f * nsamples_glb) * npx;
const double nsamples1d_glb = (f_lb * nsamples_glb);
const double nsamples2d_glb = (f_lb * nsamples_glb) * npx;

const double nTot = nTotalFreq_ull;
const double stride1d = std::max(nTot/nsamples1d_glb, 1.0);
Expand Down

0 comments on commit e6c3ae7

Please sign in to comment.