Skip to content
Snippets Groups Projects

reduce communication argList at startup

Merged Mark OLESEN requested to merge update-argList-mpi-startup into develop
  1. Apr 23, 2024
    • 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