From aca6cef6274898a71b9c79a7f83c2815156dd13c Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Thu, 8 Jan 2026 18:10:42 +0100 Subject: [PATCH 01/14] enable UB sanitizer --- .github/workflows/linux.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 236f2d615e..7e35c1e65d 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -39,6 +39,7 @@ jobs: - name: Build & Install run: | pip install -U -e ./tools + export CXXFLAGS="-fsanitize=undefined,address,pointer-compare -fno-sanitize-recover=all" cmake -S . -B build \ -DHiPACE_COMPUTE=OMP \ -DCMAKE_CXX_STANDARD=17 \ @@ -46,7 +47,14 @@ jobs: -DCMAKE_VERBOSE_MAKEFILE=ON cmake --build build -j 2 - name: Run Tests - run: ctest --test-dir build --output-on-failure + run: | + #MPI implementations often leak memory + export "ASAN_OPTIONS=detect_leaks=0" + + # Print stacktrace for easier debugging + export UBSAN_OPTIONS=print_stacktrace=1 + + ctest --test-dir build --output-on-failure linux_gcc_cxx17: name: GNU@7.5 C++17 Serial From f79ce0903f899a6aa1246c359e55c320c90d83a0 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Fri, 9 Jan 2026 10:21:21 +0100 Subject: [PATCH 02/14] change CXX flags for test --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7e35c1e65d..eecad43cb8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -39,7 +39,7 @@ jobs: - name: Build & Install run: | pip install -U -e ./tools - export CXXFLAGS="-fsanitize=undefined,address,pointer-compare -fno-sanitize-recover=all" + export CXXFLAGS="-fsanitize=undefined,address -fno-sanitize-recover=all -g -O2" cmake -S . -B build \ -DHiPACE_COMPUTE=OMP \ -DCMAKE_CXX_STANDARD=17 \ From c2192c77ed218bb3eae9694c4377ef8edaa782fa Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Fri, 9 Jan 2026 10:26:05 +0100 Subject: [PATCH 03/14] use cmake build type --- .github/workflows/linux.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index eecad43cb8..29b08cf97d 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -39,8 +39,9 @@ jobs: - name: Build & Install run: | pip install -U -e ./tools - export CXXFLAGS="-fsanitize=undefined,address -fno-sanitize-recover=all -g -O2" + export CXXFLAGS="-fsanitize=undefined,address -fno-sanitize-recover=all" cmake -S . -B build \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DHiPACE_COMPUTE=OMP \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX=/tmp/my-hipace \ From deefa525f90282b19f762c6116e76bdf7567555d Mon Sep 17 00:00:00 2001 From: Alexander Sinn Date: Fri, 9 Jan 2026 12:33:54 +0100 Subject: [PATCH 04/14] Prevent plasma ionization past the atomic number --- src/particles/plasma/PlasmaParticleContainer.H | 1 + src/particles/plasma/PlasmaParticleContainer.cpp | 8 ++++++++ src/particles/plasma/PlasmaParticleContainerInit.cpp | 1 + 3 files changed, 10 insertions(+) diff --git a/src/particles/plasma/PlasmaParticleContainer.H b/src/particles/plasma/PlasmaParticleContainer.H index 6762648aac..d3559c5bfd 100644 --- a/src/particles/plasma/PlasmaParticleContainer.H +++ b/src/particles/plasma/PlasmaParticleContainer.H @@ -279,6 +279,7 @@ public: bool m_can_field_ionize = false; /**< whether this plasma can ionize from the field */ bool m_can_laser_ionize = false; /**< whether this plasma can ionize from a laser */ int m_init_ion_lev = -1; /**< initial Ion level of each particle */ + int m_max_ion_lev = 0; /**< maximum ionization level */ std::string m_product_name = ""; /**< name of Ionization product plasma */ PlasmaParticleContainer* m_product_pc = nullptr; /**< Ionization product plasma */ /** to calculate Ionization probability with ADK formula */ diff --git a/src/particles/plasma/PlasmaParticleContainer.cpp b/src/particles/plasma/PlasmaParticleContainer.cpp index b7dbd3501b..ae1084b77e 100644 --- a/src/particles/plasma/PlasmaParticleContainer.cpp +++ b/src/particles/plasma/PlasmaParticleContainer.cpp @@ -418,6 +418,7 @@ IonizationModule (const int lev, amrex::Real* AMREX_RESTRICT adk_prefactor = m_adk_prefactor.data(); amrex::Real* AMREX_RESTRICT adk_exp_prefactor = m_adk_exp_prefactor.data(); amrex::Real* AMREX_RESTRICT adk_power = m_adk_power.data(); + const int max_ion_lev = m_max_ion_lev; long num_ions = ptile_ion.numParticles(); @@ -466,6 +467,9 @@ IonizationModule (const int lev, const amrex::Real gamma_psi = plasma_gamma_psi(ux, uy, 1._rt / psi, /* Assumes Aabssq == 0 */ 0._rt); const int ion_lev_loc = ptd_ion.idata(PlasmaIdx::ion_lev)[ip]; + if (ion_lev_loc >= max_ion_lev) { + return; + } // gamma / (psi + 1) to complete dt for QSA amrex::Real w_dtau = gamma_psi * adk_prefactor[ion_lev_loc] * std::pow(Ep, adk_power[ion_lev_loc]) * @@ -611,6 +615,7 @@ LaserIonization (const int islice, amrex::Real* AMREX_RESTRICT laser_adk_prefactor = m_laser_adk_prefactor.data(); amrex::Real* AMREX_RESTRICT laser_dp_prefactor = m_laser_dp_prefactor.data(); amrex::Real* AMREX_RESTRICT laser_dp_second_prefactor = m_laser_dp_second_prefactor.data(); + const int max_ion_lev = m_max_ion_lev; long num_ions = ptile_ion.numParticles(); @@ -660,6 +665,9 @@ LaserIonization (const int islice, const amrex::Real gamma_psi = plasma_gamma_psi(ux, uy, 1._rt / psi, /* Assumes Aabssq == 0 */ 0._rt); const int ion_lev_loc = ptd_ion.idata(PlasmaIdx::ion_lev)[ip]; + if (ion_lev_loc >= max_ion_lev) { + return; + } // gamma / (psi + 1) to complete dt for QSA amrex::Real w_dtau_dc = gamma_psi * adk_prefactor[ion_lev_loc] * std::pow(Ep, adk_power[ion_lev_loc]) * diff --git a/src/particles/plasma/PlasmaParticleContainerInit.cpp b/src/particles/plasma/PlasmaParticleContainerInit.cpp index 46e38a0fc4..4f6d955d0a 100644 --- a/src/particles/plasma/PlasmaParticleContainerInit.cpp +++ b/src/particles/plasma/PlasmaParticleContainerInit.cpp @@ -426,6 +426,7 @@ InitIonizationModule (const amrex::Geometry& geom, const amrex::Real background_ // Get atomic number and ionization energies from file const int ion_element_id = ion_map_ids[physical_element]; const int ion_atomic_number = ion_atomic_numbers[ion_element_id]; + m_max_ion_lev = ion_atomic_number; amrex::Vector h_ionization_energies(ion_atomic_number); const int offset = ion_energy_offsets[ion_element_id]; for(int i=0; i Date: Fri, 9 Jan 2026 12:55:18 +0100 Subject: [PATCH 05/14] add print for testing --- src/particles/plasma/PlasmaParticleContainer.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/particles/plasma/PlasmaParticleContainer.cpp b/src/particles/plasma/PlasmaParticleContainer.cpp index ae1084b77e..18e4fe25dc 100644 --- a/src/particles/plasma/PlasmaParticleContainer.cpp +++ b/src/particles/plasma/PlasmaParticleContainer.cpp @@ -467,8 +467,9 @@ IonizationModule (const int lev, const amrex::Real gamma_psi = plasma_gamma_psi(ux, uy, 1._rt / psi, /* Assumes Aabssq == 0 */ 0._rt); const int ion_lev_loc = ptd_ion.idata(PlasmaIdx::ion_lev)[ip]; - if (ion_lev_loc >= max_ion_lev) { - return; + if (ion_lev_loc > max_ion_lev) { + std::cout << "max_ion_lev " << max_ion_lev << " ion_lev_loc " << ion_lev_loc << '\n'; + // return; } // gamma / (psi + 1) to complete dt for QSA amrex::Real w_dtau = gamma_psi * adk_prefactor[ion_lev_loc] * @@ -665,8 +666,9 @@ LaserIonization (const int islice, const amrex::Real gamma_psi = plasma_gamma_psi(ux, uy, 1._rt / psi, /* Assumes Aabssq == 0 */ 0._rt); const int ion_lev_loc = ptd_ion.idata(PlasmaIdx::ion_lev)[ip]; - if (ion_lev_loc >= max_ion_lev) { - return; + if (ion_lev_loc > max_ion_lev) { + std::cout << "max_ion_lev " << max_ion_lev << " ion_lev_loc " << ion_lev_loc << '\n'; + // return; } // gamma / (psi + 1) to complete dt for QSA amrex::Real w_dtau_dc = gamma_psi * adk_prefactor[ion_lev_loc] * From 95ee5911470ff0a955c3ec1cf690514c89369d50 Mon Sep 17 00:00:00 2001 From: Alexander Sinn Date: Fri, 9 Jan 2026 12:57:53 +0100 Subject: [PATCH 06/14] break CI --- tests/ionization.2Rank.sh | 4 +++- tests/laser_ionization.1Rank.sh | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/ionization.2Rank.sh b/tests/ionization.2Rank.sh index 1cc21ce1e7..4fd8ed07ff 100755 --- a/tests/ionization.2Rank.sh +++ b/tests/ionization.2Rank.sh @@ -40,4 +40,6 @@ $HIPACE_TEST_DIR/checksum/checksumAPI.py \ --evaluate \ --file_name $TEST_NAME \ --test-name $TEST_NAME \ - --skip "{'beam': 'id'}" + --skip "{'beam': 'id'}"^ + +exit 1; diff --git a/tests/laser_ionization.1Rank.sh b/tests/laser_ionization.1Rank.sh index eab7146909..50a3f69842 100755 --- a/tests/laser_ionization.1Rank.sh +++ b/tests/laser_ionization.1Rank.sh @@ -51,3 +51,5 @@ if [[ "$HIPACE_COMPUTE" != "CUDA" ]]; then --file_name $TEST_NAME/linear \ --test-name $TEST_NAME fi + +exit 1; From c15eab79517ffbab3c690b28a1d4aa53ccba6981 Mon Sep 17 00:00:00 2001 From: Alexander Sinn Date: Fri, 9 Jan 2026 13:12:04 +0100 Subject: [PATCH 07/14] revert test and reset CI --- .../plasma/PlasmaParticleContainer.cpp | 10 ++-- .../benchmarks_json/ionization.2Rank.json | 48 +++++++++---------- .../laser_ionization.1Rank.json | 40 ++++++++-------- tests/ionization.2Rank.sh | 4 +- tests/laser_ionization.1Rank.sh | 2 - 5 files changed, 49 insertions(+), 55 deletions(-) diff --git a/src/particles/plasma/PlasmaParticleContainer.cpp b/src/particles/plasma/PlasmaParticleContainer.cpp index 18e4fe25dc..ae1084b77e 100644 --- a/src/particles/plasma/PlasmaParticleContainer.cpp +++ b/src/particles/plasma/PlasmaParticleContainer.cpp @@ -467,9 +467,8 @@ IonizationModule (const int lev, const amrex::Real gamma_psi = plasma_gamma_psi(ux, uy, 1._rt / psi, /* Assumes Aabssq == 0 */ 0._rt); const int ion_lev_loc = ptd_ion.idata(PlasmaIdx::ion_lev)[ip]; - if (ion_lev_loc > max_ion_lev) { - std::cout << "max_ion_lev " << max_ion_lev << " ion_lev_loc " << ion_lev_loc << '\n'; - // return; + if (ion_lev_loc >= max_ion_lev) { + return; } // gamma / (psi + 1) to complete dt for QSA amrex::Real w_dtau = gamma_psi * adk_prefactor[ion_lev_loc] * @@ -666,9 +665,8 @@ LaserIonization (const int islice, const amrex::Real gamma_psi = plasma_gamma_psi(ux, uy, 1._rt / psi, /* Assumes Aabssq == 0 */ 0._rt); const int ion_lev_loc = ptd_ion.idata(PlasmaIdx::ion_lev)[ip]; - if (ion_lev_loc > max_ion_lev) { - std::cout << "max_ion_lev " << max_ion_lev << " ion_lev_loc " << ion_lev_loc << '\n'; - // return; + if (ion_lev_loc >= max_ion_lev) { + return; } // gamma / (psi + 1) to complete dt for QSA amrex::Real w_dtau_dc = gamma_psi * adk_prefactor[ion_lev_loc] * diff --git a/tests/checksum/benchmarks_json/ionization.2Rank.json b/tests/checksum/benchmarks_json/ionization.2Rank.json index 1a28eafc14..db8cb33249 100644 --- a/tests/checksum/benchmarks_json/ionization.2Rank.json +++ b/tests/checksum/benchmarks_json/ionization.2Rank.json @@ -1,34 +1,34 @@ { "lev=0": { - "Bx": 2682248.7024631, - "By": 2693948.2701062, - "Bz": 461542.25627809, - "Ex": 2027829034919000.0, - "ExmBy": 1615808683503300.0, - "Ey": 2028075445665300.0, - "EypBx": 1618198281458700.0, - "Ez": 661283577718300.0, - "Psi": 10769981625.527, - "Sx": 7.6153143258378e+17, - "Sy": 7.6749661894861e+17, - "chi": 2095164842379900.0, - "jx": 5.1803326128365e+17, - "jx_beam": 231581099135240.0, - "jy": 5.166188820914e+17, - "jy_beam": 230138000597450.0, - "jz_beam": 1.6907142961473e+17, - "rhomjz": 8996307093.0909 + "Bx": 2620311.1374515, + "By": 2635709.7531506, + "Bz": 414833.05353295, + "Ex": 2012939150389200.0, + "ExmBy": 1596237863501100.0, + "Ey": 1985459967332800.0, + "EypBx": 1577025752807400.0, + "Ez": 679659182354100.0, + "Psi": 10548202179.363, + "Sx": 7.6385240482099e+17, + "Sy": 7.6031507997545e+17, + "chi": 2108090067779600.0, + "jx": 5.1771260837627e+17, + "jx_beam": 229049530186220.0, + "jy": 5.1922551204841e+17, + "jy_beam": 224659467158600.0, + "jz_beam": 1.6907142196764e+17, + "rhomjz": 9012917997.7387 }, "beam": { "charge": 1.127932350336e-16, "id": 248160, "mass": 6.4130061345856e-28, - "x": 0.00024861156909874, - "y": 0.00024733653838739, - "z": 0.014359549367759, - "ux": 3002.9712551376, - "uy": 3008.114106705, - "uz": 1386735.4183111, + "x": 0.00024635902135382, + "y": 0.00024286960511978, + "z": 0.014359553378628, + "ux": 3013.9898183181, + "uy": 3014.5223974211, + "uz": 1386709.9483869, "w": 825000000.0 } } diff --git a/tests/checksum/benchmarks_json/laser_ionization.1Rank.json b/tests/checksum/benchmarks_json/laser_ionization.1Rank.json index e3e1465cb0..a28fe521a2 100644 --- a/tests/checksum/benchmarks_json/laser_ionization.1Rank.json +++ b/tests/checksum/benchmarks_json/laser_ionization.1Rank.json @@ -1,41 +1,41 @@ { "lev=0": { - "Bx": 3.5819859018319, - "By": 3.7269958544827, - "Bz": 2204.1195988099, - "Ex": 1117325248.1712, + "Bx": 3.7149515661811, + "By": 3.7865224175932, + "Bz": 2314.4198911339, + "Ex": 1135170862.8424, "ExmBy": 0.0, - "Ey": 1073852358.0315, + "Ey": 1113714461.3764, "EypBx": 0.0, - "Ez": 775468649901.41, + "Ez": 707934921502.67, "Psi": 0.0, - "Sx": 308477798484.84, - "Sy": 326849048142.86, + "Sx": 316753118383.02, + "Sy": 324030818911.92, "aabs": 0.46877495720552, - "chi": 265988685160760.0, - "jx": 700828092230540.0, + "chi": 267414764966510.0, + "jx": 702652162565720.0, "jx_beam": 0.0, "jy": 0.0, "jy_beam": 0.0, "jz_beam": 0.0, - "laserChi": 907831282357500.0, + "laserChi": 909177572466960.0, "laserEnvelope": 74.898701643489, - "rho_elec": 1202810276.6959, - "rho_ion": 1202806069.8845, + "rho_elec": 1209259053.802, + "rho_ion": 1209254830.8364, "rhomjz": 0.0, - "ux^2_elec": 0.26699411903602, + "ux^2_elec": 0.26780158956573, "ux^2_ion": 0.0, - "ux_elec": 83.376249717662, + "ux_elec": 83.593256064089, "ux_ion": 0.0, "uy^2_elec": 0.0, "uy^2_ion": 0.0, "uy_elec": 0.0, "uy_ion": 0.0, - "uz^2_elec": 1.6555627362415e-06, - "uz^2_ion": 1.4839081226415e-20, - "uz_elec": 0.14984820708954, - "uz_ion": 4.8429931176486e-09, - "w_elec": 480470478299.92, + "uz^2_elec": 1.6568753834647e-06, + "uz^2_ion": 1.5025085926483e-20, + "uz_elec": 0.15044101093153, + "uz_ion": 4.8989912126984e-09, + "w_elec": 483046484939.32, "w_ion": 1400000000000.1, "|a^2|": 0.46877495720552 } diff --git a/tests/ionization.2Rank.sh b/tests/ionization.2Rank.sh index 4fd8ed07ff..1cc21ce1e7 100755 --- a/tests/ionization.2Rank.sh +++ b/tests/ionization.2Rank.sh @@ -40,6 +40,4 @@ $HIPACE_TEST_DIR/checksum/checksumAPI.py \ --evaluate \ --file_name $TEST_NAME \ --test-name $TEST_NAME \ - --skip "{'beam': 'id'}"^ - -exit 1; + --skip "{'beam': 'id'}" diff --git a/tests/laser_ionization.1Rank.sh b/tests/laser_ionization.1Rank.sh index 50a3f69842..eab7146909 100755 --- a/tests/laser_ionization.1Rank.sh +++ b/tests/laser_ionization.1Rank.sh @@ -51,5 +51,3 @@ if [[ "$HIPACE_COMPUTE" != "CUDA" ]]; then --file_name $TEST_NAME/linear \ --test-name $TEST_NAME fi - -exit 1; From 23018d59b9299a88e961f888bc99b066c00ae2d7 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Wed, 21 Jan 2026 16:45:48 +0100 Subject: [PATCH 08/14] try adding ccache --- .github/workflows/linux.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 29b08cf97d..4130f3ee2f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -29,15 +29,17 @@ jobs: # - once stored under a key, they become immutable (even if local cache path content changes) # - for a refresh the key has to change, e.g., hash of a tracked file in the key with: - path: | - ~/.ccache - ~/.cache/ccache - key: ccache-linux-gccompompi-${{ hashFiles('.github/workflows/linux.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}-${{ github.event.repository.pushed_at }} + path: ~/.cache/ccache + key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }} restore-keys: | - ccache-linux-gccompompi-${{ hashFiles('.github/workflows/linux.yml') }}- - ccache-linux-gccompompi- + ccache-${{ github.workflow }}-${{ github.job }}-git- - name: Build & Install run: | + export CCACHE_COMPRESS=1 + export CCACHE_COMPRESSLEVEL=10 + export CCACHE_MAXSIZE=300M + ccache -z + pip install -U -e ./tools export CXXFLAGS="-fsanitize=undefined,address -fno-sanitize-recover=all" cmake -S . -B build \ @@ -47,6 +49,11 @@ jobs: -DCMAKE_INSTALL_PREFIX=/tmp/my-hipace \ -DCMAKE_VERBOSE_MAKEFILE=ON cmake --build build -j 2 + + ccache -s + du -hs ~/.cache/ccache + + - name: Run Tests run: | #MPI implementations often leak memory From d9668fbf1fe4038899326bf4c55754436f3594bb Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Wed, 21 Jan 2026 17:10:47 +0100 Subject: [PATCH 09/14] meaningless change to test ccache --- src/particles/plasma/MultiPlasma.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/particles/plasma/MultiPlasma.H b/src/particles/plasma/MultiPlasma.H index 12549d09d0..ac95f06a67 100644 --- a/src/particles/plasma/MultiPlasma.H +++ b/src/particles/plasma/MultiPlasma.H @@ -91,7 +91,7 @@ public: * * \param[in,out] fields the general field class, modified by this function * \param[in] which_slice slice in which the densities are deposited - * \param[in] gm Geometry of the simulation, to get the cell size etc. + * \param[in] gm Geometry of the simulation (to get the cell size etc.) * \param[in] lev MR level */ void DepositNeutralizingBackground ( From 3bb211de259da46b7c8ace32540449452f5529cb Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Wed, 21 Jan 2026 17:22:54 +0100 Subject: [PATCH 10/14] debugging --- .github/workflows/linux.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4130f3ee2f..b0f60450e1 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -31,10 +31,12 @@ jobs: with: path: ~/.cache/ccache key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }} - restore-keys: | - ccache-${{ github.workflow }}-${{ github.job }}-git- + restore-keys: ccache-${{ github.workflow }}-${{ github.job }}-git- - name: Build & Install run: | + + du -hs ~/.cache/ccache + export CCACHE_COMPRESS=1 export CCACHE_COMPRESSLEVEL=10 export CCACHE_MAXSIZE=300M From eb07860ee2ca5f0ed49f4a3b211a1d16e45ce6e6 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Wed, 21 Jan 2026 17:30:10 +0100 Subject: [PATCH 11/14] debugging --- .github/workflows/linux.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index b0f60450e1..b9e2c0e384 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -29,14 +29,12 @@ jobs: # - once stored under a key, they become immutable (even if local cache path content changes) # - for a refresh the key has to change, e.g., hash of a tracked file in the key with: - path: ~/.cache/ccache + path: ~/.cache key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }} restore-keys: ccache-${{ github.workflow }}-${{ github.job }}-git- - name: Build & Install run: | - du -hs ~/.cache/ccache - export CCACHE_COMPRESS=1 export CCACHE_COMPRESSLEVEL=10 export CCACHE_MAXSIZE=300M @@ -53,7 +51,7 @@ jobs: cmake --build build -j 2 ccache -s - du -hs ~/.cache/ccache + du -hs ~/.cache - name: Run Tests From 77999087646397d5e5ab7779f927f538079cd365 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Wed, 21 Jan 2026 18:03:34 +0100 Subject: [PATCH 12/14] increase amount of stuff that is cached --- .github/workflows/linux.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index b9e2c0e384..5773058015 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -43,6 +43,7 @@ jobs: pip install -U -e ./tools export CXXFLAGS="-fsanitize=undefined,address -fno-sanitize-recover=all" cmake -S . -B build \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DHiPACE_COMPUTE=OMP \ -DCMAKE_CXX_STANDARD=17 \ From d0602eb1617076039a1824d064041d5df62451a4 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Wed, 21 Jan 2026 18:05:22 +0100 Subject: [PATCH 13/14] compile at higher optimization level --- .github/workflows/linux.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5773058015..d3a0a960e0 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -37,14 +37,14 @@ jobs: export CCACHE_COMPRESS=1 export CCACHE_COMPRESSLEVEL=10 - export CCACHE_MAXSIZE=300M + export CCACHE_MAXSIZE=1G ccache -z pip install -U -e ./tools - export CXXFLAGS="-fsanitize=undefined,address -fno-sanitize-recover=all" + export CXXFLAGS="-g -fsanitize=undefined,address -fno-sanitize-recover=all" cmake -S . -B build \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_BUILD_TYPE=Release \ -DHiPACE_COMPUTE=OMP \ -DCMAKE_CXX_STANDARD=17 \ -DCMAKE_INSTALL_PREFIX=/tmp/my-hipace \ From b7153c4682eaa8f0aca242878c6d5f2450fe2178 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Thu, 22 Jan 2026 11:48:37 +0100 Subject: [PATCH 14/14] meaningless change to test cache --- src/particles/plasma/MultiPlasma.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/particles/plasma/MultiPlasma.H b/src/particles/plasma/MultiPlasma.H index ac95f06a67..99b4a864ef 100644 --- a/src/particles/plasma/MultiPlasma.H +++ b/src/particles/plasma/MultiPlasma.H @@ -1,6 +1,6 @@ /* Copyright 2021-2022 * - * This file is part of HiPACE++. + * This file is part of HiPACE++ . * * Authors: AlexanderSinn, MaxThevenet, Severin Diederichs * License: BSD-3-Clause-LBNL