Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] RFC: MPI Interface Extensions Infrastructure
From: Josh Hursey (jjhursey_at_[hidden])
Date: 2009-05-12 09:37:03


For the same reasons that Jeff mentioned, I think it is probably
better to have a separate mpi-ext.h outside of mpi.h. It just makes
things a bit more explicit for the programmer.

With regard to the #define, should we have one for all extended
interfaces (i.e., OMPI_HAVE_MPI_EXT) or one for each set of interfaces
(i.e., OMPI_HAVE_MPI_EXT_EXAMPLE, OMPI_HAVE_MPI_EXT_MAGIC, ...)?

-- Josh

On May 12, 2009, at 9:14 AM, Jeff Squyres wrote:

> I *believe* we chose to make it a separate <mpi-ext.h> file to drive
> the point home to the MPI application developer that these are non-
> standard API functions, use at their own risk, yadda yadda yadda.
>
> Maybe it would be worthwhile to have an extra #define that indicates
> whether these functions are available, though, so a programmer could
> do something like this:
>
> #if OMPI_HAVE_MPI_EXTENDED_INTERFACES
> OMPI_Progress();
> #else
> #error "We need progress!!"
> #endif
>
> (probably with a shorter #define name, though ;-) )
>
>
> On May 12, 2009, at 8:49 AM, Terry Dontje wrote:
>
>> I like this, however wouldn't it possibly be nice to have a the
>> mpi-ext.h pulled in by mpi.h when the -enable-ext configure option is
>> used? That way one would be able to compile and run current tests
>> for
>> regressions without having to change the code.
>>
>> --td
>>
>> Jeff Squyres wrote:
>> > I'm [obviously] in favor of this RFC. :-)
>> >
>> > On May 11, 2009, at 2:37 PM, Josh Hursey wrote:
>> >
>> >>
>> >> What: Infrastructure for MPI Interface Extensions
>> >>
>> >> Why: Allow for experimentation with new interfaces without
>> changing
>> >> mpi.h
>> >>
>> >> Where: Temporary Mercurial branch (link below)
>> >>
>> >> http://cgi.cs.indiana.edu/~jjhursey/public-tmp/hg/hgwebdir.cgi/mpi-ext/
>> >>
>> >> When: Apply on trunk before branching for v1.5
>> >>
>> >> Timeout: 2 weeks - May 26, 2009 after the teleconf.
>> >>
>> >>
>> ---------------------------------------------------------------------
>> >> Description:
>> >>
>> >> 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. In order to add
>> such
>> >> an interface to Open MPI you must add it directly to the ompi/mpi/
>> >> directory and mpi.h. The combination of standard and non-standard
>> >> interfaces inside mpi.h becomes troublesome to many developers and
>> >> users.
>> >>
>> >> This branch allows developers to create a directory under ompi/
>> mpiext/
>> >> for their extension (see ompi/mpiext/example in the HG branch
>> for an
>> >> example). By default, all extensions are disabled. They can be
>> enabled
>> >> through a configure option '--enable-ext='. This option takes a
>> list
>> >> of extensions that should be built as part of Open MPI. The user
>> can
>> >> include all of the extensions by referencing the appropriate
>> header
>> >> file (e.g., #include <mpi-ext.h> ), and compiling with the normal
>> >> wrapper compilers (e.g., mpicc).
>> >>
>> >> This infrastructure was designed and discussed on July 2, 2008
>> at an
>> >> Open MPI developers meeting directly following an MPI Forum
>> meeting. I
>> >> have been developing this branch over the past few months under
>> the
>> >> advisement of Jeff and Brian. The C interface is functional and
>> >> stable. The C++, F77, and F90 interfaces have not been completed.
>> >> There are comments in the appropriate build system files
>> (particularly
>> >> config/ompi_ext.m4) that indicate where a developer would need to
>> >> focus to finish support for these language bindings if needed. I
>> have
>> >> not completed them since I do not feel comfortable enough at
>> this time
>> >> with these languages to provide such functionality.
>> >>
>> >> I would like to bring this into the trunk before v1.5 branch.
>> Having
>> >> the infrastructure in the trunk will make it easier to maintain
>> off-
>> >> trunk experimental interface development.
>> >>
>> >> As part of this RFC, I will also update the 'MPI Extensions'
>> wiki page
>> >> to describe how a developer can get started using this
>> infrastructure:
>> >> https://svn.open-mpi.org/trac/ompi/wiki/MPIExtensions
>> >>
>> >>
>> ---------------------------------------------------------------------
>> >> How to use the branch:
>> >>
>> >> Configure with this additional option:
>> >> --enable-ext=example
>> >>
>> >> Compile the following sample MPI program with 'mpicc' per usual.
>> >> /*---------------------------------*/
>> >> #include <stdio.h>
>> >> #include <mpi.h>
>> >> #include <mpi-ext.h>
>> >>
>> >> int main(int argc, char *argv[])
>> >> {
>> >> int rank, size;
>> >>
>> >> MPI_Init(&argc, &argv);
>> >>
>> >> MPI_Comm_rank(MPI_COMM_WORLD, &rank);
>> >> MPI_Comm_size(MPI_COMM_WORLD, &size);
>> >>
>> >> OMPI_Progress("Go OMPI! Go!");
>> >>
>> >> MPI_Finalize();
>> >>
>> >> return 0;
>> >> }
>> >> /*---------------------------------*/
>> >>
>> >> _______________________________________________
>> >> devel mailing list
>> >> devel_at_[hidden]
>> >> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>> >
>> >
>>
>> _______________________________________________
>> devel mailing list
>> devel_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>
>
> --
> Jeff Squyres
> Cisco Systems
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel