Reply To: Storing data in a csv file error (running code in parallel)
OpenLB – Open Source Lattice Boltzmann Code › Forums › on OpenLB › General Topics › Storing data in a csv file error (running code in parallel) › Reply To: Storing data in a csv file error (running code in parallel)
July 19, 2021 at 10:10 pm
#5823
Adrian
Keymaster
The snippet performs filesystem write operations using std::ofstream. As far as I can tell without seeing the full code, this is not restricted to the rank 0 process (where the reduced data is communicated to by BlockReduction2D2D). Thus all processes execute this the std::ofstream code and write to the same file. When using e.g. OpenLB’s default VTK writer this is resolved transparently in the background.