Skip to content

Commit

Permalink
CMake: Simplify add_warpx_test
Browse files Browse the repository at this point in the history
EB is not mutually exclusive anymore: we can run non-EB tests
with EB compiled in.
  • Loading branch information
ax3l committed Sep 6, 2024
1 parent aecfa43 commit a2c4511
Show file tree
Hide file tree
Showing 85 changed files with 4 additions and 286 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/source/check_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# skip lines related to other function arguments
# NOTE: update range call to reflect changes
# in the interface of 'add_warpx_test'
for _ in range(3):
for _ in range(2): # skip over: dims, numprocs
next(f)
# strip leading whitespaces, remove end-of-line comments
testinput = next(f).lstrip().split(" ")[0]
Expand Down
4 changes: 0 additions & 4 deletions Docs/source/developers/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ A new test can be added by adding a corresponding entry in ``CMakeLists.txt`` as
test_1d_laser_acceleration # name
1 # dims
2 # nprocs
OFF # eb
inputs_test_1d_laser_acceleration # inputs
analysis.py # analysis
diags/diag1000100 # output (plotfile)
Expand All @@ -118,7 +117,6 @@ A new test can be added by adding a corresponding entry in ``CMakeLists.txt`` as
test_2d_laser_acceleration_picmi # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_laser_acceleration_picmi.py # inputs
analysis.py # analysis
diags/diag1000100 # output (plotfile)
Expand All @@ -133,7 +131,6 @@ A new test can be added by adding a corresponding entry in ``CMakeLists.txt`` as
test_3d_laser_acceleration_restart # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_laser_acceleration_restart # inputs
analysis_default_restart.py # analysis
diags/diag1000100 # output (plotfile)
Expand All @@ -150,7 +147,6 @@ A new test can be added by adding a corresponding entry in ``CMakeLists.txt`` as
test_rz_laser_acceleration_picmi # name
RZ # dims
2 # nprocs
OFF # eb
"inputs_test_rz_laser_acceleration_picmi.py --test --dir 1" # inputs
analysis.py # analysis
diags/diag1/ # output (openPMD time series)
Expand Down
13 changes: 0 additions & 13 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ endif()
# name: unique name of this test
# dims: 1,2,RZ,3
# nprocs: 1 or 2 (maybe refactor later on to just depend on WarpX_MPI)
# eb: needs EB support? (temporary until handled as runtime parameter)
# inputs: inputs file or PICMI script, WarpX_MPI decides w/ or w/o MPI
# analysis: analysis script, always run without MPI
# output: output file(s) to analyze
Expand All @@ -30,7 +29,6 @@ function(add_warpx_test
name
dims
nprocs
eb
inputs
analysis
output
Expand All @@ -42,17 +40,6 @@ function(add_warpx_test
return()
endif()

# cannot run EB tests w/o EB build
if(eb AND NOT WarpX_EB)
message(WARNING "${name}: cannot run EB tests without EB build")
return()
endif()

# do not run no-EB tests w/ EB build
if(NOT eb AND WarpX_EB)
return()
endif()

# cannot run tests with unsupported geometry
if(NOT dims IN_LIST WarpX_DIMS)
return()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_warpx_test(
test_3d_beam_beam_collision # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_beam_beam_collision # inputs
analysis_default_openpmd_regression.py # analysis
diags/diag1/ # output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_warpx_test(
test_1d_background_mcc_picmi # name
1 # dims
2 # nprocs
OFF # eb
"inputs_base_1d_picmi.py --test --pythonsolver" # inputs
analysis_1d.py # analysis
diags/diag1000050 # output
Expand All @@ -16,7 +15,6 @@ add_warpx_test(
test_1d_dsmc_picmi # name
1 # dims
2 # nprocs
OFF # eb
"inputs_base_1d_picmi.py --test --dsmc" # inputs
analysis_dsmc.py # analysis
diags/diag1000050 # output
Expand All @@ -27,7 +25,6 @@ add_warpx_test(
test_2d_background_mcc # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_background_mcc # inputs
analysis_default_regression.py # analysis
diags/diag1000050 # output
Expand All @@ -39,8 +36,7 @@ add_warpx_test(
# test_2d_background_mcc_dp_psp # name
# 2 # dims
# 2 # nprocs
# OFF # eb
# inputs_test_2d_background_mcc_dp_psp # inputs
## inputs_test_2d_background_mcc_dp_psp # inputs
# analysis_default_regression.py # analysis
# diags/diag1000050 # output
# OFF # dependency
Expand All @@ -50,7 +46,6 @@ add_warpx_test(
test_2d_background_mcc_picmi # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_background_mcc_picmi.py # inputs
analysis_2d.py # analysis
diags/diag1000050 # output
Expand Down
14 changes: 0 additions & 14 deletions Examples/Physics_applications/laser_acceleration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_warpx_test(
test_1d_laser_acceleration # name
1 # dims
2 # nprocs
OFF # eb
inputs_test_1d_laser_acceleration # inputs
analysis_default_regression.py # analysis
diags/diag1000100 # output
Expand All @@ -16,7 +15,6 @@ add_warpx_test(
test_1d_laser_acceleration_fluid # name
1 # dims
2 # nprocs
OFF # eb
inputs_test_1d_laser_acceleration_fluid # inputs
analysis_1d_fluid.py # analysis
diags/diag1040000 # output
Expand All @@ -27,7 +25,6 @@ add_warpx_test(
test_1d_laser_acceleration_fluid_boosted # name
1 # dims
2 # nprocs
OFF # eb
inputs_test_1d_laser_acceleration_fluid_boosted # inputs
analysis_1d_fluid_boosted.py # analysis
diags/diag1000001 # output
Expand All @@ -38,7 +35,6 @@ add_warpx_test(
test_1d_laser_acceleration_picmi # name
1 # dims
2 # nprocs
OFF # eb
inputs_test_1d_laser_acceleration_picmi.py # inputs
analysis_default_regression.py # analysis
diags/diag1000100 # output
Expand All @@ -49,7 +45,6 @@ add_warpx_test(
test_2d_laser_acceleration_boosted # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_laser_acceleration_boosted # inputs
analysis_default_regression.py # analysis
diags/diag1000002 # output
Expand All @@ -60,7 +55,6 @@ add_warpx_test(
test_2d_laser_acceleration_mr # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_laser_acceleration_mr # inputs
analysis_default_regression.py # analysis
diags/diag1000200 # output
Expand All @@ -71,7 +65,6 @@ add_warpx_test(
test_2d_laser_acceleration_mr_picmi # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_laser_acceleration_mr_picmi.py # inputs
analysis_default_regression.py # analysis
diags/diag1000200 # output
Expand All @@ -82,7 +75,6 @@ add_warpx_test(
test_2d_refined_injection # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_refined_injection # inputs
analysis_refined_injection.py # analysis
diags/diag1000200 # output
Expand All @@ -93,7 +85,6 @@ add_warpx_test(
test_3d_laser_acceleration # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_laser_acceleration # inputs
analysis_default_openpmd_regression.py # analysis
diags/diag1/ # output
Expand All @@ -104,7 +95,6 @@ add_warpx_test(
test_3d_laser_acceleration_picmi # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_laser_acceleration_picmi.py # inputs
analysis_default_regression.py # analysis
diags/diag1000100 # output
Expand All @@ -115,7 +105,6 @@ add_warpx_test(
test_3d_laser_acceleration_single_precision_comms # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_laser_acceleration_single_precision_comms # inputs
analysis_default_openpmd_regression.py # analysis
diags/diag1/ # output
Expand All @@ -126,7 +115,6 @@ add_warpx_test(
test_rz_laser_acceleration # name
RZ # dims
2 # nprocs
OFF # eb
inputs_test_rz_laser_acceleration # inputs
analysis_default_regression.py # analysis
diags/diag1000010 # output
Expand All @@ -137,7 +125,6 @@ add_warpx_test(
test_rz_laser_acceleration_opmd # name
RZ # dims
2 # nprocs
OFF # eb
inputs_test_rz_laser_acceleration_opmd # inputs
analysis_openpmd_rz.py # analysis
diags/diag1/ # output
Expand All @@ -148,7 +135,6 @@ add_warpx_test(
test_rz_laser_acceleration_picmi # name
RZ # dims
2 # nprocs
OFF # eb
inputs_test_rz_laser_acceleration_picmi.py # inputs
analysis_default_regression.py # analysis
diags/diag1000010 # output
Expand Down
2 changes: 0 additions & 2 deletions Examples/Physics_applications/laser_ion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_warpx_test(
test_2d_laser_ion_acc # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_laser_ion_acc # inputs
analysis_default_openpmd_regression.py # analysis
diags/diag1/ # output
Expand All @@ -16,7 +15,6 @@ add_warpx_test(
test_2d_laser_ion_acc_picmi # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_laser_ion_acc_picmi.py # inputs
analysis_default_openpmd_regression.py # analysis
diags/diag1/ # output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_warpx_test(
test_1d_plasma_acceleration_picmi # name
1 # dims
2 # nprocs
OFF # eb
inputs_test_1d_plasma_acceleration_picmi.py # inputs
analysis_default_regression.py # analysis
diags/diag1001000 # output
Expand All @@ -16,7 +15,6 @@ add_warpx_test(
test_2d_plasma_acceleration_boosted # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_plasma_acceleration_boosted # inputs
analysis_default_regression.py # analysis
diags/diag1000020 # output
Expand All @@ -27,7 +25,6 @@ add_warpx_test(
test_2d_plasma_acceleration_mr # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_plasma_acceleration_mr # inputs
analysis_default_regression.py # analysis
diags/diag1000400 # output
Expand All @@ -38,7 +35,6 @@ add_warpx_test(
test_2d_plasma_acceleration_mr_momentum_conserving # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_plasma_acceleration_mr_momentum_conserving # inputs
analysis_default_regression.py # analysis
diags/diag1000400 # output
Expand All @@ -49,7 +45,6 @@ add_warpx_test(
test_3d_plasma_acceleration_boosted # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_plasma_acceleration_boosted # inputs
analysis_default_regression.py # analysis
diags/diag1000005 # output
Expand All @@ -60,7 +55,6 @@ add_warpx_test(
test_3d_plasma_acceleration_boosted_hybrid # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_plasma_acceleration_boosted_hybrid # inputs
analysis_default_regression.py # analysis
diags/diag1000025 # output
Expand All @@ -71,7 +65,6 @@ add_warpx_test(
test_3d_plasma_acceleration_mr_picmi # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_plasma_acceleration_mr_picmi.py # inputs
analysis_default_regression.py # analysis
diags/diag1000002 # output
Expand All @@ -82,7 +75,6 @@ add_warpx_test(
test_3d_plasma_acceleration_picmi # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_plasma_acceleration_picmi.py # inputs
analysis_default_regression.py # analysis
diags/diag1000010 # output
Expand Down
1 change: 0 additions & 1 deletion Examples/Physics_applications/plasma_mirror/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_warpx_test(
test_2d_plasma_mirror # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_plasma_mirror # inputs
analysis_default_regression.py # analysis
diags/diag1000020 # output
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ add_warpx_test(
test_rz_spacecraft_charging_picmi # name
RZ # dims
2 # nprocs
ON # eb
inputs_test_rz_spacecraft_charging_picmi.py # inputs
analysis.py # analysis
diags/diag1/ # output
Expand Down
3 changes: 0 additions & 3 deletions Examples/Physics_applications/uniform_plasma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_warpx_test(
test_2d_uniform_plasma # name
2 # dims
2 # nprocs
OFF # eb
inputs_test_2d_uniform_plasma # inputs
analysis_default_regression.py # analysis
diags/diag1000010 # output
Expand All @@ -16,7 +15,6 @@ add_warpx_test(
test_3d_uniform_plasma # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_uniform_plasma # inputs
analysis_default_regression.py # analysis
diags/diag1000010 # output
Expand All @@ -27,7 +25,6 @@ add_warpx_test(
test_3d_uniform_plasma_restart # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_uniform_plasma_restart # inputs
analysis_default_restart.py # analysis
diags/diag1000010 # output
Expand Down
3 changes: 0 additions & 3 deletions Examples/Tests/accelerator_lattice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_warpx_test(
test_3d_hard_edged_quadrupoles # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_hard_edged_quadrupoles # inputs
analysis.py # analysis
diags/diag1000050 # output
Expand All @@ -16,7 +15,6 @@ add_warpx_test(
test_3d_hard_edged_quadrupoles_boosted # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_hard_edged_quadrupoles_boosted # inputs
analysis.py # analysis
diags/diag1000050 # output
Expand All @@ -27,7 +25,6 @@ add_warpx_test(
test_3d_hard_edged_quadrupoles_moving # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_hard_edged_quadrupoles_moving # inputs
analysis.py # analysis
diags/diag1000050 # output
Expand Down
1 change: 0 additions & 1 deletion Examples/Tests/boosted_diags/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_warpx_test(
test_3d_laser_acceleration_btd # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_laser_acceleration_btd # inputs
analysis.py # analysis
diags/diag1000003 # output
Expand Down
1 change: 0 additions & 1 deletion Examples/Tests/boundaries/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ add_warpx_test(
test_3d_particle_boundaries # name
3 # dims
2 # nprocs
OFF # eb
inputs_test_3d_particle_boundaries # inputs
analysis.py # analysis
diags/diag1000008 # output
Expand Down
Loading

0 comments on commit a2c4511

Please sign in to comment.