-
Notifications
You must be signed in to change notification settings - Fork 0
pythonizing
Jeff Squyres edited this page Nov 9, 2019
·
31 revisions
As of MPI-4.0, the language-independent specification ("LIS"), C, Fortran 90 ("F90"), and Fortran 08 ("F08") bindings are no longer being hard-coded in LaTeX. Instead, a procedural method is used to define what the bindings are (e.g., the procedure name, the parameter names/types/directions/descriptions, etc.), and then the LIS, C, F90, and F08 bindings are rendered in LaTeX automatically.
Using this scheme provides the following benefits:
- Only define an MPI procedure once (vs. effectively defining it four times in LaTeX: LIS, C, F90, F08). Meaning: significantly less typing for / less chances for error by chapter authors (yay!).
- Ensure that the LIS, C, F90, and F08 bindings agree in function name, parameter names and types, etc.
- Ensure more consistent style of language bindings throughout the entire document.
- Allow the possibility of easily making global changes to how bindings are rendered throughout the entire document.
- Nearly all Fortran
ierror
parameter handling is automatic. -
\cdeclindex{}
handling is automatic. - Enable the generation and publication of:
- Large portions of
mpi.h
,mpif.h
, thempi
module, and thempi_f08
module (i.e., all the procedures) that can be used as reference. - Machine-readable files containing the contents of all the
{mpi-binding}
blocks (i.e., all procedures, their parameters, etc.).
- Large portions of
- Decrease the time needed for humans to verify bindings in the text.
- Incorporate continuous integration-style checking of the bindings. For example:
- Note any changes to bindings in pull requests for human review before merging.
- Compare any two versions of the
.tex
source to deterministically and repeatably show the differences between them.
So how do you go about writing / editing / maintaining MPI bindings in this Python style?
- Have a look at a simple example
- Don't know Python? Here's a few things you need to know.
- General guidelines for Pythonizing MPI bindings
- Reference guide