SGpp / DisCoTec

MPI-based code for distributed HPC simulations with the sparse grid combination technique
https://sparsegrids.org/
GNU Lesser General Public License v3.0
8 stars 6 forks source link

The statistics files are only written by the root MPI process. #114

Closed PhilippOffenhaeuser closed 11 months ago

PhilippOffenhaeuser commented 11 months ago

Benchmarks have shown that it takes a long time to open the statistics files with a large number of MPI ranks. To reduce the number of metadata operations, the root process of each group collects the data. Then, only the root process of each group writes the statistics file.

freifrauvonbleifrei commented 11 months ago

@PhilippOffenhaeuser cool, thx for the feature! since it is very custom to the stats/json files and uses no MPI-IO, I think the function should either live in the Stats.hpp header or in a new one, src/io/PlainIO.hpp maybe? Also I think it should have a name without stats/json (actually, it gathers strings to be written by the root process, right?).

freifrauvonbleifrei commented 11 months ago

Closing in favor of #116 !