openfoam/applications/utilities/mesh/conversion
Andrew Heather d8d6030ab6 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.
2017-07-07 11:39:56 +01:00
..
ansysToFoam ENH: make treatment of stream allocators more uniform (issue #532) 2017-07-17 15:14:38 +02:00
ccm ENH: consolidate, cleanup some string methods 2017-08-02 12:33:35 +02:00
cfx4ToFoam BUG: polyMesh removeFiles side-effect for blockMesh viewer (issue #346) 2016-12-15 19:07:05 +01:00
datToFoam COMP: intel compiler issues with operator ""_deg (fixes #544) 2017-07-21 16:40:31 +02:00
fireToFoam STYLE: eliminate duplicate includes (issue #293) 2017-07-17 14:44:05 +02:00
fluent3DMeshToFoam STYLE: use string substr instead of string::operator() 2017-07-21 12:30:42 +02:00
fluentMeshToFoam ENH: make treatment of stream allocators more uniform (issue #532) 2017-07-17 15:14:38 +02:00
foamMeshToFluent ENH: make treatment of stream allocators more uniform (issue #532) 2017-07-17 15:14:38 +02:00
foamToFireMesh ENH: add input surface scaling (issue #514) 2017-08-14 09:18:15 +02:00
foamToStarMesh INT: Integration of Mattijs' collocated parallel IO additions 2017-07-07 11:39:56 +01:00
foamToSurface INT: Integration of Mattijs' collocated parallel IO additions 2017-07-07 11:39:56 +01:00
gambitToFoam ENH: consolidate, cleanup some string methods 2017-08-02 12:33:35 +02:00
gmshToFoam ENH: consolidate, cleanup some string methods 2017-08-02 12:33:35 +02:00
ideasUnvToFoam ENH: consolidate, cleanup some string methods 2017-08-02 12:33:35 +02:00
kivaToFoam COMP: intel compiler issues with operator ""_deg (fixes #544) 2017-07-21 16:40:31 +02:00
mshToFoam ENH: increase precision of points for some mesh conversion applications 2016-12-15 21:35:14 +01:00
netgenNeutralToFoam ENH: increase precision of points for some mesh conversion applications 2016-12-15 21:35:14 +01:00
Optional Merge remote-tracking branch 'origin/master' into develop 2017-04-04 16:15:10 +02:00
plot3dToFoam MRG: Integrated Foundation code to commit 47bd8e1 2017-03-23 10:12:38 +00:00
star4ToFoam ENH: relocate triSurface classes into surfMesh library (issue #294) 2017-05-18 10:42:05 +02:00
tetgenToFoam ENH: increase precision of points for some mesh conversion applications 2016-12-15 21:35:14 +01:00
vtkUnstructuredToFoam ENH: increase precision of points for some mesh conversion applications 2016-12-15 21:35:14 +01:00
writeMeshObj GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00