Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Open MPI programs with autoconf/automake?
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2008-11-06 09:08:44

OMPI itself uses AC/AM to build itself, but our and some
of our's are fairly complex -- I wouldn't use these as
starting points.

You probably want to start with some general AC/AM tutorials (the AM
documentation reads somewhat like a tutorial -- you might want to look
there?). Just google around for AC/AM tutorials; leave "MPI" out of
your searching. Indeed, all you really want to do is build your
software -- the only real difference between your app and other apps
is that you want to use mpicc and friends to build it (vs. gcc and
friends). Most other aspects should be the same.

Hence, the big difference for building an MPI application with AC/AM
is that you want to set the C, C++, and Fortran compilers to the
various "wrapper" MPI compilers (e.g., CC=mpicc, CXX=mpic++,
FC=mpif90, F77=mpif77). Then AC_PROG_CC (etc.) will find the wrapper
compiler instead of gcc (for example).

It gets tricky, though, because not all MPI implementations have
wrapper compilers -- so it's up to you to decide how portable you want
to be. The open source MPI's both have wrapper compilers by the same
names (mpicc et al.), but some of the vendor/MPP platform-specific
MPI's may not.

Good luck.

On Nov 6, 2008, at 6:35 AM, Raymond Wan wrote:

> Hi all,
> I'm not sure if this is relevant to this mailing list, but I'm
> trying to get autoconf/automake working with an Open MPI program I
> am writing (in C++) but unfortunately, I don't know where to begin.
> I'm new to both tools but have it working well enough for a non-MPI
> program. When I google for these terms, I end up with results of
> people who have problems with autoconf/automake and *installing*
> Open MPI -- which isn't what I am looking for. Or, I get results
> that are well beyond what I need...I just need something to start
> with and won't be combining programming languages, etc.
> Does anyone have a brief example of and/or
> to start me off or know of a tutorial that describes how they can be
> adapted for Open MPI from a non-MPI program?
> Thank you -- any help appreciated!
> Ray
> _______________________________________________
> users mailing list
> users_at_[hidden]

Jeff Squyres
Cisco Systems