Hello,
I am using the Einstein Toolkit for cosmological simulations, and would like to ask a question regarding my HDF5 3D output.
Currently I am outputting all 3D snapshots to one HDF5 file (as per default). I would like to have my output as separate files for each time snapshot, to help with ease of copying and visualisation in post processing.
I found the following parameter in IOUtil, and changed it accordingly for a simulation:
IO::out_timesteps_per_file = 1
However this made no difference to my output, I still had multiple time snapshots in the one file.
Is there another way to separate my 3D HDF5 output into one file per snapshot?
Any help anyone can offer would be much appreciated!
Hi Hayley,
Looking at the code, I don't immediately see why it's not working. If you look in the file
in the function OutputVarAs, around line 895, there is the code for outputting a fixed number of timesteps in a given file.
if (out_timesteps_per_file > 0) {
// Round down to nearest multiple of out_timesteps_per_file
int const iter =
cctk_iteration / out_timesteps_per_file * out_timesteps_per_file;
char buffer[32];
snprintf(buffer, sizeof(buffer), ".iter_%d", iter);
filename.append(buffer);
}
Maybe you can add some debugging code to work out whether this code is being executed or not, and why it's not doing the right thing.
Do you get a new file with the ".iter_..." suffix? Are you perhaps looking at an old file without this suffix which was left over from earlier runs?