-
Notifications
You must be signed in to change notification settings - Fork 280
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
Conversation
966f859
to
d00e9f7
Compare
test:mpich/ch3/tcp ✔️ test:mpich/custom |
35655c4
to
3c43546
Compare
test:mpich/custom |
06fc378
to
a4c17e9
Compare
a4c17e9
to
eaebe60
Compare
test:mpich/ch3/tcp test:mpich/custom |
1 similar comment
test:mpich/ch3/tcp test:mpich/custom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a minor conflict that looks simple enough to resolve. @roblatham00 want to give a review? I didn't scrutinize everything since the generated code makes the actual change set pretty huge.
ca0ea65
to
ca6f98b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not review every line but I resolved the conflict and ROMIO's I/O tests pass
ca6f98b
to
59b031e
Compare
Need double cast to suppress warnings when converting between pointers and integers. Also remove an unused macro, HAVE_INT_LT_POINTER.
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).
Add io_api.txt and generate io bindings
This function is now defined in src/binding/c/io_api.txt.
We don't have error checking for async_thing, amode, whence.
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.
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.
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.
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.
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.
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.
59b031e
to
014d053
Compare
Pull Request Description
[note: split preparation PR in #7232]
Integrate ROMIO into MPICH's binding generation framework. This will unify and simplify the IO binding tasks such as large count support, fortran support, man page support.
We'll retain the current stand-alone nature of ROMIO as much as we can in this PR. There shouldn't be any noticeable difference for users who build ROMIO separate from MPICH.
MPI_File_open
) into a binding layer and an implementation layer --MPI_File_open
inopen.c
andMPI_File_open_impl
inio_impl.c
FROM_MPICH
defined stays exactly the samesrc/binding/c/io.c
, which calls into theimpl
layer that is defined in ROMIO.mpl
.#include "mpio.h"
inmpi.h
Author Checklist
Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
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.
Whitespace checker. Warnings test. Additional tests via comments.
For non-Argonne authors, check contribution agreement.
If necessary, request an explicit comment from your companies PR approval manager.