diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 7e4edc2dc36..7c71599bbf3 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -18,6 +18,7 @@ jobs: LAPACKPP_HOME: '/usr/local' OMP_NUM_THREADS: 1 WARPX_CI_CCACHE: 'TRUE' + WARPX_CI_CLEAN_TESTS: 'TRUE' WARPX_CI_NUM_MAKE_JOBS: 2 WARPX_CI_OPENPMD: 'TRUE' WARPX_CI_TMP: '/tmp/ci' diff --git a/Regression/Checksum/benchmarks_json/collisionXZ.json b/Regression/Checksum/benchmarks_json/collisionXZ.json index f90c34bc86d..4fcf00ced62 100644 --- a/Regression/Checksum/benchmarks_json/collisionXZ.json +++ b/Regression/Checksum/benchmarks_json/collisionXZ.json @@ -7,20 +7,20 @@ "Ey": 0.0, "Ez": 0.0 }, - "ion": { - "particle_momentum_x": 2.4932317055825563e-19, - "particle_momentum_y": 2.274916403334278e-19, - "particle_momentum_z": 2.2528161767665816e-19, - "particle_position_x": 2648815.601036139, - "particle_position_y": 2662836.7581390506, + "electron": { + "particle_momentum_x": 1.0618161248729303e-19, + "particle_momentum_y": 1.0331186403682394e-19, + "particle_momentum_z": 1.0375409035564829e-19, + "particle_position_x": 2652982.4592067804, + "particle_position_y": 2666143.4238272114, "particle_weight": 1.7256099431746894e+26 }, - "electron": { - "particle_momentum_x": 1.0489203687862582e-19, - "particle_momentum_y": 1.0209657029567292e-19, - "particle_momentum_z": 1.0248962872393911e-19, - "particle_position_x": 2657004.8285825616, - "particle_position_y": 2670174.272797987, + "ion": { + "particle_momentum_x": 2.4479519290953386e-19, + "particle_momentum_y": 2.2313460312794214e-19, + "particle_momentum_z": 2.207395147435577e-19, + "particle_position_x": 2666525.886108531, + "particle_position_y": 2666683.4040517565, "particle_weight": 1.7256099431746894e+26 } } diff --git a/run_test.sh b/run_test.sh index 4efa86eb36c..275b7b5efb0 100755 --- a/run_test.sh +++ b/run_test.sh @@ -16,8 +16,10 @@ # physically correct. # The tests can be influenced by environment variables: +# Use `export WARPX_CI_CLEAN_TESTS=ON` in order to remove all subdirectories +# from each test directory, directly after a test has passed. # Use `export WARPX_CI_DIM=3` or `export WARPX_CI_DIM=2` in order to -# select only the tests that correspond to this dimension +# select only the tests that correspond to this dimension. # Use `export WARPX_TEST_ARCH=CPU` or `export WARPX_TEST_ARCH=GPU` in order # to run the tests on CPU or GPU respectively. @@ -30,6 +32,7 @@ tests_arg=$* tests_run=${tests_arg:+--tests=${tests_arg}} # environment options +WARPX_CI_CLEAN_TESTS=${WARPX_CI_CLEAN_TESTS:-""} WARPX_CI_TMP=${WARPX_CI_TMP:-""} # Remove contents and link to a previous test directory (intentionally two arguments) @@ -80,7 +83,7 @@ curl -sOL https://github.com/openPMD/openPMD-example-datasets/raw/4ba1d257c5b489 cd - # Clone the AMReX regression test utility -git clone https://github.com/AMReX-Codes/regression_testing.git +git clone -b EZoni_rm_testdir https://github.com/EZoni/regression_testing.git # Prepare regression tests mkdir -p rt-WarpX/WarpX-benchmarks @@ -93,12 +96,17 @@ cp -r Checksum ../../regression_testing/ # Run tests cd ../../regression_testing/ echo "cd $PWD" +if [ -z "${WARPX_CI_CLEAN_TESTS}" ]; then + test_rm_dir="" +else + test_rm_dir="--rm_testdir" +fi # run only tests specified in variable tests_arg (single test or multiple tests) if [[ ! -z "${tests_arg}" ]]; then - python3 regtest.py ../rt-WarpX/ci-tests.ini --skip_comparison --no_update all "${tests_run}" + python3 regtest.py ../rt-WarpX/ci-tests.ini ${test_rm_dir} --skip_comparison --no_update all "${tests_run}" # run all tests (variables tests_arg and tests_run are empty) else - python3 regtest.py ../rt-WarpX/ci-tests.ini --skip_comparison --no_update all + python3 regtest.py ../rt-WarpX/ci-tests.ini ${test_rm_dir} --skip_comparison --no_update all fi # clean up python virtual environment