Skip to content
Snippets Groups Projects

add compile-time type system for MPI data/ops

Merged Mark OLESEN requested to merge pstream-types into develop
  1. Feb 25, 2025
    • Mark OLESEN's avatar
      ENH: add UPstreamTraits support to map data types and opcodes · dccdb263
      Mark OLESEN authored
      The front-end traits:
      
      - UPstream_dataType trait:
        This wrapper is unwinds the type to check against base/alias, but also
        checks if it is a component aggregate of a supported UPstream data type.
        This will be that main entry point for usage.
      
      - UPstream_opType trait:
        Provides a mapping of OpenFOAM ops to their MPI equivalent.
        The \c opcode_id is the corresponding internal representation.
      
      The lower-level traits (not normally used within coding)
      
      - UPstream_base_dataType trait:
        Tests true/false if the specified data type has an internal MPI equivalent.
        The \c datatype_id is the corresponding internal enumeration.
        Even if this tests as false, it will always return \c type_byte as the
        fallback for general contiguous data
      
      - UPstream_alias_dataType trait:
        Provides mapping for <int/long/long long,...> to the fundamental 32/64
        integrals, since <int/long/long long,...> may not otherwise directly map
        on all systems.
      
      NOTE: can use the updates Test-machine-sizes test application to
      determine if all data types and aliases are properly defined on
      different systems
      dccdb263
    • Mark OLESEN's avatar
      ENH: add mapping for fundamental and OpenFOAM types -> MPI data types · bf60a124
      Mark OLESEN authored
      - this will allow send/recv/broadcast of various data types directly
        without reinterpreting as bytes. No performance benefit, but makes
        programming more flexible. In addition to the normal MPI types, also
        provide some convenient groupings such as double[3], double[9] etc.
      
      - the additional user-defined data types are created on the start of
        MPI and removed before shutdown
      bf60a124
    • Mark OLESEN's avatar
      ENH: add simple handling for point-to-point barriers · c448ea2a
      Mark OLESEN authored
      - provides an additional means of process synchronization
      c448ea2a