From e1e6bf40954e7cdabac6cc5ab0e44e75d9c549f6 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni Date: Fri, 16 Aug 2024 15:22:33 -0700 Subject: [PATCH] Fix broken tests --- Examples/Tests/collision/CMakeLists.txt | 6 +++--- Examples/Tests/collision/analysis_collision_2d.py | 10 ++++++++-- Examples/Tests/collision/inputs_2d_test_collision_xz | 1 - .../collision/inputs_2d_test_collision_xz_picmi.py | 4 ---- Examples/Tests/collision/inputs_3d_test_collision_xyz | 1 - 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Examples/Tests/collision/CMakeLists.txt b/Examples/Tests/collision/CMakeLists.txt index ae445f91211..fa6bb90c909 100644 --- a/Examples/Tests/collision/CMakeLists.txt +++ b/Examples/Tests/collision/CMakeLists.txt @@ -46,7 +46,7 @@ add_warpx_test( OFF # eb Examples/Tests/collision/inputs_3d_test_collision_xyz # inputs Examples/Tests/collision/analysis_collision_3d.py # analysis - collision_xyz_plt000150 # output + diags/diag1000150 # output ) # collision_xz ################################################################ @@ -58,7 +58,7 @@ add_warpx_test( OFF # eb Examples/Tests/collision/inputs_2d_test_collision_xz # inputs Examples/Tests/collision/analysis_collision_2d.py # analysis - collision_xz_plt000150 # output + diags/diag1000150 # output ) # collision_xz_picmi ########################################################## @@ -70,5 +70,5 @@ add_warpx_test( OFF # eb Examples/Tests/collision/inputs_2d_test_collision_xz_picmi.py # inputs Examples/Tests/collision/analysis_collision_2d.py # analysis - collision_xz_plt000150 # output + diags/diag1000150 # output ) diff --git a/Examples/Tests/collision/analysis_collision_2d.py b/Examples/Tests/collision/analysis_collision_2d.py index 8ef251b0ace..a60fe78c331 100755 --- a/Examples/Tests/collision/analysis_collision_2d.py +++ b/Examples/Tests/collision/analysis_collision_2d.py @@ -35,6 +35,8 @@ sys.path.insert(1, '../../../../warpx/Regression/Checksum/') import checksumAPI +test_name = os.path.split(os.getcwd())[1] + tolerance = 0.001 ng = 64 @@ -61,6 +63,11 @@ # Collect all output files in fn_list (names match pattern prefix + arbitrary number) fn_list = glob.glob(prefix + '*[0-9]') +print(last_fn) +print(last_it) +print(prefix) +print(fn_list) + error = 0.0 nt = 0 for fn in fn_list: @@ -86,7 +93,7 @@ # The second part of the analysis is not done for the Python test # since the particle filter function is not accessible from PICMI yet -if "Python" in last_fn: +if "picmi" in test_name: exit() ## In the second part of the test, we verify that the diagnostic particle filter function works as @@ -110,5 +117,4 @@ post_processing_utils.check_random_filter(last_fn, random_filter_fn, random_fraction, dim, species_name) -test_name = os.path.split(os.getcwd())[1] checksumAPI.evaluate_checksum(test_name, last_fn) diff --git a/Examples/Tests/collision/inputs_2d_test_collision_xz b/Examples/Tests/collision/inputs_2d_test_collision_xz index f2305f48667..69d23dfb0c0 100644 --- a/Examples/Tests/collision/inputs_2d_test_collision_xz +++ b/Examples/Tests/collision/inputs_2d_test_collision_xz @@ -73,7 +73,6 @@ diagnostics.diags_names = diag1 diag_parser_filter diag_uniform_filter diag_rand diag1.intervals = 10 diag1.diag_type = Full diag1.fields_to_plot = Ex Ey Ez Bx By Bz -diag1.file_prefix = collisionXZ_plt ## diag_parser_filter is a diag used to test the particle filter function. diag_parser_filter.intervals = 150:150: diff --git a/Examples/Tests/collision/inputs_2d_test_collision_xz_picmi.py b/Examples/Tests/collision/inputs_2d_test_collision_xz_picmi.py index cbbd6959dab..8848d5d0050 100755 --- a/Examples/Tests/collision/inputs_2d_test_collision_xz_picmi.py +++ b/Examples/Tests/collision/inputs_2d_test_collision_xz_picmi.py @@ -109,16 +109,12 @@ particle_diag = picmi.ParticleDiagnostic( name='diag1', period=10, - write_dir='.', - warpx_file_prefix='collision_xz_picmi_plt' ) field_diag = picmi.FieldDiagnostic( name='diag1', grid=grid, period=10, data_list=[], - write_dir='.', - warpx_file_prefix='collision_xz_picmi_plt' ) ################################# diff --git a/Examples/Tests/collision/inputs_3d_test_collision_xyz b/Examples/Tests/collision/inputs_3d_test_collision_xyz index 8aa0fc3fb7b..11d6b150dd2 100644 --- a/Examples/Tests/collision/inputs_3d_test_collision_xyz +++ b/Examples/Tests/collision/inputs_3d_test_collision_xyz @@ -77,7 +77,6 @@ diagnostics.diags_names = diag1 diag_parser_filter diag_uniform_filter diag_rand diag1.intervals = 10 diag1.diag_type = Full diag1.fields_to_plot = Ex Ey Ez Bx By Bz T_electron T_ion -diag1.file_prefix = collisionXYZ_plt ## diag_parser_filter is a diag used to test the particle filter function. diag_parser_filter.intervals = 150:150: