INT: Integration of Mattijs' collocated parallel IO additions
Original commit message: ------------------------ Parallel IO: New collated file format When an OpenFOAM simulation runs in parallel, the data for decomposed fields and mesh(es) has historically been stored in multiple files within separate directories for each processor. Processor directories are named 'processorN', where N is the processor number. This commit introduces an alternative "collated" file format where the data for each decomposed field (and mesh) is collated into a single file, which is written and read on the master processor. The files are stored in a single directory named 'processors'. The new format produces significantly fewer files - one per field, instead of N per field. For large parallel cases, this avoids the restriction on the number of open files imposed by the operating system limits. The file writing can be threaded allowing the simulation to continue running while the data is being written to file. NFS (Network File System) is not needed when using the the collated format and additionally, there is an option to run without NFS with the original uncollated approach, known as "masterUncollated". The controls for the file handling are in the OptimisationSwitches of etc/controlDict: OptimisationSwitches { ... //- Parallel IO file handler // uncollated (default), collated or masterUncollated fileHandler uncollated; //- collated: thread buffer size for queued file writes. // If set to 0 or not sufficient for the file size threading is not used. // Default: 2e9 maxThreadFileBufferSize 2e9; //- masterUncollated: non-blocking buffer size. // If the file exceeds this buffer size scheduled transfer is used. // Default: 2e9 maxMasterFileBufferSize 2e9; } When using the collated file handling, memory is allocated for the data in the thread. maxThreadFileBufferSize sets the maximum size of memory in bytes that is allocated. If the data exceeds this size, the write does not use threading. When using the masterUncollated file handling, non-blocking MPI communication requires a sufficiently large memory buffer on the master node. maxMasterFileBufferSize sets the maximum size in bytes of the buffer. If the data exceeds this size, the system uses scheduled communication. The installation defaults for the fileHandler choice, maxThreadFileBufferSize and maxMasterFileBufferSize (set in etc/controlDict) can be over-ridden within the case controlDict file, like other parameters. Additionally the fileHandler can be set by: - the "-fileHandler" command line argument; - a FOAM_FILEHANDLER environment variable. A foamFormatConvert utility allows users to convert files between the collated and uncollated formats, e.g. mpirun -np 2 foamFormatConvert -parallel -fileHandler uncollated An example case demonstrating the file handling methods is provided in: $FOAM_TUTORIALS/IO/fileHandling The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
Showing
- applications/solvers/electromagnetics/mhdFoam/createPhiB.H 1 addition, 1 deletionapplications/solvers/electromagnetics/mhdFoam/createPhiB.H
- applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H 1 addition, 1 deletionapplications/solvers/heatTransfer/thermoFoam/setAlphaEff.H
- applications/test/CompactIOList/Test-CompactIOList.C 5 additions, 3 deletionsapplications/test/CompactIOList/Test-CompactIOList.C
- applications/test/IOField/Make/files 3 additions, 0 deletionsapplications/test/IOField/Make/files
- applications/test/IOField/Make/options 2 additions, 0 deletionsapplications/test/IOField/Make/options
- applications/test/IOField/Test-IOField.C 189 additions, 0 deletionsapplications/test/IOField/Test-IOField.C
- applications/test/decomposedBlockData/Make/files 3 additions, 0 deletionsapplications/test/decomposedBlockData/Make/files
- applications/test/decomposedBlockData/Make/options 0 additions, 0 deletionsapplications/test/decomposedBlockData/Make/options
- applications/test/decomposedBlockData/Test-decomposedBlockData.C 98 additions, 0 deletions...tions/test/decomposedBlockData/Test-decomposedBlockData.C
- applications/test/surfaceMeshConvert/Test-surfaceMeshConvert.C 4 additions, 2 deletions...cations/test/surfaceMeshConvert/Test-surfaceMeshConvert.C
- applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C 2 additions, 1 deletionapplications/utilities/mesh/advanced/modifyMesh/modifyMesh.C
- applications/utilities/mesh/advanced/selectCells/edgeStats.C 3 additions, 12 deletionsapplications/utilities/mesh/advanced/selectCells/edgeStats.C
- applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C 3 additions, 1 deletion...utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C
- applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C 1 addition, 1 deletion...s/utilities/mesh/conversion/foamToSurface/foamToSurface.C
- applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C 3 additions, 3 deletions...myMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C
- applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C 1 addition, 0 deletions...s/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
- applications/utilities/mesh/manipulation/checkMesh/checkMesh.C 2 additions, 1 deletion...cations/utilities/mesh/manipulation/checkMesh/checkMesh.C
- applications/utilities/mesh/manipulation/checkMesh/checkTools.C 6 additions, 3 deletions...ations/utilities/mesh/manipulation/checkMesh/checkTools.C
- applications/utilities/mesh/manipulation/createPatch/createPatch.C 1 addition, 0 deletions...ons/utilities/mesh/manipulation/createPatch/createPatch.C
- applications/utilities/mesh/manipulation/refineMesh/refineMesh.C 2 additions, 1 deletion...tions/utilities/mesh/manipulation/refineMesh/refineMesh.C
Please register or sign in to comment