Generating Bindings in MPICH (2401.16547v1)
Abstract: The MPI Forum has recently adopted a Python scripting engine for generating the API text in the standard document. As a by-product, it made available reliable and rich descriptions of all MPI functions that are suited for scripting tools. Using these extracted API information, we developed a Python code generation toolbox to generate the language binding layers in MPICH. The toolbox replaces nearly 70,000 lines of manually maintained C and Fortran 2008 binding code with around 5,000 lines of Python scripts plus some simple configuration. In addition to completely eliminating code duplication in the binding layer and avoiding bugs from manual code copying , the code generation also minimizes the effort for API extension and code instrumentation. This is demonstrated in our implementation of MPI-4 large count functions and the prototyping of a next generation MPI profiling interface, QMPI.
- Argonne National Lab. 2021. MPICH. https://www.mpich.org/.
- QMPI: A next generation MPI profiling interface for modern HPC platforms. Parallel Comput. 96 (2020), 102635. https://doi.org/10.1016/j.parco.2020.102635
- ISO/IEC/SC22/WG5. 2012. TS 29113 further interoperability of Fortran with C.
- Implementing the MPI-3.0 Fortran 2008 Binding. In Proceedings of the 21st European MPI Users’ Group Meeting (Kyoto, Japan) (EuroMPI/ASIA ’14). Association for Computing Machinery, New York, NY, USA, 1–6. https://doi.org/10.1145/2642769.2642777