Hi Jeff,

Thank you for your reply!

Indeed, I was never going to look at OMPI's use of AC/AM...no doubt that would be far too complex for me. :-)

The AC/AM documents I have found so far are quite difficult for me -- I really am starting from zero. Prior to using MPI, I have been writing my own Makefiles and for the projects I work on [usually alone], that was sufficient. However, your tip did help me; I dropped "MPI" from my search and added "tutorial" instead and the hits are better.

As a starting point, I probably will only support open source MPIs. One thing I was wondering about was whether it is possible, though the use of #define's, to create code that is both multi-processor (MPI/mpic++) and single-processor (normal g++). That is, if users do not have any MPI installed, it compiles it with g++. With #define's and compiler flags, I think that can be easily done -- was wondering if this is something that developers using MPI do and whether AC/AM supports it.

But thanks and I'll try more phrase combinations in google...

Ray



Jeff Squyres wrote:
OMPI itself uses AC/AM to build itself, but our configure.ac and some of our Makefile.am'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 configure.ac and/or Makefile.am 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
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



Reply via email to