Skip to content

Commit

Permalink
Use BL_PROFILE instead of BL_PROFILE_VAR to time in knapsack()swap
Browse files Browse the repository at this point in the history
  • Loading branch information
atmyers committed Sep 5, 2024
1 parent 08eed95 commit 5a99d8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Base/AMReX_DistributionMapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ knapsack (const std::vector<Long>& wgts,
if (efficiency < max_efficiency && do_full_knapsack
&& wblv.size() > 1 && wblv.begin()->size() > 1)
{
BL_PROFILE_VAR("knapsack()swap", swap);
BL_PROFILE("knapsack()swap");
top: ;

if (efficiency < max_efficiency && wblv.begin()->size() > 1)
Expand Down Expand Up @@ -980,7 +980,7 @@ DistributionMapping::KnapSackProcessorMap (const DistributionMapping& olddm,
new_efficiency = avg_weight / max_weight;

if (new_efficiency < max_efficiency && wblv.size() > 1) {
BL_PROFILE_VAR("knapsack()swap", swap);
BL_PROFILE("knapsack()swap");

std::sort(wblv.begin(), wblv.end());

Expand Down

0 comments on commit 5a99d8b

Please sign in to comment.