Skip to content

Commit 6844ef6

Browse files
KZhu-MEax3lroelof-groenewald
authored
Add load balancing test (#2561)
* Added embedded_circle test * Add embedded_circle test files * Removed diag files * removed PICMI input file * Update to use default regression analysis * Added line breaks for spacing Co-authored-by: Axel Huebl <[email protected]> * Added description * Fixed benchmark file * Added load balancing to test * Commented out load_balancing portion of test. This will be added back in once load balancing is fixed. * Add load balancing to embedded_boundary test * Updated checksum * Added embedded_circle test * Add embedded_circle test files * removed PICMI input file * Update to use default regression analysis * Added load balancing to test * Commented out load_balancing portion of test. This will be added back in once load balancing is fixed. * Add load balancing to embedded_boundary test * added analysis.py file in order to relax tolerance on test * Ensure that timers are used to update load balancing algorithm * Updated test name retrieval Co-authored-by: Axel Huebl <[email protected]> Co-authored-by: Roelof <[email protected]> Co-authored-by: Roelof Groenewald <[email protected]>
1 parent d435d0d commit 6844ef6

File tree

4 files changed

+41
-26
lines changed

4 files changed

+41
-26
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#! /usr/bin/env python
2+
3+
import os
4+
import sys
5+
sys.path.insert(1, '../../../../warpx/Regression/Checksum/')
6+
import checksumAPI
7+
8+
# this will be the name of the plot file
9+
fn = sys.argv[1]
10+
11+
# Get name of the test
12+
test_name = os.path.split(os.getcwd())[1]
13+
14+
# Run checksum regression test
15+
checksumAPI.evaluate_checksum(test_name, fn, rtol=1e-2)

Examples/Tests/embedded_circle/inputs_2d

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ warpx.eb_implicit_function = -((x-0.00005)**2+(z-0.00005)**2-1e-05**2)
1010
warpx.eb_potential(x,y,z,t) = -10
1111
warpx.self_fields_absolute_tolerance = 0.02
1212

13-
# algo.load_balance_intervals = 5
14-
# algo.load_balance_efficiency_ratio_threshold = 1.001
15-
# algo.load_balance_with_sfc = 0
16-
# algo.load_balance_knapsack_factor = 2
13+
algo.load_balance_intervals = 5
14+
algo.load_balance_costs_update = timers
15+
algo.load_balance_efficiency_ratio_threshold = 1.001
16+
algo.load_balance_with_sfc = 0
17+
algo.load_balance_knapsack_factor = 2
1718

1819
amr.n_cell = 128 128
1920
amr.max_grid_size = 16
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
22
"ar_ions": {
3-
"particle_cpu": 31744.0,
4-
"particle_id": 3220043046.0,
5-
"particle_momentum_x": 2.673023392216285e-18,
6-
"particle_momentum_y": 2.6733267061000188e-18,
7-
"particle_momentum_z": 2.667060599749979e-18,
8-
"particle_position_x": 3.1743018682048367,
9-
"particle_position_y": 3.1742959462007088,
10-
"particle_weight": 988093872.0703125
3+
"particle_cpu": 31743.0,
4+
"particle_id": 3219974926.0,
5+
"particle_momentum_x": 2.673080656628151e-18,
6+
"particle_momentum_y": 2.6734826129917346e-18,
7+
"particle_momentum_z": 2.6677137825404595e-18,
8+
"particle_position_x": 3.174244144020173,
9+
"particle_position_y": 3.1742742523212426,
10+
"particle_weight": 988078308.1054688
1111
},
1212
"electrons": {
13-
"particle_cpu": 30724.0,
14-
"particle_id": 1040144086.0,
15-
"particle_momentum_x": 2.991377867057318e-20,
16-
"particle_momentum_y": 3.014091741533624e-20,
17-
"particle_momentum_z": 3.022811783218703e-20,
18-
"particle_position_x": 3.0722092755241888,
19-
"particle_position_y": 3.072232836690298,
20-
"particle_weight": 956467895.5078125
13+
"particle_cpu": 30723.0,
14+
"particle_id": 1040042009.0,
15+
"particle_momentum_x": 2.99271246971674e-20,
16+
"particle_momentum_y": 3.014893117483374e-20,
17+
"particle_momentum_z": 3.016015662279529e-20,
18+
"particle_position_x": 3.072306870914145,
19+
"particle_position_y": 3.072501289015288,
20+
"particle_weight": 956421203.6132812
2121
},
2222
"lev=0": {
23-
"phi": 56898.52308944405,
24-
"rho_ar_ions": 257.80642870099507,
25-
"rho_electrons": 250.17704417223325
23+
"phi": 56898.115832092146,
24+
"rho_ar_ions": 257.8023434408326,
25+
"rho_electrons": 250.15834020610757
2626
}
27-
}
27+
}

Regression/WarpX-tests.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2427,8 +2427,7 @@ compileTest = 0
24272427
doVis = 0
24282428
compareParticles = 1
24292429
particleTypes = electrons ar_ions
2430-
analysisRoutine = Examples/analysis_default_regression.py
2431-
tolerance = 1.e-12
2430+
analysisRoutine = Examples/Tests/embedded_circle/analysis.py
24322431

24332432
[initial_distribution]
24342433
buildDir = .

0 commit comments

Comments
 (0)