Skip to content
Snippets Groups Projects
  1. May 23, 2024
  2. May 22, 2024
  3. May 20, 2024
  4. May 18, 2024
  5. May 08, 2024
  6. May 07, 2024
    • Andrew Heather's avatar
      Merge branch 'update-Pstream-large-sends' into 'develop' · 4fb85d1f
      Andrew Heather authored
      ENH: improve handling of multi-pass send/recv
      
      See merge request Development/openfoam!680
      4fb85d1f
    • Mark OLESEN's avatar
      ENH: improve handling of multi-pass send/recv (#3152) · d9c73ae4
      Mark OLESEN authored
      - the maxCommsSize variable is used to 'chunk' large data transfers
        (eg, with PstreamBuffers) into a multi-pass send/recv sequence.
      
        The send/recv windows for chunk-wise transfers:
      
            iter    data window
            ----    -----------
            0       [0, 1*chunk]
            1       [1*chunk, 2*chunk]
            2       [2*chunk, 3*chunk]
            ...
      
        Since we mostly send/recv in bytes, the current internal limit
        for MPI counts (INT_MAX) can be hit rather quickly.
      
        The chunking limit should thus also be INT_MAX, but since it is
        rather tedious to specify such large numbers, can instead use
      
            maxCommsSize = -1
      
        to specify (INT_MAX-1) as the limit.
        The default value of maxCommsSize = 0 (ie, no chunking).
      
      Note
      ~~~~
        In previous versions, the number of chunks was determined by the
        sender sizes. This required an additional MPI_Allreduce to establish
        an overall consistent number of chunks to walk. This additional
        overhead each time meant that maxCommsSize was rarely actually
        enabled.
      
        We can, however, instead rely on the send/recv buffers having been
        consistently sized and simply walk through the local send/recvs until
        no further chunks need to be exchanged. As an additional enhancement,
        the message tags are connected to chunking iteration, which allows
        the setup of all send/recvs without an intermediate Allwait.
      
      ENH: extend UPstream::probeMessage to use int64 instead of int for sizes
      d9c73ae4
    • Mark OLESEN's avatar
      STYLE: use Perr instead of Pout for UPstream::debug and warnComm · e15d696a
      Mark OLESEN authored
      - avoids polluting standard output for utilities such as
        foamDictionary etc
      e15d696a
  7. May 06, 2024
    • Mark OLESEN's avatar
      ENH: add single-time handling to timeSelector · dbfd1f90
      Mark OLESEN authored
      - the timeSelector is often used to select single or multiple times
        (eg, for post-processing). However, there are a few applications
        where only a *single* time should be selected and set.
      
        These are now covered by this type of use:
      
            timeSelector::addOptions_singleTime();  // Single-time options
            ...
            // Allow override of time from specified time options, or no-op
            timeSelector::setTimeIfPresent(runTime, args);
      
         In some cases, if can be desirable to force starting from the
         initial Time=0 when no time options have been specified:
      
            // Set time from specified time options, or force start from Time=0
            timeSelector::setTimeIfPresent(runTime, args, true);
      
         These changes make a number of includes redundant:
      
           * addTimeOptions.H
           * checkConstantOption.H
           * checkTimeOption.H
           * checkTimeOptions.H
           * checkTimeOptionsNoConstant.H
      
      ENH: add time handling to setFields, setAlphaField (#3143)
      
          Co-authored-...
      dbfd1f90
  8. May 02, 2024
  9. Apr 29, 2024
  10. Apr 25, 2024
  11. Apr 24, 2024
    • mattijs's avatar
      690d02f9
    • Mattijs Janssens's avatar
      Merge branch 'update-fvsPatchFields-mappers' into 'develop' · 31b74cd6
      Mattijs Janssens authored
      Fix fvsPatchFields reading/writing the "value" entry
      
      See merge request !679
      31b74cd6
    • Mark OLESEN's avatar
      ENH: improve code consistency for {cell,face,point}Mapper (#3147) · f04ccef5
      Mark OLESEN authored
      - robuster and more reliable determination of inserted objects
        (previous code could produce false positives).
      
        Now also determine the number of inserted objects within the
        constructor (instead of simply storing a bool). This allows reuse
        in the address calculations to reduce overheads there.
      
      BUG: dodgy short-circuit logic for insertedObjectLabels()
      
      - as a quick short-circuit it previously created as demand-driven
        pointer with a zero elements. However, this meant that if this code
        was called first (before any other addressing), subsequent calls to
        the addressing would fail.
      
      BUG: bad logic and lookup for faAreaMapper (#3147)
      
      - was using labelHashSet but returning a bool and set using the
        addressing using the unfiltered objects!
        This is a latent bug since interpolated/inserted faces not
        currently supported anyhow.
      
      ENH: use std::unique_ptr for demand-driven data
      f04ccef5
    • Mark OLESEN's avatar
      BUG: fvsPatchFields reading/writing the "value" entry (fixes #3144) · 8a8b5db9
      Mark OLESEN authored
      - manual revert for 44d0fbd5.
      
        Unless required for post-processing the "value" entry should not
        written if it is not mandatory for reading.
      
        This is especially crucial with an 'empty' patch field where the
        field (size 0) has a different size from the patch.
      
      - the changes made align fvsPatchField behaviour with fvPatchField
      8a8b5db9
  12. Apr 23, 2024
    • Mark OLESEN's avatar
    • Mark OLESEN's avatar
      ENH: adjust return type for token compound factory method · 411ac5fc
      Mark OLESEN authored
      - return autoPtr<token::compound> instead of the derived type,
        otherwise cannot easily construct a token from it
      
      ENH: additional typed version of refCompoundToken()
      
      - symmetric with typed version of transferCompoundToken()
        and isCompound()
      
      - add ITstream::findCompound<Type>() method.
        Useful for searching within token streams
      411ac5fc
    • Mark OLESEN's avatar
    • Andrew Heather's avatar
      Merge branch 'update-argList-mpi-startup' into 'develop' · 3874c131
      Andrew Heather authored
      reduce communication argList at startup
      
      See merge request !678
      3874c131
    • Mark OLESEN's avatar
      ENH: stricter handling when freeing communicator components · 09377471
      Mark OLESEN authored
      - previously automatically skipped the first communicator (which was
        assumed to be MPI_COMM_WORLD), but now simply rely on the
        internal pendingMPIFree_ to track which communicators have actually
        been allocated.
      09377471
    • Mark OLESEN's avatar
      ENH: add wrapped accessor for MPI_Comm · 2889dc72
      Mark OLESEN authored
      - UPstream::Communicator is similar to UPstream::Request to
        wrap/unwrap MPI_Comm. Provides a 'lookup' method to transcribe
        the internal OpenFOAM communicator tracking to the opaque wrapped
        version.
      
      - provide an 'openfoam_mpi.H' interfacing file, which includes
        the <mpi.h> as well as casting routines.
      
        Example (caution: ugly!)
      
           MPI_Comm myComm =
               PstreamUtils::Cast::to_mpi
               (
                   UPstream::Communicator::lookup(UPstream::worldComm)
               );
      2889dc72
    • Mark OLESEN's avatar
      ENH: reduce communication argList at startup (#3142) · d75c60d8
      Mark OLESEN authored
      - replace point-to-point transmission of the argList args/options with
        a broadcast. This is sufficient for most cases (without distributed
        roots).
      
        For "normal" cases (non-distributed roots) this will replace the
        nProcs-1 messages with a single broadcast.
      
      - for cases with distributed roots, distinguish between a single,
        identical root and different roots.  An identical root can also be
        subsequently handled with a broadcast. Different roots will still
        require individual point-to-point communication.
      
        For cases with distributed roots, it will add the overhead of an
        additional broadcast.
      d75c60d8
  13. Apr 22, 2024
  14. Apr 19, 2024