Closed apontzen closed 3 years ago
Gadget uses a fortran-style file format, with integers saying how long different data blocks are.
By casting a size_t to an int, when this overflowed the behaviour was undefined.
In practice, zeros got written into the fortran length field which did not play nice with pynbody.
Fix by setting fortran field size to numeric_limits::max() in these circumstances, and issuing a warning.
Add an option to split gadget output across multiple files.
Gadget uses a fortran-style file format, with integers saying how long different data blocks are.
By casting a size_t to an int, when this overflowed the behaviour was undefined.
In practice, zeros got written into the fortran length field which did not play nice with pynbody.
Fix by setting fortran field size to numeric_limits::max() in these circumstances, and issuing a warning.
Add an option to split gadget output across multiple files.