MPI documentation and interfaces

I am in the process of adding MPI support (i.e. auto-completions, hover, etc.) to fortls, similar to other modules like iso_fortran_env and OpenMP, and I was wondering what resources are available to understand the contents of the mpi and mpi_f08 modules?

I have successfully found the following resources (that more or less meet my needs):

  1. Fortran 2008 Bindings with the <tt>mpi_f08</tt> Module : which contains the mpi_f08 bindings, but completely lacking any descriptions of the procedures/constants/types.
  2. Man pages for MPI (MPICH) which does not directly say which of these routines and constants belong to mpi_f08 (I assume all?!)
  3. 18.2. MPI API manual pages (section 3) — Open MPI 5.0.x documentation which contains pretty much what I am looking for but also a series of non-stadnard? modules/routines/constants like module mpi_ext_f08.

I am considering writing a little scraper for 3. to create a serialised JSON version of the routines and constants for fortls. Is there an existing resource that I have missed that contains interfaces and descriptions for the MPI modules?

1 Like

One more resource (cc @JeffH):

1 Like

Look at A.4 (“A.4 Fortran 2008 Bindings with the mpi_f08 Module”) of https://www.mpi-forum.org/docs/mpi-4.1/mpi41-report.pdf to see what belongs in mpi_f08. The section before it has an overview of the design and the differences between mpi_f08 and the older variants. This is the official reference. It’s also useful, in my opinion.

1 Like

Thanks @ivanpribec and @JeffH for taking the time.

@JeffH I think the contents of A.4 on the online webpage are listed here (also vapaa looks quite cool!).

I think when I find some free time I will try to put together an automated workflow that converts the Fortran syntax into the JSON input files that fortls uses to store information for such modules.

You are correct. I am just a proper MPI lawyer and the PDF is canonical, while the HTML version is not, so I cite the former. Obviously, the HTML is equivalent and you should use it if that’s easier.

I hope that Vapaa will be useful to everyone some day. It remains unfinished because I have to finish the MPI ABI standardization effort first, along with Mukautuva (an independent implementation of said standard ABI), upon which Vapaa will build.

The right way to build Vapaa is with automatic code generation, but I first need to figure out all the design issues, because I can’t auto-generate what I don’t understand. If anyone is interested in helping out here, I would be happy to include more developers. It is the sort of straightforward project that doesn’t require one to understand everything to contribute.