- 22 Sep, 2017 2 commits
-
-
-
Andrew Heather authored
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.
-
- 21 Jul, 2017 1 commit
-
-
Mark OLESEN authored
- makes the purpose clearer. In some places, string::resize() is even simpler. - use C++11 string::back() in preference to str[str.size()-1]
-
- 18 Jul, 2017 1 commit
-
-
Mark OLESEN authored
- use allocator class to wrap the stream pointers instead of passing them into ISstream, OSstream and using a dynamic cast to delete then. This is especially important if we will have a bidirectional stream (can't delete twice!). STYLE: - file stream constructors with std::string (C++11) - for rewind, explicit about in|out direction. This is not currently important, but avoids surprises with any future bidirectional access. - combined string streams in StringStream.H header. Similar to <sstream> include that has both input and output string streams.
-
- 26 Jun, 2017 1 commit
-
-
Mark OLESEN authored
- disable automatically upgrading copyrights in files since changes to not automatically imply a change in copyright. Eg, fixing a typo in comments, or changing a variable from 'loopI' to 'loopi' etc.
-
- 30 May, 2017 1 commit
-
-
Mark OLESEN authored
-
- 26 May, 2017 1 commit
-
-
Mark OLESEN authored
-
- 27 Apr, 2017 1 commit
-
-
Andrew Heather authored
-
- 31 Mar, 2017 1 commit
-
-
mark authored
- ensure proper and sensible handling of empty names. Eg, isDir(""), isFile("") are no-ops, and avoid file-stat - rmDir: * optional 'silent' option to suppress messages. * removes all possible sub-entries, instead of just giving up on the first problem encountered. - reduced code duplication in etcFiles ENH: provide WM_USER_RESOURCE_DIRNAME define (in foamVersion.H) - this is still a hard-coded value, but at least centrally available
-
- 10 Mar, 2017 1 commit
-
-
mark authored
- was previously only within string expansions, but cover dictionaries as well for consistency ENH: replace the never-used fileName::caseName() functionality - stringOps::inplaceReplaceVar() is more general stringOps::inplaceReplaceVar(myfile, "FOAM_CASE"); STYLE: relax parameter passing when calling some POSIX 'query' functions. - A std::string is sufficient since the functions use a plain C-string. Eg, getEnv("SOMETHING"). Retain more stringent Foam::word for things like setEnv, since this could be useful.
-
- 25 Nov, 2016 2 commits
-
-
Henry Weller authored
-
Henry Weller authored
fileModificationSkew: now a floating-point number to support sub-second specification. Patch contributed by Mattijs Janssens
-
- 05 Aug, 2016 1 commit
-
-
Henry Weller authored
Requires gcc version 4.7 or higher
-
- 18 Jul, 2016 1 commit
-
-
mark authored
The normal library system() command uses 'fork', which causes problems on IB+OPENMPI. STYLE: add Foam:: qualifier to system calls to make them easier to spot.
-
- 05 Jul, 2016 1 commit
-
-
mattijs authored
Links are followed in most cases, with some notable exceptions: - mv, mvBak: renames the link, not the underlying file/directory - rmDir: remove the symlink to a directory, does not recurse into the underlying directory
-
- 28 May, 2016 1 commit
-
-
Henry Weller authored
'findEtcFiles' moved from OSspecific to 'etcFiles' as it is not OS-specific
-
- 29 Feb, 2016 2 commits
-
-
Henry Weller authored
-
Henry Weller authored
-
- 13 Dec, 2015 1 commit
-
-
Henry Weller authored
Starting from an initial buffer size of 256 it is incremented in steps of 256 upto the maximum of 4096 as required. Based on patch provided by Bruno Santos Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1944
-
- 11 Nov, 2015 1 commit
-
-
Henry Weller authored
Avoids the clutter and maintenance effort associated with providing the function signature string.
-
- 03 Feb, 2015 1 commit
-
-
Henry authored
Causes problems if the controlDict contains # entries
-
- 01 Feb, 2015 2 commits
-
-
Henry authored
-
Henry authored
in particular to pick-up the DebugSwitches from system/controlDict at global construction time. Disadvantage is that system/controlDict is only picked-up if the OpenFOAM application is executed IN the case directory. The directory provided by the -case option is not yet known as the arguments have not yet been parsed.
-
- 10 Dec, 2014 1 commit
-
-
Henry authored
-