threaded collated writing (maxThreadFileBufferSize) fails at end of run
Summary
Sometimes (slow disks) at the end of a run with collated+threaded it fails with sigsegv.
Steps to reproduce
Take case (e.g. cavity), make mesh bigger and time step smaller. Change to write every timestep. Switch on threaded writing and collated. On machines with slow IO the processor0 will finish with an error (sigsegv).
Example case
See above. All depends on how slow the IO is.
What is the current bug behaviour?
See above.
Environment information
- OpenFOAM version : v2106
- Operating system : linux
- Hardware info :
- Compiler :
Possible fixes
Threaded writing uses a write thread. This gets passed all the data to write and it is now responsible for deleting the data after writing. This means that even e.g. header information cannot get passed in by reference since it might be out of scope when the writer is still writing.