-
Notifications
You must be signed in to change notification settings - Fork 200
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
Particle diagnostic swaps particle id's, impossible to recreate trajectories #4908
Comments
Thanks for the ping! I'll take a look if there is a mismatch between |
Thank you for the details! Does the issue appear equally on CPU and GPU? How many MPI ranks did you use, if any? |
Thanks for reporting this @aveksler1 |
I saw this when running on GPU, with 1 MPI rank, and 1 grid. I will check on CPU once it finishes compiling |
Thanks guys! |
It looks like sorting should do the right thing: Continuing search... |
Could it be a GPU race condition in swapping of |
@ax3l Yes, it still shows the issue. |
Verified in parallel: openPMD write uses the correct data set: WarpX/Source/Diagnostics/WarpXOpenPMD.cpp Lines 904 to 909 in c5a5732
|
Just guessing here but could there be a problem with openPMD's ID tracker not disentangling the id and cpu bits appropriately? In the above it still looks like the full idcpu 64 bit number is stored as a single quantity. |
For openPMD, |
I just compiled and ran on CPU ( @roelof-groenewald I think that this excludes the possibility that |
Issue does not show up when running with CPU! both on 1 and 2 MPI ranks. |
@aveksler1 I just compiled for NVIDIA GPU ( I wonder what the difference with your case is. What was the platform that you ran on? Was it an AMD or NVIDIA GPU? |
@RemiLehe @ax3l Sorry to waste your time, my WarpX build was out-dated, I should be better about rebuilding often, especially when facing bugs. It seems like AMReX-Codes/amrex#3890 is likely the fix that I was missing. Thank you all for your help. |
OK, no worries. Thanks for letting us know, and thanks again for reporting potential bugs here. |
After the transition to SoA particle attributes #4653, I am no longer able to recreate particle trajectories using
ParticleDiagnostics
with theopenpmd
backend. Admittedly, I haven't tried other backends, since openpmd-viewer is my main analysis tool.When there are multiple particles, the positions for a given particle id do not always correspond from one iteration to the next. I see this using
openpmd-viewer
'sParticleTracker
, and a clunkier way to reproduce trajectories that isn't shown here.Below is a minimal reproducing example python input script and analysis script. I launch 100 ions starting at different positions (with
do_not_deposit=True
so I have a simple particle tracer) in a uniform magnetic field expecting to see perfect Larmor orbits. The plots below show how some trajectories "jump" around, mapping to another particle's trajectory.analysis.txt
PICMI_inputs_2d.txt
The text was updated successfully, but these errors were encountered: