-
Notifications
You must be signed in to change notification settings - Fork 861
MPIExtensions
At times developers want to expose non-standard, optional interfaces to users. These interfaces may represent MPI interfaces to be presented to the MPI Forum for standardization. This page describes how a developer would go about introducing a new interface to an Open MPI branch.
For non-standard interfaces, it is strongly suggested that functions are prefixed with OMPI_ or MPIX_ instead of MPI_
branch/ompi/include/mpi.h
branch/ompi/include/mpi-ext.h <auto-generated by autogen.sh and configure>
<MPI standard interfaces>
branch/ompi/mpi/c/
/mpi/cxx/
/mpi/f77/
/mpi/f90/
<OMPI extension interfaces>
branch/ompi/mpiext/
/mpiext/example/
/mpiext/example/mpiext_example_c.h
/mpiext/example/configure.m4
/mpiext/example/configure.params
/mpiext/example/Makefile.am
/mpiext/example/c/
/mpiext/example/c/progress.c
autogen.sh
gathers a list of available extensions in branch/ompi/mpiext
. configure
then chooses the headers from the enabled extensions and includes them in branch/ompi/include/mpi-ext.h
To create a new extension copy the example directory to whatever you want to identify your extension as (e.g., magic).
$ cd ompi/mpiext/
$ cp -R example magic
Edit all of the files as needed.
In order to build your extension you must explicitly enable it at configure time:
$ ./configure --enable-mpi-ext=magic
If you have more than one extension that you wish to build you can pass them as comma separated values to this configure option:
$ ./configure --enable-mpi-ext=magic,example
Extensions are built by default so nothing is needed on the configure line. However, if you want to disable building extensions:
$ ./configure --disable-mpi-ext
Headers for the extensions will be installed into:
$prefix/include/openmpi/ompi/mpiext/example/mpiext_example_c.h
However programs need only include the base header file, which is linked in properly by the wrapper compilers:
#include <mpi-ext.h>