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

romio: implement binding generation for ROMIO #7228

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Commits on Dec 6, 2024

  1. romio: remove MPI_hpux

    These looks like vendor-specific code. We can easily generate them if
    needed. Remove them for now to simplify refactor.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    a4b81bf View commit details
    Browse the repository at this point in the history
  2. romio: add myname to macro MPIO_CHECK_INFO_ALL

    All romio error check macros takes a myname parameter (which can be
    replaced by __func__). Make MPIO_CHECK_INFO_ALL consistent.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    eefd281 View commit details
    Browse the repository at this point in the history
  3. romio: refactor mpi-io functions

    Refactor to split interface and implementation. This prepares for
    binding generations.
    
    The binding layer, e.g. open.c, close.c, etc. will be replaced by python
    generation when ROMIO is building FROM_MPICH.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    41bc3ae View commit details
    Browse the repository at this point in the history
  4. romio: add impl functions for File_f2c/c2f

    Add impl functions MPI_File_f2c and MPI_File_c2f for consistency and to
    avoid exposing MPIOI functions. They will be used when we generate IO
    bindings from MPICH and are not used if we build ROMIO outside MPICH.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    30e7916 View commit details
    Browse the repository at this point in the history
  5. romio: change error checking macros to mpich-style

    Use "goto fn_fail" instead of "goto fn_exit".
    
    Skip MPIO_Err_return_file since we will do that in top-level routines.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    1feac3b View commit details
    Browse the repository at this point in the history
  6. test/io: clarify the purpose of MPI_File_delete

    We call MPI_File_delete in case there is a leftover testfile, which will
    interfere with later MPI_File_open. Not checking error return and call
    "delete" on a seemingly non-existent file is myterious. Add a comment
    and error checking for maintenance.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    5c7cf4d View commit details
    Browse the repository at this point in the history
  7. ---- START HERE ----

    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    68d77f9 View commit details
    Browse the repository at this point in the history
  8. romio: fix a potential warning

    Need double cast to suppress warnings when converting between pointers
    and integers.
    
    Also remove an unused macro, HAVE_INT_LT_POINTER.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    2635168 View commit details
    Browse the repository at this point in the history
  9. mpi.h: define MPI-IO constants in mpi.h

    Define the complete MPI-IO interface in mpi.h.
    
    In all_romio_symbols.c, we can use MPI_Request instead of MPIO_Reuqest
    since MPIO_Request is not longer defined in mpi.h (since it no longer
    includes mpio.h).
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    2d52243 View commit details
    Browse the repository at this point in the history
  10. binding/c: add io_api.txt

    Add io_api.txt and generate io bindings
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    e82f90e View commit details
    Browse the repository at this point in the history
  11. binding/c: fixup for MPI_Register_datarep

    This function is now defined in src/binding/c/io_api.txt.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    9719961 View commit details
    Browse the repository at this point in the history
  12. binding/c: suppress warnings on missing validations

    We don't have error checking for async_thing, amode, whence.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    7380e2a View commit details
    Browse the repository at this point in the history
  13. binding/python: refactor gen_binding_c.py

    Wrap the code that generates c_bindings.c in a function. This prepares
    for later adding io binding generations. ROMIO bindings will be thinner
    than non-IO functions. So we will a separate function to generate IO
    bindings.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    8567ead View commit details
    Browse the repository at this point in the history
  14. binding/python: refactor binding_c.py

    Refactor code to function dump_body_of_routine.
    
    This is a preparation for generating io bindings. Since ROMIO is
    designed on top of the rest of MPI, we will handle differently for
    parameter filtering and error checking, but the part that handles large
    count and calling the internal impl functions can be shared.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    a7c09a5 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    3e1a63f View commit details
    Browse the repository at this point in the history
  16. romio: skip binding sources if FROM_MPICH

    MPICH will generate the binding layer.
    
    Now that libromio just supply internal code, we no longer need worry
    about libromio vs libpromio. We don't separate man pages and include
    mpio.h in mpi.h either.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    05c98aa View commit details
    Browse the repository at this point in the history
  17. Makefile: fix abi build using romio

    We no longer have any convenience libraries that need go into libmpi.so
    when libpmpi.so is also built. Thus, the legacy mpi_convenience_libs
    variable is no longer in use. However, we need differentiate libromio
    from the other convenience libraries for the ABI build. ROMIO depends on
    MPI, thus will need separate version for ABI and non-ABI build. Thus, we
    create two variables -- mpi_convenience_libs and abi_convenience_libs.
    Note: the former reuses the name but now with different meanings.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    05dc7e1 View commit details
    Browse the repository at this point in the history
  18. binding/python: generate io bindings

    Generate io bindings including prototypes in mpi_proto.h and
    mpir_impl.h.
    
    src/binding/c/io.c caintains all the IO binding functions that calls the
    corresponding _impl functions. But it is not included in the Makefile
    yet.
    
    Dump the prototypes for io impl functions separately to allow inserting
    necessary missing declarations such as MPIR_Ext_cs_enter/exit.
    
    IO functions need use MPIR_Ext_cs_enter/exit for global cs. Now it gets
    more complicated, refactor into dump_global_cs_enter/exit for better
    readability.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    46ebe51 View commit details
    Browse the repository at this point in the history
  19. binding/python: generate io abi bindings

    Because ROMIO is built on top of the rest of MPI, it is difficult to use
    the abi wrappers because we need either -
    
    a. convert from ABI into MPICH abi and then convert back to ABI before
       calling into ROMIO. This seems silly.
    
    Or -
    
    b. build ROMIO on MPICH abi. But in libmpi_abi.so, MPICH abi is not
       available.
    
    Thus we need -
    
    c. Switch ROMIO to call MPICH impl functions instead of `MPI/PMPI`
       functions. We'll need to build a layer in ROMIO switch between using
       `MPI/PMPI` or using `MPIR_Xxx_impl` depending on build options.
       This will result in ROMIO having full access to MPICH internals!
       But let's delay work until we have a convincing need.
    
    Thus, this commit implements io abi bindings without the abi wrappers.
    We implemented a separate path rather than making the existing code
    more complex.
    hzhou committed Dec 6, 2024
    Configuration menu
    Copy the full SHA
    a4c17e9 View commit details
    Browse the repository at this point in the history