Skip to content

Conversation

@hzhou
Copy link
Owner

@hzhou hzhou commented May 27, 2021

Pull Request Description

Provide two internal utility functions:

  1. struct typemap *MPIR_type_get_typemap(MPI_Datatype dt)
  2. struct typesig *MPIR_type_get_typesig(MPI_Datatype dt)

with

struct typemap {
    MPI_Aint n;
    MPI_Datatype *types;
    MPI_Aint *disps;
};

struct typesig {
    MPI_Aint n;
    MPI_Datatype *types;
    MPI_Aint *counts;
};

These two function returns an internal data structure with allocated memory, so it is difficult to expose to the user. So we also provide two user functions that just prints to stdout (I know, not ideal):

  1. MPIX_Type_dump_typemap(MPI_Datatype datatype)
  2. MPIX_Type_dump_typesig(MPI_Datatype datatype)

Author Checklist

  • Provide Description
    Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
  • Commits Follow Good Practice
    Commits are self-contained and do not do two things at once.
    Commit message is of the form: module: short description
    Commit message explains what's in the commit.
  • Passes All Tests
    Whitespace checker. Warnings test. Additional tests via comments.
  • Contribution Agreement
    For non-Argonne authors, check contribution agreement.
    If necessary, request an explicit comment from your companies PR approval manager.

hzhou added 6 commits May 26, 2021 22:07
Even though a struct may have heterogenous basic datatypes, the
builtin-elements count is still meaningful. For example, it is the
number of entries in the typemap.

This commit prepares for typemap utilitis. Typemap is useful for
debugging datatype issues and simplify algorithms.
Handle MPI_2INT correctly for n_builtin_elements, builtin_element_size,
and basic_type.
Adds type map and type signature routines. These routines are useful for
debugging and datatype functions such as type matching and external32
packing/unpacking.
Add MPIX_Type_dump_typemap and MPIX_Type_dump_typesig. These functions
allows datatype debugging and testing.
The typemap routines are very complex to maintain. The MyDef sources
allow higher level code organizations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants