1. 22 Sep, 2017 2 commits
    • Henry Weller's avatar
      fileOperation: Corrected processor counting for moving mesh cases · 18874f00
      Henry Weller authored and Andrew Heather's avatar Andrew Heather committed
    • Andrew Heather's avatar
      INT: Integration of Mattijs' collocated parallel IO additions · 85f12ff5
      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
      The controls for the file handling are in the OptimisationSwitches of
          //- 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:
      The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
  2. 21 Jul, 2017 1 commit
  3. 18 Jul, 2017 1 commit
    • Mark OLESEN's avatar
      ENH: make treatment of stream allocators more uniform (issue #532) · c12ca2b3
      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!).
      - 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
  4. 26 Jun, 2017 1 commit
  5. 30 May, 2017 1 commit
  6. 26 May, 2017 1 commit
  7. 27 Apr, 2017 1 commit
  8. 31 Mar, 2017 1 commit
    • mark's avatar
      ENH: various general improvments to the POSIX functions · 3a4038b2
      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
  9. 10 Mar, 2017 1 commit
    • mark's avatar
      ENH: support default/alternate values for env-vars in dictionary lookup · 20e50caf
      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.
  10. 25 Nov, 2016 2 commits
  11. 05 Aug, 2016 1 commit
  12. 18 Jul, 2016 1 commit
  13. 05 Jul, 2016 1 commit
    • mattijs's avatar
      ENH: OSspecific - softlink handling (fixes #164) · d1c49285
      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
  14. 28 May, 2016 1 commit
  15. 29 Feb, 2016 2 commits
  16. 13 Dec, 2015 1 commit
  17. 11 Nov, 2015 1 commit
  18. 03 Feb, 2015 1 commit
  19. 01 Feb, 2015 2 commits
    • Henry's avatar
      Updated header · d9b1ea4d
      Henry authored
    • Henry's avatar
      POSIX/debug: Add ./system on the list of etc directories · d77218b4
      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.
  20. 10 Dec, 2014 1 commit