From 5578924fdfd154f350a4dba0c76fbde781f1ac4b Mon Sep 17 00:00:00 2001 From: jdolence Date: Mon, 30 Oct 2023 13:46:51 -0600 Subject: [PATCH] try again --- src/mesh/amr_loadbalance.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesh/amr_loadbalance.cpp b/src/mesh/amr_loadbalance.cpp index e20da0702c5e..88d3f47edcc3 100644 --- a/src/mesh/amr_loadbalance.cpp +++ b/src/mesh/amr_loadbalance.cpp @@ -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; @@ -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.