Gzip dump files unreadable in the middle of a simulation

usually I use a command like this to create compressed trajectory dump files:

dump dumpName all atom 10000 filename.gz

In most cases this works well. However, the gzip file seems to be unreadable during the simulation (with errors like gzip: filename.gz: unexpected end of file). That means I can’t check the trajectory in the middle of a simulation. It also means if the simulation is terminated halfway (e.g. because of power loss, hardware failure, or I manually terminate it), I have to rerun the whole simulation instead of restarting at the breaking point.

So I’m wondering is there any method to save compressed dump files that are readable during a long simulation, or anyway to fix those “corrupted” gzip files.


The only way I can think of would be to write a new file for every frame, e.g. when you would use the command:

dump dumpName all atom 10000 filename-*.gz

Thanks for the suggestion!