Skip to content

Commit 206bc6b

Browse files
Fix Bug in HPMG bottomsolve_gpu (#1370)
1 parent f594950 commit 206bc6b

5 files changed

Lines changed: 22 additions & 20 deletions

File tree

src/mg_solver/HpMultiGrid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ void bottomsolve_gpu (amrex::Real dx0, amrex::Real dy0, Array3<amrex::Real> cons
898898
int i = icell - j*lenx;
899899
j += lev_domain[0].smallEnd(1) + corner_offset;
900900
i += lev_domain[0].smallEnd(0) + corner_offset;
901-
bool is_active = true;
901+
bool is_active = j <= (lev_domain[0].bigEnd(1) - corner_offset);
902902

903903
for (int ilev = 0; ilev < nlevs-1; ++ilev) {
904904
// set phi to zero

tests/checksum/benchmarks_json/laser_evolution.SI.2Rank.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
"Psi": 0.0,
1212
"Sx": 0.0,
1313
"Sy": 0.0,
14-
"aabs": 196.66890113956,
14+
"aabs": 196.66110311143,
1515
"chi": 0.0,
1616
"jx": 0.0,
1717
"jx_beam": 0.0,
1818
"jy": 0.0,
1919
"jy_beam": 0.0,
2020
"jz_beam": 0.0,
2121
"laserChi": 0.0,
22-
"laserEnvelope": 478.68654627351,
22+
"laserEnvelope": 478.67956548082,
2323
"rhomjz": 0.0,
24-
"|a^2|": 196.66890113946
24+
"|a^2|": 196.66110311143
2525
}
2626
}

tests/checksum/benchmarks_json/transverse_benchmark.1Rank.json

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
{
22
"lev=0": {
3-
"Bx": 109.05635145346,
4-
"By": 14394.854178494,
5-
"Bz": 55.916858300842,
6-
"ExmBy": 29641.555791479,
7-
"EypBx": 174.29898455178,
8-
"Ez": 24147.017790522,
9-
"Psi": 30545.70684051,
10-
"Sx": 855702.74347016,
11-
"Sy": 562321.82344904,
12-
"chi": 1018054.6153949,
13-
"jx": 26153.801526528,
3+
"Bx": 109.05633036116,
4+
"By": 14394.854151788,
5+
"Bz": 55.916852053834,
6+
"Ex": 24427.119878936,
7+
"ExmBy": 29641.555774625,
8+
"Ey": 264.30114167609,
9+
"EypBx": 174.29892545973,
10+
"Ez": 24147.017784648,
11+
"Psi": 30545.706848031,
12+
"Sx": 855703.07010712,
13+
"Sy": 562321.63825953,
14+
"chi": 1018054.6421633,
15+
"jx": 26153.800120894,
1416
"jx_beam": 0.0,
15-
"jy": 254.11189234126,
17+
"jy": 254.11210918255,
1618
"jy_beam": 0.0,
1719
"jz_beam": 25198.504543228,
18-
"rhomjz": 98737.09309244
20+
"rhomjz": 98737.078769792
1921
},
2022
"beam": {
2123
"charge": 10465290.0,
22-
"id": 54909091735281,
24+
"id": 54761152624695,
2325
"mass": 10465290.0,
2426
"x": 2505383.794397,
2527
"y": 2505059.6140784,

tests/laser_STC.1Rank.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ set -eu -o pipefail
1212
# Read input parameters
1313
HIPACE_EXECUTABLE=$1
1414
HIPACE_SOURCE_DIR=$2
15-
HIPACE_COMPUTE=$3
1615

1716
HIPACE_EXAMPLE_DIR=${HIPACE_SOURCE_DIR}/examples/laser_STC
1817
HIPACE_TEST_DIR=${HIPACE_SOURCE_DIR}/tests

tests/laser_evolution.SI.2Rank.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ FILE_NAME=`basename "$0"`
2626
TEST_NAME="${FILE_NAME%.*}"
2727

2828
# Relative tolerance for checksum tests depends on the platform
29-
RTOL=1e-12 && [[ "$HIPACE_EXECUTABLE" == *"hipace"*".CUDA."* ]] && RTOL=1e-7
29+
RTOL=1e-12 && [[ "$HIPACE_EXECUTABLE" == *"hipace"*".CUDA."* ]] && RTOL=1e-8
3030

3131
# Run the simulation with multigrid Poisson solver
3232
mpiexec -n 2 $HIPACE_EXECUTABLE $HIPACE_EXAMPLE_DIR/inputs_SI \
3333
lasers.solver_type = multigrid \
34+
lasers.MG_tolerance_rel = 1e-7 \
3435
hipace.file_prefix = $TEST_NAME
3536
# Compare the result with theory
3637
$HIPACE_EXAMPLE_DIR/analysis_laser_vacuum.py --output-dir=$TEST_NAME

0 commit comments

Comments
 (0)