Skip to content

Write total number of particles to distributed snapshots

John Helly requested to merge numpart_total into master

In distributed snapshots we don't seem to store the total number of particles anywhere except for the awkward NumPart_Total and NumPart_Total_HighWord attributes in the header. It might be nice to have the total number of particles as a 64 bit integer somewhere.

This merge request adds a TotalNumberOfParticles attribute to each particle type group. It's equal to NumberOfParticles for single, serial, and parallel I/O and in the virtual file for distributed snapshots. In distributed snapshots it has the total number of particles over all files. I also noticed that NumberOfParticles was written out using io_write_attribute_l() in some places but the variable passed in is a long long. I don't think that matters on the systems we're using but I've changed it to io_write_attribute_ll().

Edited by Matthieu Schaller

Merge request reports