Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
jdolence committed Oct 30, 2023
1 parent 2a4cf88 commit 5578924
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/mesh/amr_loadbalance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,12 @@ bool Mesh::RedistributeAndRefineMeshBlocks(ParameterInput *pin, ApplicationInput
int nbs = nslist[Globals::my_rank];
int nbe = nbs + nblist[Globals::my_rank] - 1;

#ifdef ENABLE_LB_TIMERS
block_cost.Realloc(nbe - nbs + 1);
#else
block_cost.resize(nbe - nbs + 1);
#endif

// Restrict fine to coarse buffers
ProResCache_t restriction_cache;
int nrestrict = 0;
Expand Down Expand Up @@ -964,11 +970,6 @@ bool Mesh::RedistributeAndRefineMeshBlocks(ParameterInput *pin, ApplicationInput
loclist = std::move(newloc);
ranklist = std::move(newrank);
costlist = std::move(newcost);
#ifdef ENABLE_LB_TIMERS
block_cost.Realloc(nbe - nbs + 1);
#else
block_cost.resize(nbe - nbs + 1);
#endif

// A block newly refined and prolongated may have neighbors which were
// already refined to the new level.
Expand Down

0 comments on commit 5578924

Please sign in to comment.