Skip to content

Commit

Permalink
try to fix some things
Browse files Browse the repository at this point in the history
  • Loading branch information
jdolence committed Nov 3, 2023
1 parent 2c78030 commit 0b13b20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/mesh/amr_loadbalance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ void Mesh::ResetLoadBalanceVariables() {
// make a local copy to make CUDA happy
auto bcost = block_cost;
parthenon::par_for(
loop_pattern_flatrange_tag, "reset cost_d", DevExecSpace(), 0,
loop_pattern_flatrange_tag, PARTHENON_AUTO_LABEL, DevExecSpace(), 0,
block_list.size() - 1, KOKKOS_LAMBDA(const int b) { bcost(b) = TINY_NUMBER; });
for (int b = 0; b < block_list.size(); b++)
block_cost_host[b] = TINY_NUMBER;
Expand Down
8 changes: 1 addition & 7 deletions src/mesh/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1143,13 +1143,7 @@ void Mesh::Initialize(bool init_problem, ParameterInput *pin, ApplicationInput *
// caching nbtotal the private variable my be updated in the following function
const int nb_before_loadbalance = nbtotal;
// don't trust costs during problem initialization
for (int i = 0; i < nmb; ++i)
block_cost_host[i] = 1.0;
#ifdef ENABLE_LB_TIMERS
parthenon::par_for(
loop_pattern_flatrange_tag, PARTHENON_AUTO_LABEL, DevExecSpace(), 0, nmb - 1,
KOKKOS_LAMBDA(const int b) { block_cost(b) = 1.0; });
#endif
ResetLoadBalanceVariables();
LoadBalancingAndAdaptiveMeshRefinement(pin, app_in);
if (nbtotal == nb_before_loadbalance) {
init_done = true;
Expand Down

0 comments on commit 0b13b20

Please sign in to comment.