Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpi: embiggening #4961

Merged
merged 11 commits into from
Feb 20, 2021
Merged

mpi: embiggening #4961

merged 11 commits into from
Feb 20, 2021

Commits on Feb 20, 2021

  1. pt2pt: make bsend buffer functions large compatible

    Need use MPI_Aint internally for buffer sizes to accommodate large
    count.
    hzhou committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    1e739c2 View commit details
    Browse the repository at this point in the history
  2. op: add MPIR_Op_create_c_impl

    hzhou committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    068607a View commit details
    Browse the repository at this point in the history
  3. python: remove unused dump_function_polymorph

    This function must be a leftover from development. It has never been
    used and I don't think it is complete anyway.
    hzhou committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    d27a0e7 View commit details
    Browse the repository at this point in the history
  4. python: add underscore to internal attribute names

    Need differentiate internal func attributes from the user configured
    attributes.
    hzhou committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    ecb945d View commit details
    Browse the repository at this point in the history
  5. python: use lw_req in early_return routine to avoid confusion

    While it is technically safe, having the same temparary name within
    nested scope is confusing. Rename to clarity.
    hzhou committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    2f07905 View commit details
    Browse the repository at this point in the history
  6. errhan: add errname **too_big_for_output

    This will be used when user use a small function and the value returned
    won't fit in the output parameter.
    hzhou committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    12edbc0 View commit details
    Browse the repository at this point in the history
  7. binding: generate embiggened functions

    We will call dump_mpi_c twice for functions with POLY types. First we
    call with map_type="SMALL", then call with map_type="BIG".
    Functions without POLY types will just call dump_mpi_c once with
    map_type="SMALL".
    
    First of all, if there is a custom "large_count" block, we'll always
    use that in large version.
    
    If a POLY function only has scalar POLY type, we assume the
    implementation use MPI_Aint -- need fix any exceptions.
    
    If a POLY function has scalar output or inout POLY type, we assume
    internally use MPI_Aint, and python generrates temporary MPI_Aint
    variable to copy in and out value in the *small* version.
    
    If the function uses POLY arrays, we will use separate internal routines
    for datatype functions and always use MPI_Aint for collective (and other
    if any) functions. The array swap can be messy due to function-specific
    array lengths. We took the way out by only doing array swap in
    v-collectives.
    
    large mpir impl version with `_c_impl` suffix, and will call that. The
    compilation will fail if that (_c_impl) routine is missing.
    
    When we only use MPI_Aint for internal impl functions, we also check and
    convert when MPI_Count is bigger than MPI_Aint (such as the case in
    32-bit systems).
    hzhou committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    96288f8 View commit details
    Browse the repository at this point in the history
  8. python/c: refactor the mapping parameter

    The parameter mapping is passed along only because a few lower level
    function need it. Since the mapping concept is obscure at higher level,
    having it in the interface makes the code obscrue. On the other hand, a
    simpl string parameter "map_type" is more intuitive to understand. This
    commit uses "map_type" or simply omits mapping whereever the mapping is
    not directly needed.
    hzhou committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    23ebfe9 View commit details
    Browse the repository at this point in the history
  9. datatype: use impl wrapper function for datatype API

    ... that has output counters, e.g. MPI_Get_count, MPI_Get_elements,
    MPI_Pack, MPI_Unpack, etc. We need swap pointers when the type
    `MPI_Count` and `MPI_Aint` are not the same size, or we may skip the
    swap. The swapping will require use of different variables. This become
    difficult to handle with inlined body-of-routines. Wrap them inside an
    _impl function allows both cases to be handled properly.
    hzhou committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    4525265 View commit details
    Browse the repository at this point in the history
  10. binding: use _large_impl suffix for internal large interface

    Unfortunately our fortran bindings uses _c_impl and _c to refer to C
    versions of Fortran binding, causing conflicts with the large count
    interface. Since it is easier to change the C bindings, we use
    _large_impl to differentiate. I think it is more readable than _c suffix
    anyway.
    hzhou committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    c04d3ea View commit details
    Browse the repository at this point in the history
  11. test: add basic large API tests

    hzhou committed Feb 20, 2021
    Configuration menu
    Copy the full SHA
    deb6de4 View commit details
    Browse the repository at this point in the history