Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using particle fields , RZ geometry and Openpmd outputs #5659

Open
PhysicsDan opened this issue Feb 11, 2025 · 1 comment
Open
Assignees
Labels
bug Something isn't working component: diagnostics all types of outputs component: openPMD openPMD I/O geometry: RZ axisymmetric 2D and quasi-3D

Comments

@PhysicsDan
Copy link
Contributor

PhysicsDan commented Feb 11, 2025

Description

Particle Fields do not work when using the openpmd backend in RZ geometry
(Only tested using the precompiled executable from conda)

Minimal Example

When adding the snippet

diag1.particle_fields_to_plot = z
diag1.particle_fields_species = electrons beam
diag1.particle_fields.z(x,y,z,ux,uy,uz) = z

to
inputs_test_rz_laser_acceleration_opmd
The code instantly fails with the error

Initializing AMReX (25.02)...
OMP initialized with 8 OMP threads
AMReX (25.02) initialized
PICSAR (25.01)
WarpX (Unknown)

    __        __             __  __
    \ \      / /_ _ _ __ _ __\ \/ /
     \ \ /\ / / _` | '__| '_ \\  /
      \ V  V / (_| | |  | |_) /  \
       \_/\_/ \__,_|_|  | .__/_/\_\
                        |_|

Level 0: dt = 1.72851157e-16 ; dx = 1.171875e-07 ; dz = 6.640625e-08
0::Assertion `ncomp_from_src == m_varnames.size()' failed, file "/Users/runner/miniforge3/conda-bld/warpx_1738873300730/work/Source/Diagnostics/FullDiagnostics.cpp", line 540 !!!
SIGABRT
See Backtrace.0.0 file for details

Backtrace

 0: amrex::BLBackTrace::print_backtrace_info(__sFILE*) (in libamrex_2d.dylib) + 64

 1: amrex::BLBackTrace::handler(int) (in libamrex_2d.dylib) + 640

 2: amrex::Assert_host(char const*, char const*, int, char const*) (in libamrex_2d.dylib) + 268

 3: FullDiagnostics::InitializeFieldFunctorsRZopenPMD(int) (in warpx.rz) + 7260

 4: Diagnostics::InitData() (in warpx.rz) + 152

 5: MultiDiagnostics::InitData() (in warpx.rz) + 32

 6: WarpX::InitData() (in warpx.rz) + 776

 7: main (in warpx.rz) + 76

 8: start (in dyld) + 2840


===== TinyProfilers ======
main()
WarpX::InitData()

However, when the snippet is added to this file (i.e. the same simulation but using the plotfile output type), there us no error
inputs_test_rz_laser_acceleration

Note, this is also not an issue in cartesian geometry as WarpX/Examples/Tests/particle_fields_diags also runs without any issue.

System information

MacOS 15.3
WarpX 25.02 via Conda

@PhysicsDan PhysicsDan added the bug Something isn't working label Feb 11, 2025
@ax3l ax3l added component: openPMD openPMD I/O component: diagnostics all types of outputs geometry: RZ axisymmetric 2D and quasi-3D labels Feb 14, 2025
@ax3l
Copy link
Member

ax3l commented Feb 14, 2025

Hi @PhysicsDan , thanks for the report!

Did you test if this still worked with 25.01? If yes, it's likely a regression to #5481

@ax3l ax3l self-assigned this Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: diagnostics all types of outputs component: openPMD openPMD I/O geometry: RZ axisymmetric 2D and quasi-3D
Projects
None yet
Development

No branches or pull requests

2 participants