在MPICH中生成绑定
Generating Bindings in MPICH
AI总结:
本研究利用MPI论坛Python脚本引擎产出的MPI函数描述信息,开发Python代码生成工具箱生成MPICH语言绑定层,大幅减少代码量,消除重复与人工错误,降低API扩展和代码插桩成本。
摘要:
MPI论坛近期采用了一款Python脚本引擎,用于生成标准文档中的API文本。作为副产品,它提供了所有MPI函数可靠且丰富的描述,适用于脚本工具。利用这些提取出的API信息,我们开发了一个Python代码生成工具箱,用于生成MPICH中的语言绑定层。该工具箱用约5000行Python脚本加上一些简单配置,替换了近70000行人工维护的C和Fortran 2008绑定代码。除了彻底消除绑定层中的代码重复、避免人工代码复制带来的错误外,代码生成还最大限度减少了API扩展和代码插桩的工作量。这一点在我们实现MPI-4大计数函数以及下一代MPI性能分析接口QMPI的原型开发中得到了验证。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。