Skip to content

Commit 5956ac9

Browse files
committed
Merge remote-tracking branch 'upstream/development' into HSdevmerge_240522
2 parents 61c83d6 + 6c4171a commit 5956ac9

File tree

455 files changed

+9421
-5972
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

455 files changed

+9421
-5972
lines changed

.clang-tidy

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Checks: '
77
-bugprone-unchecked-optional-access,
88
cert-*,
99
-cert-err58-cpp,
10+
clang-analyzer-*,
11+
-clang-analyzer-optin.performance.Padding,
12+
-clang-analyzer-optin.mpi.MPI-Checker,
13+
-clang-analyzer-osx.*,
14+
-clang-analyzer-optin.osx.*,
1015
clang-diagnostic-*,
1116
cppcoreguidelines-*,
1217
-cppcoreguidelines-avoid-c-arrays,
@@ -30,8 +35,6 @@ Checks: '
3035
-modernize-use-trailing-return-type,
3136
mpi-*,
3237
performance-*,
33-
-performance-unnecessary-copy-initialization,
34-
-performance-unnecessary-value-param,
3538
portability-*,
3639
readability-*,
3740
-readability-convert-member-functions-to-static,

.github/workflows/cuda.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
which nvcc || echo "nvcc not in PATH!"
116116
117117
git clone https://github.com/AMReX-Codes/amrex.git ../amrex
118-
cd ../amrex && git checkout --detach 24.03 && cd -
118+
cd ../amrex && git checkout --detach 7ca419ebb90da60fefc01d8c1816846fff8638a5 && cd -
119119
make COMP=gcc QED=FALSE USE_MPI=TRUE USE_GPU=TRUE USE_OMP=FALSE USE_PSATD=TRUE USE_CCACHE=TRUE -j 4
120120
121121
ccache -s

.github/workflows/dependencies/hip.sh

+17-5
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,24 @@ set -eu -o pipefail
1212
# failed files the given number of times.
1313
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries
1414

15-
# Ref.: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#ubuntu
16-
wget -q -O - https://repo.radeon.com/rocm/rocm.gpg.key \
17-
| sudo apt-key add -
18-
echo 'deb [arch=amd64] https://repo.radeon.com/rocm/apt/debian/ ubuntu main' \
19-
| sudo tee /etc/apt/sources.list.d/rocm.list
15+
# Ref.: https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/native-install/ubuntu.html
16+
17+
# Make the directory if it doesn't exist yet.
18+
# This location is recommended by the distribution maintainers.
19+
sudo mkdir --parents --mode=0755 /etc/apt/keyrings
20+
21+
# Download the key, convert the signing-key to a full
22+
# keyring required by apt and store in the keyring directory
23+
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
24+
gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
2025

26+
curl -O https://repo.radeon.com/rocm/rocm.gpg.key
27+
sudo apt-key add rocm.gpg.key
28+
29+
source /etc/os-release # set UBUNTU_CODENAME: focal or jammy or ...
30+
31+
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${1-latest} ${UBUNTU_CODENAME} main" \
32+
| sudo tee /etc/apt/sources.list.d/rocm.list
2133
echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin:$PATH' \
2234
| sudo tee -a /etc/profile.d/rocm.sh
2335

.github/workflows/dependencies/icc.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export CEI_TMP="/tmp/cei"
5858
CXX=$(which icpc) CC=$(which icc) \
5959
cmake-easyinstall \
6060
--prefix=/usr/local \
61-
git+https://github.com/openPMD/[email protected].1 \
61+
git+https://github.com/openPMD/[email protected].2 \
6262
-DopenPMD_USE_PYTHON=OFF \
6363
-DBUILD_TESTING=OFF \
6464
-DBUILD_EXAMPLES=OFF \

.github/workflows/macos.yml

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ jobs:
3636
brew tap openpmd/openpmd
3737
brew install openpmd-api
3838
39-
python3 -m pip install --upgrade pip
40-
python3 -m pip install --upgrade virtualenv
41-
4239
python3 -m venv py-venv
4340
source py-venv/bin/activate
4441
python3 -m pip install --upgrade pip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
2+
#!/usr/bin/env bash
3+
#
4+
# Copyright 2022 Luca Fedeli
5+
#
6+
# License: BSD-3-Clause-LBNL
7+
8+
set -eu -o pipefail
9+
10+
export OMP_NUM_THREADS=2
11+
12+
#
13+
# Generate QED lookup tables using external tool
14+
#
15+
./build/bin/qed_table_generator \
16+
--table BW --mode DP --dndt_chi_min 0.01 \
17+
--dndt_chi_max 100 --dndt_how_many 64 \
18+
--pair_chi_min 0.01 --pair_chi_max 100 \
19+
--pair_chi_how_many 64 --pair_frac_how_many 64 \
20+
-o bw_table_tool
21+
./build/bin/qed_table_generator \
22+
--table QS --mode DP --dndt_chi_min 0.001 \
23+
--dndt_chi_max 100 --dndt_how_many 64 \
24+
--em_chi_min 0.001 --em_chi_max 100 \
25+
--em_chi_how_many 64 --em_frac_how_many 64 \
26+
--em_frac_min 1e-12 -o qs_table_tool
27+
28+
#
29+
# Generate QED lookup tables using WarpX
30+
#
31+
./build/bin/warpx.2d \
32+
./Examples/Tests/qed/quantum_synchrotron/inputs_2d \
33+
qed_bw.lookup_table_mode = "generate" \
34+
qed_bw.tab_dndt_chi_min = 0.01 \
35+
qed_bw.tab_dndt_chi_max = 100.0 \
36+
qed_bw.tab_dndt_how_many = 64 \
37+
qed_bw.tab_pair_chi_min = 0.01 \
38+
qed_bw.tab_pair_chi_max = 100.0 \
39+
qed_bw.tab_pair_chi_how_many = 64 \
40+
qed_bw.tab_pair_frac_how_many = 64 \
41+
qed_bw.save_table_in = "bw_table" \
42+
qed_qs.lookup_table_mode = "generate" \
43+
qed_qs.tab_dndt_chi_min = 0.001 \
44+
qed_qs.tab_dndt_chi_max = 100.0 \
45+
qed_qs.tab_dndt_how_many = 64 \
46+
qed_qs.tab_em_chi_min = 0.001 \
47+
qed_qs.tab_em_frac_min = 1.0e-12 \
48+
qed_qs.tab_em_chi_max = 100.0 \
49+
qed_qs.tab_em_chi_how_many = 64 \
50+
qed_qs.tab_em_frac_how_many = 64 \
51+
qed_qs.save_table_in = "qs_table"
52+
53+
#
54+
# Convert lookup tables (generated with WarpX and with the external tool) in human-readable format
55+
#
56+
./build/bin/qed_table_reader -i qs_table --table QS --mode DP -o qs_table
57+
./build/bin/qed_table_reader -i qs_table_tool --table QS --mode DP -o qs_table_tool
58+
./build/bin/qed_table_reader -i bw_table --table BW --mode DP -o bw_table
59+
./build/bin/qed_table_reader -i bw_table_tool --table BW --mode DP -o bw_table_tool
60+
61+
#
62+
# Compare the generated lookup tables
63+
#
64+
diff bw_table_dndt bw_table_tool_dndt
65+
diff bw_table_pair bw_table_tool_pair
66+
diff qs_table_phot_em qs_table_tool_phot_em
67+
diff qs_table_dndt qs_table_tool_dndt
68+
69+
#
70+
# Run a WarpX simulation using the lookup tables generated by the external tool
71+
#
72+
./build/bin/warpx.2d \
73+
./Examples/Tests/qed/quantum_synchrotron/inputs_2d \
74+
qed_bw.lookup_table_mode = "load" \
75+
qed_bw.load_table_from = "bw_table_tool" \
76+
qed_qs.lookup_table_mode = "load" \
77+
qed_qs.load_table_from = "qs_table_tool"

.github/workflows/ubuntu.yml

+63-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
du -hs ~/.cache/ccache
4747
4848
build_1D_2D:
49-
name: GCC 1D & 2D w/ MPI
49+
name: GCC 1D & 2D w/ MPI, QED tools
5050
runs-on: ubuntu-22.04
5151
if: github.event.pull_request.draft == false
5252
env:
@@ -78,14 +78,20 @@ jobs:
7878
-DWarpX_DIMS="1;2" \
7979
-DWarpX_EB=OFF \
8080
-DWarpX_PSATD=ON \
81-
-DWarpX_QED_TABLE_GEN=ON
81+
-DWarpX_QED_TABLE_GEN=ON \
82+
-DWarpX_QED_TOOLS=ON
83+
8284
cmake --build build -j 4
8385
./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_1d
8486
./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_2d
8587
8688
ccache -s
8789
du -hs ~/.cache/ccache
8890
91+
- name: run QED table tools
92+
run: |
93+
.github/workflows/scripts/checkQEDTableGenerator.sh
94+
8995
build_3D_sp:
9096
name: GCC 3D & RZ w/ MPI, single precision
9197
runs-on: ubuntu-22.04
@@ -218,6 +224,61 @@ jobs:
218224
export OMP_NUM_THREADS=1
219225
mpirun -n 2 Examples/Physics_applications/laser_acceleration/PICMI_inputs_3d.py
220226
227+
build_UB_sanitizer:
228+
name: Clang UB sanitizer
229+
runs-on: ubuntu-22.04
230+
if: github.event.pull_request.draft == false
231+
env:
232+
CC: clang
233+
CXX: clang++
234+
# On CI for this test, Ninja is slower than the default:
235+
#CMAKE_GENERATOR: Ninja
236+
steps:
237+
- uses: actions/checkout@v4
238+
- name: install dependencies
239+
run: |
240+
.github/workflows/dependencies/clang15.sh
241+
- name: CCache Cache
242+
uses: actions/cache@v4
243+
with:
244+
path: ~/.cache/ccache
245+
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
246+
restore-keys: |
247+
ccache-${{ github.workflow }}-${{ github.job }}-git-
248+
- name: build WarpX
249+
run: |
250+
export CCACHE_COMPRESS=1
251+
export CCACHE_COMPRESSLEVEL=10
252+
export CCACHE_MAXSIZE=100M
253+
ccache -z
254+
255+
export CXX=$(which clang++-15)
256+
export CC=$(which clang-15)
257+
export CXXFLAGS="-fsanitize=undefined -fno-sanitize-recover=all"
258+
259+
cmake -S . -B build \
260+
-GNinja \
261+
-DCMAKE_VERBOSE_MAKEFILE=ON \
262+
-DWarpX_DIMS="RZ;1;2;3" \
263+
-DWarpX_PSATD=ON \
264+
-DWarpX_QED=ON \
265+
-DWarpX_QED_TABLE_GEN=ON \
266+
-DWarpX_OPENPMD=ON \
267+
-DWarpX_PRECISION=SINGLE \
268+
-DWarpX_PARTICLE_PRECISION=SINGLE
269+
cmake --build build -j 4
270+
271+
ccache -s
272+
du -hs ~/.cache/ccache
273+
274+
- name: run with UB sanitizer
275+
run: |
276+
export OMP_NUM_THREADS=2
277+
mpirun -n 2 ./build/bin/warpx.rz Examples/Physics_applications/laser_acceleration/inputs_rz
278+
mpirun -n 2 ./build/bin/warpx.1d Examples/Physics_applications/laser_acceleration/inputs_1d
279+
mpirun -n 2 ./build/bin/warpx.2d Examples/Physics_applications/laser_acceleration/inputs_2d
280+
mpirun -n 2 ./build/bin/warpx.3d Examples/Physics_applications/laser_acceleration/inputs_3d
281+
221282
save_pr_number:
222283
if: github.event_name == 'pull_request'
223284
runs-on: ubuntu-latest

.pre-commit-config.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ exclude: '^share/openPMD/thirdParty'
1818
# See https://pre-commit.com/hooks.html for more hooks
1919
repos:
2020
- repo: https://github.com/pre-commit/pre-commit-hooks
21-
rev: v4.5.0
21+
rev: v4.6.0
2222
hooks:
2323
- id: trailing-whitespace
2424
args: [--markdown-linebreak-ext=md]
@@ -80,6 +80,7 @@ repos:
8080
hooks:
8181
- id: isort
8282
name: isort (python)
83+
args: ['--profile black']
8384

8485
# Python: Flake8 (checks only, does this support auto-fixes?)
8586
#- repo: https://github.com/PyCQA/flake8

.zenodo.json

+21-6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
"name": "Andriyash, Igor",
2121
"orcid": "0000-0003-0313-4496"
2222
},
23+
{
24+
"affiliation": "Lawrence Livermore National Laboratory",
25+
"name": "Angus, Justin Ray",
26+
"orcid": "0000-0003-1474-0002"
27+
},
2328
{
2429
"affiliation": "Lawrence Berkeley National Laboratory",
2530
"name": "Belkin, Daniel",
@@ -93,6 +98,11 @@
9398
"name": "Gu, Junmin",
9499
"orcid": "0000-0002-1521-8534"
95100
},
101+
{
102+
"affiliation": "Lawrence Berkeley National Laboratory",
103+
"name": "Haseeb, Muhammad",
104+
"orcid": "0000-0002-0697-6894"
105+
},
96106
{
97107
"affiliation": "Lawrence Berkeley National Laboratory",
98108
"name": "Jambunathan, Revathi",
@@ -155,19 +165,29 @@
155165
},
156166
{
157167
"affiliation": "Lawrence Berkeley National Laboratory",
158-
"name": "Sandberg, Ryan T.",
168+
"name": "Sandberg, Ryan Thor",
159169
"orcid": "0000-0001-7680-8733"
160170
},
161171
{
162172
"affiliation": "Modern Electron",
163173
"name": "Scherpelz, Peter",
164174
"orcid": "0000-0001-8185-3387"
165175
},
176+
{
177+
"affiliation": "Laboratory for Laser Energetics, University of Rochester",
178+
"name": "Weichman, Kale",
179+
"orcid": "0000-0002-3487-7922"
180+
},
166181
{
167182
"affiliation": "Lawrence Berkeley National Laboratory",
168183
"name": "Yang, Eloise",
169184
"orcid": "0000-0002-9319-4216"
170185
},
186+
{
187+
"affiliation": "LIDYL, CEA-Universit\u00e9 Paris-Saclay, CEA Saclay",
188+
"name": "Zaim, Ne\u00efl",
189+
"orcid": "0000-0003-0313-4496"
190+
},
171191
{
172192
"affiliation": "Lawrence Berkeley National Laboratory",
173193
"name": "Zhang, Weiqun",
@@ -187,11 +207,6 @@
187207
"affiliation": "Lawrence Berkeley National Laboratory",
188208
"name": "Zoni, Edoardo",
189209
"orcid": "0000-0001-5662-4646"
190-
},
191-
{
192-
"affiliation": "LIDYL, CEA-Universit\u00e9 Paris-Saclay, CEA Saclay",
193-
"name": "Zaim, Ne\u00efl",
194-
"orcid": "0000-0003-0313-4496"
195210
}
196211
],
197212
"contributors": [

0 commit comments

Comments
 (0)