Skip to content

Commit

Permalink
start level for LB
Browse files Browse the repository at this point in the history
  • Loading branch information
RevathiJambunathan committed May 3, 2024
1 parent 8c137ca commit 5788d74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Source/Parallelization/WarpXRegrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ WarpX::LoadBalance ()
// ablastr::coarsen::sample::Coarsen(*costs[lev-1], *costs[lev],0,0,1,0,WarpX::RefRatio(lev-1));
// }
//}

for (int lev = 0; lev <= nLevels; ++lev)
int startlev = WarpX::load_balance_startlevel;
for (int lev = startlev; lev <= nLevels; ++lev)
{
int doLoadBalance = false;

Expand Down
2 changes: 1 addition & 1 deletion Source/WarpX.H
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ public:
{
return load_balance_intervals;
}

static int load_balance_startlevel;
/**
* \brief Private function for spectral solver
* Applies a damping factor in the guards cells that extend
Expand Down
2 changes: 2 additions & 0 deletions Source/WarpX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ bool WarpX::do_single_precision_comms = false;
bool WarpX::do_subcycle_current = false;
int WarpX::n_subcycle_current = 1;
bool WarpX::do_abc_in_pml = false;
int WarpX::load_balance_startlevel = 0;

bool WarpX::do_shared_mem_charge_deposition = false;
bool WarpX::do_shared_mem_current_deposition = false;
Expand Down Expand Up @@ -1353,6 +1354,7 @@ WarpX::ReadParameters ()
pp_algo.query("load_balance_with_sfc", load_balance_with_sfc);
pp_algo.query("do_similar_dm_refpatch", do_similar_dm_refpatch);
pp_algo.query("do_SFC_dm_vectorlevel",do_SFC_dm_vectorlevel);
pp_algo.query("load_balance_startlevel",load_balance_startlevel);
// Knapsack factor only used with non-SFC strategy
if (!load_balance_with_sfc) {
pp_algo.query("load_balance_knapsack_factor", load_balance_knapsack_factor);
Expand Down

0 comments on commit 5788d74

Please sign in to comment.