Skip to content
Jeff Squyres edited this page Nov 9, 2019 · 31 revisions

Using Python for MPI Standard bindings

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.

Benefits

Using this scheme provides the following benefits:

  1. 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!).
  2. Ensure that the LIS, C, F90, and F08 bindings agree in function name, parameter names and types, etc.
  3. Ensure more consistent style of language bindings throughout the entire document.
  4. Allow the possibility of easily making global changes to how bindings are rendered throughout the entire document.
  5. Nearly all Fortran ierror parameter handling is automatic.
  6. \cdeclindex{} handling is automatic.
  7. Enable the generation and publication of:
    • Large portions of mpi.h, mpif.h, the mpi module, and the mpi_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.).
  8. Decrease the time needed for humans to verify bindings in the text.
  9. 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.

Instructions for Chapter Authors

So how do you go about writing / editing / maintaining MPI bindings in this Python style?

Clone this wiki locally