OpenFOAM-5.x/tutorials
Henry Weller 7c301dbff4 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.
2017-07-07 11:39:56 +01:00
..
basic tutorials/basic/potentialFoam: Changed "streamFunction" to "postProcess 2017-06-05 11:47:18 +01:00
combustion fvDOM: renamed "convergence" -> "tolerance" for consistency with the rest of OpenFOAM 2017-05-31 23:12:54 +01:00
compressible rhoPimpleFoam: Improved support for compressible liquids 2017-05-17 17:05:43 +01:00
discreteMethods postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00
DNS/dnsFoam/boxTurb16 tutorials Allrun scripts: Update running of postProcess application 2016-08-02 16:24:28 +01:00
electromagnetics tutorials Allrun scripts: Update running of postProcess application 2016-08-02 16:24:28 +01:00
financial/financialFoam/europeanCall PBiCGStab: New preconditioned bi-conjugate gradient stabilized solver for asymmetric lduMatrices 2016-09-05 11:46:42 +01:00
heatTransfer Parallel IO: New collated file format 2017-07-07 11:39:56 +01:00
incompressible Lagrangian: Rewrite of the particle tracking algorithm to function in 2017-04-28 09:25:10 +01:00
IO/fileHandler Parallel IO: New collated file format 2017-07-07 11:39:56 +01:00
lagrangian tutorials/lagrangian: Added mixedVesselAMI2D 2017-04-28 11:00:31 +01:00
mesh Surface utilities: standardised argument naming and ordering 2017-05-12 14:43:10 +01:00
multiphase compressibleInterFoam: Improved mass conservation 2017-06-22 14:42:36 +01:00
resources/geometry Add the OpenFOAM source tree 2014-12-10 22:40:10 +00:00
stressAnalysis tutorials Allrun scripts: Update running of postProcess application 2016-08-02 16:24:28 +01:00
Allclean scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
Allrun Sprucing up the tutorials folder and adding -dict to "collapseEdges" 2016-03-06 19:06:44 +00:00
Alltest tutorials: Renamed .org -> .orig 2016-04-30 21:53:50 +01:00