2005-11-05 22:57:48 +03:00
|
|
|
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
University Research and Technology
|
|
|
|
Corporation. All rights reserved.
|
|
|
|
Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
of Tennessee Research Foundation. All rights
|
|
|
|
reserved.
|
2004-11-28 23:09:25 +03:00
|
|
|
Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
University of Stuttgart. All rights reserved.
|
2005-03-24 15:43:37 +03:00
|
|
|
Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
All rights reserved.
|
2008-09-23 23:50:31 +04:00
|
|
|
Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
2004-11-22 04:38:40 +03:00
|
|
|
$COPYRIGHT$
|
|
|
|
|
|
|
|
Additional copyrights may follow
|
|
|
|
|
2004-11-22 03:37:56 +03:00
|
|
|
$HEADER$
|
|
|
|
|
2004-01-17 03:16:23 +03:00
|
|
|
Overview
|
|
|
|
========
|
|
|
|
|
2004-06-19 19:27:44 +04:00
|
|
|
This file is here for those who are building/exploring OMPI in its
|
2004-10-16 03:19:33 +04:00
|
|
|
source code form, most likely through a developer's tree (i.e., a
|
2005-06-09 05:12:54 +04:00
|
|
|
Subversion checkout).
|
|
|
|
|
|
|
|
|
|
|
|
Debugging vs. Optimized Builds
|
|
|
|
==============================
|
|
|
|
|
|
|
|
If you are building Open MPI from a Subversion checkout, the default
|
|
|
|
build includes a lot of debugging features. This happens
|
|
|
|
automatically when when configure detects the hidden ".svn" Subversion
|
|
|
|
meta directory (that is present in all Subversion checkouts) in your
|
|
|
|
source tree, and therefore activates a number of developer-only
|
2008-09-23 23:50:31 +04:00
|
|
|
debugging features in the Open MPI code base. The same is true if you
|
|
|
|
have a Mercurial checkout (with the hidden .hg meta directory).
|
2005-06-09 05:12:54 +04:00
|
|
|
|
2008-09-23 23:50:31 +04:00
|
|
|
By definition, debugging builds will perform [much] slower than
|
|
|
|
optimized builds of Open MPI. You should *NOT* conduct timing tests
|
|
|
|
or try to run production performance numbers with debugging builds.
|
2005-06-09 05:12:54 +04:00
|
|
|
|
|
|
|
If you wish to build an optimized version of Open MPI from a
|
2005-08-25 02:10:06 +04:00
|
|
|
developer's checkout, you have three main options:
|
2005-06-09 05:12:54 +04:00
|
|
|
|
2005-08-25 02:10:06 +04:00
|
|
|
1. Use the "--with-platform=optimized" switch to configure. This is
|
|
|
|
the preferred (and probably easiest) method. For example:
|
|
|
|
|
|
|
|
shell$ svn co http://svn.open-mpi.org/svn/ompi/trunk ompi
|
|
|
|
shell$ cd ompi
|
|
|
|
shell$ ./autogen.sh
|
|
|
|
shell$ mkdir build
|
|
|
|
shell$ cd build
|
|
|
|
shell$ ./configure --with-platform=optimized ...
|
|
|
|
[...lots of output...]
|
|
|
|
shell$ make all install
|
|
|
|
|
|
|
|
2. Use a VPATH build. Simply build Open MPI from a different
|
2008-09-23 23:50:31 +04:00
|
|
|
directory than the source tree -- one where the .svn / .hg
|
|
|
|
subdirectory is not present. For example:
|
2005-06-09 05:12:54 +04:00
|
|
|
|
2005-08-05 16:33:53 +04:00
|
|
|
shell$ svn co http://svn.open-mpi.org/svn/ompi/trunk ompi
|
2005-06-09 05:12:54 +04:00
|
|
|
shell$ cd ompi
|
|
|
|
shell$ ./autogen.sh
|
|
|
|
shell$ mkdir build
|
|
|
|
shell$ cd build
|
|
|
|
shell$ ../configure ...
|
|
|
|
[...lots of output...]
|
|
|
|
shell$ make all install
|
|
|
|
|
2005-08-25 02:10:06 +04:00
|
|
|
3. Manually specify configure options to disable all the debugging
|
|
|
|
options (note that this is exactly what "--with-platform=optimized"
|
|
|
|
does behind the scenes). You'll need to carefully examine the
|
|
|
|
output of "./configure --help" to see which options to disable.
|
|
|
|
They are all listed, but some are less obvious than others (they
|
|
|
|
are not listed here because it is a changing set of flags; by
|
2005-09-16 16:28:31 +04:00
|
|
|
Murphy's Law, listing them here will pretty much guarantee that
|
2005-08-25 02:10:06 +04:00
|
|
|
this file will get out of date):
|
2005-06-09 05:12:54 +04:00
|
|
|
|
|
|
|
shell$ ./configure --disable-debug ...
|
|
|
|
[...lots of output...]
|
|
|
|
shell$ make all install
|
2004-01-17 03:16:23 +03:00
|
|
|
|
|
|
|
|
2008-05-21 00:23:31 +04:00
|
|
|
Use of GNU m4, Autoconf, Automake, and Libtool
|
|
|
|
==============================================
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2004-07-07 19:58:55 +04:00
|
|
|
This procedure is *ONLY* necessary if you are building from a
|
|
|
|
developer's tree. If you have an Open MPI distribution tarball, this
|
2005-06-09 05:12:54 +04:00
|
|
|
procedure is unnecessary -- you can (and should) skip reading this
|
|
|
|
section.
|
2004-07-07 19:58:55 +04:00
|
|
|
|
2004-08-06 18:30:18 +04:00
|
|
|
If you are building Open MPI from a developer's tree, you must first
|
2008-05-21 00:23:31 +04:00
|
|
|
install fairly recent versions of the GNU tools m4, Autoconf, Automake,
|
2007-05-09 00:37:08 +04:00
|
|
|
and Libtool. The specific versions required depend on if you are
|
|
|
|
using the trunk or a release branch (and which release branch you are
|
|
|
|
using). The specific versions can be found at:
|
|
|
|
|
|
|
|
http://www.open-mpi.org/svn/building.php
|
|
|
|
|
|
|
|
You can check what versions of the autotools you have installed with
|
|
|
|
the following:
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2008-05-21 00:23:31 +04:00
|
|
|
shell$ m4 --version
|
2004-01-17 03:16:23 +03:00
|
|
|
shell$ autoconf --version
|
|
|
|
shell$ automake --version
|
2005-09-16 16:28:31 +04:00
|
|
|
shell$ libtoolize --version
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2005-06-09 05:12:54 +04:00
|
|
|
To strengthen the above point: the core Open MPI developers typically
|
2005-08-20 02:34:07 +04:00
|
|
|
use very, very recent versions of the GNU tools. Little checking is
|
|
|
|
done to ensure that the code base is compatible with older versions of
|
|
|
|
these tools. If you have a problem, try upgrading your GNU tools to
|
|
|
|
the latest versions and try again.
|
2005-06-09 05:12:54 +04:00
|
|
|
|
2004-01-17 03:16:23 +03:00
|
|
|
If you need newer versions, you are *strongly* encouraged to heed the
|
|
|
|
following advice:
|
|
|
|
|
2004-06-19 19:27:44 +04:00
|
|
|
NOTE: On MacOS/X, the default "libtool" program is different than the
|
2005-06-09 05:12:54 +04:00
|
|
|
GNU libtool. You must download and install the GNU version (via
|
|
|
|
Fink or any other mechanism).
|
2004-06-08 00:59:45 +04:00
|
|
|
|
2004-01-17 03:16:23 +03:00
|
|
|
1. Unless your OS distribution has easy-to-use binary installations,
|
|
|
|
the sources can be can be downloaded from:
|
|
|
|
|
2008-05-21 00:23:31 +04:00
|
|
|
ftp://ftp.gnu.org/gnu/m4/
|
2004-01-17 03:16:23 +03:00
|
|
|
ftp://ftp.gnu.org/gnu/autoconf/
|
|
|
|
ftp://ftp.gnu.org/gnu/automake/
|
|
|
|
ftp://ftp.gnu.org/gnu/libtool/
|
|
|
|
|
|
|
|
2. Build and install the tools in the following order:
|
|
|
|
|
2008-05-21 00:23:31 +04:00
|
|
|
2a. m4
|
|
|
|
2b. Autoconf
|
|
|
|
2c. Automake
|
|
|
|
2d. Libtool
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2008-05-21 00:23:31 +04:00
|
|
|
3. You MUST install all four tools into the same prefix directory.
|
|
|
|
These four tools are somewhat inter-related, and if they're going
|
2004-01-17 03:16:23 +03:00
|
|
|
to be used together, they MUST share a common installation prefix.
|
|
|
|
|
|
|
|
3a. It is *strongly* encouraged that you do not install your new
|
|
|
|
versions over the OS-installed versions. This could cause
|
|
|
|
other things on your system to break. Instead, install into
|
|
|
|
$HOME/local, or /usr/local, or wherever else you tend to
|
|
|
|
install "local" kinds of software.
|
|
|
|
3b. In doing so, be sure to prefix your $path with the directory
|
|
|
|
where they are installed. For example, if you install into
|
|
|
|
$HOME/local, you may want to edit your shell startup file
|
|
|
|
(.bashrc, .cshrc, .tcshrc, etc.) to have something like:
|
|
|
|
|
|
|
|
# For bash/sh:
|
|
|
|
export PATH=$HOME/local/bin:$PATH
|
|
|
|
# For csh/tcsh:
|
|
|
|
set path = ($HOME/local/bin $path)
|
|
|
|
|
|
|
|
3c. Ensure to set your $path *BEFORE* you configure/build/install
|
2008-05-21 00:23:31 +04:00
|
|
|
the four packages.
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2008-05-21 00:23:31 +04:00
|
|
|
4. All four packages require two simple commands to build and
|
2004-01-17 03:16:23 +03:00
|
|
|
install (where PREFIX is the prefix discussed in 3, above).
|
|
|
|
|
2008-05-21 00:23:31 +04:00
|
|
|
shell$ cd m4-1.4.11
|
2004-01-17 03:16:23 +03:00
|
|
|
shell$ ./configure --prefix=PREFIX
|
2008-05-21 00:23:31 +04:00
|
|
|
shell$ make; make install
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2004-10-16 03:19:33 +04:00
|
|
|
--> NOTE: The builds are so short that parallel builds really
|
|
|
|
aren't worth it (and cause problems in some cases).
|
2004-08-05 02:25:47 +04:00
|
|
|
|
2004-10-16 03:19:33 +04:00
|
|
|
--> If you are using the csh or tcsh shells, be sure to run the
|
|
|
|
"rehash" command after you install each package.
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2008-09-23 23:50:31 +04:00
|
|
|
shell$ cd ../autoconf-2.63
|
2004-01-17 03:16:23 +03:00
|
|
|
shell$ ./configure --prefix=PREFIX
|
2008-05-21 00:23:31 +04:00
|
|
|
shell$ make; make install
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2004-10-16 03:19:33 +04:00
|
|
|
--> If you are using the csh or tcsh shells, be sure to run the
|
|
|
|
"rehash" command after you install each package.
|
|
|
|
|
2008-05-21 00:23:31 +04:00
|
|
|
shell$ cd ../automake-1.10.1
|
2004-01-17 03:16:23 +03:00
|
|
|
shell$ ./configure --prefix=PREFIX
|
2008-05-21 00:23:31 +04:00
|
|
|
shell$ make; make install
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2004-10-16 03:19:33 +04:00
|
|
|
--> If you are using the csh or tcsh shells, be sure to run the
|
|
|
|
"rehash" command after you install each package.
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2008-09-23 23:50:31 +04:00
|
|
|
shell$ cd ../libtool-2.2.6
|
2008-05-21 00:23:31 +04:00
|
|
|
shell$ ./configure --prefix=PREFIX
|
|
|
|
shell$ make; make install
|
|
|
|
|
|
|
|
--> If you are using the csh or tcsh shells, be sure to run the
|
|
|
|
"rehash" command after you install each package.
|
|
|
|
|
|
|
|
m4, Autoconf and Automake build and install very quickly; Libtool will
|
2004-01-17 03:16:23 +03:00
|
|
|
take a minute or two.
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
5. You can now run OMPI's top-level "autogen.sh" script. This script
|
2004-01-17 03:16:23 +03:00
|
|
|
will invoke the GNU Autoconf, Automake, and Libtool commands in the
|
2004-06-07 19:33:53 +04:00
|
|
|
proper order and setup to run OMPI's top-level "configure" script.
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2004-06-19 19:27:44 +04:00
|
|
|
Running autogen.sh may take several minutes. It's not very
|
2004-01-17 03:16:23 +03:00
|
|
|
exciting to watch. :-)
|
|
|
|
|
2004-10-16 03:19:33 +04:00
|
|
|
5a. You generally need to run autogen.sh whenever the top-level
|
|
|
|
file "configure.ac" changes, or any files in the config/
|
|
|
|
directory change (the config/ directory is where a lot of
|
|
|
|
"include" files for OMPI's configure script live).
|
2004-01-17 03:16:23 +03:00
|
|
|
|
|
|
|
5b. You do *NOT* need to re-run autogen.sh if you modify a
|
|
|
|
Makefile.am.
|
|
|
|
|
2004-06-07 19:33:53 +04:00
|
|
|
5c. Note that "autogen.sh" automatically traverses the entire OMPI
|
2004-10-16 03:19:33 +04:00
|
|
|
tree, running the GNU tools in all MCA component directories.
|
|
|
|
This is not always necessary. As you become more familiar with
|
|
|
|
the OMPI sources, you will come to understand the when you only
|
|
|
|
need to re-generate the top-level configure script, and when
|
|
|
|
you need to re-generate *all* configure scripts (it's
|
|
|
|
complicated -- not described here -- when in doubt, do them
|
|
|
|
all).
|
2004-01-17 03:16:23 +03:00
|
|
|
|
|
|
|
If you only need to re-generate the top-level configure script,
|
|
|
|
you can run:
|
|
|
|
|
|
|
|
shell$ autogen.sh -l
|
|
|
|
|
|
|
|
(i.e., "local" mode) which will prevent autogen.sh from
|
2004-10-16 03:19:33 +04:00
|
|
|
traversing all the MCA component directories.
|
2004-01-17 03:16:23 +03:00
|
|
|
|
|
|
|
5d. Similarly, if you only need to regenerate the configure script
|
2005-08-20 02:28:17 +04:00
|
|
|
in a single MCA component directory (and that component has a
|
|
|
|
"configure.stub" file), cd into that component's directory and
|
|
|
|
run autogen.sh in there directly:
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2004-06-19 19:27:44 +04:00
|
|
|
shell$ cd src/mca/pml/teg
|
|
|
|
shell$ ../../../../autogen.sh
|
2004-10-16 03:19:33 +04:00
|
|
|
|
2005-08-20 02:28:17 +04:00
|
|
|
This does *not* work if the component has a "configure.m4"
|
|
|
|
file. If a component's configure.m4 file changes, you will
|
|
|
|
need to run "autogen.sh" from the top-level directory.
|
|
|
|
|
2004-10-16 03:19:33 +04:00
|
|
|
Use of Flex
|
|
|
|
===========
|
|
|
|
|
|
|
|
Flex is used during the compilation of a developer's checkout (it is
|
|
|
|
not used in distribution tarballs). Other flavors of lex are *not*
|
|
|
|
supported: given the choice of making parsing code portable between
|
|
|
|
all flavors of lex and doing more interesting work on Open MPI, we
|
|
|
|
greatly prefer the latter. Flex is a mature software package, and as
|
|
|
|
of this writing, it has not changed since v2.5.4a in July of 1997.
|
|
|
|
This version seems to work fine with Open MPI; no testing has been
|
|
|
|
performed to see what the minimum version of Flex is required by Open
|
|
|
|
MPI.
|
|
|
|
|
|
|
|
If you do not have Flex installed, it can be downloaded from the
|
|
|
|
following URL:
|
|
|
|
|
|
|
|
ftp://ftp.gnu.org/non-gnu/flex/
|