changeDictionary does not work in parallel with collated I/O system
Summary
changeDictionary does not work in parallel with collated I/O format. In my humble opinion, this should be fixed because the collated format is much more preferable, especially when working with clusters with large number of cores. Usually, there are limitations on clusters with the number of files, and thus collated format is much more effective.
Steps to reproduce
decompose any case you would like in collated format (-fileHandler collated) and then setup an arbitrary changeDictionaryDict and run the utility in parallel, for instance,:
mpirun -np 2 changeDictionary -parallel -fileHandler collated
You will be able to see that the target file is manipulated incorrectly. Although the collated system should write all the processors' information in one file, after running changeDictionary it seems that only one processor's info will remain in the target file.
Example case
The attached test case is a minimal example that shows the problem. The "Allrun" runs fine but "AllrunCollated" throws an error. cavityTable.tar.gz
Environment information
- OpenFOAM version : OpenFOAM-v2112
- Operating system : Ubuntu 18.04, CentOS-7
- Hardware info : Dell PC, A cluster (more info at https://www.nsc.liu.se/systems/tetralith/)
- Compiler : Gcc, Icc