Skip to content

int32 overflow for particle checkpointing fixed#218

Open
Alcauchy wants to merge 1 commit into
masterfrom
bug/particle_checkpoint
Open

int32 overflow for particle checkpointing fixed#218
Alcauchy wants to merge 1 commit into
masterfrom
bug/particle_checkpoint

Conversation

@Alcauchy

Copy link
Copy Markdown
Collaborator
  • If a simulation has a large amount of particles, npart>2^32-1 (e.g., for a 40 000 x 40 000 simulation with ppc=16) would lead to overflow in nout_total, nout_offset, npart_total, npart_offset using npart_t during checkpoint writing, corrupting checkpoint data (see screenshot of density field attached).
  • This is fixed by declaring the variables mentioned above as std::size_t at particle_io.cpp.
  • The fix was tested on frontier with 40000x40000 simulation, and now the data is saved correctly.
Screenshot_20260626_043848

@Alcauchy Alcauchy requested a review from haykh June 29, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant