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.
|
2014-10-02 16:02:00 +04:00
|
|
|
Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2004-11-28 23:09:25 +03:00
|
|
|
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.
|
2015-02-21 14:25:06 +03:00
|
|
|
Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved.
|
2013-11-15 01:01:25 +04:00
|
|
|
Copyright (c) 2013 Intel, 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
|
2014-10-02 16:02:00 +04:00
|
|
|
Git clone).
|
2005-06-09 05:12:54 +04:00
|
|
|
|
|
|
|
|
|
|
|
Debugging vs. Optimized Builds
|
|
|
|
==============================
|
|
|
|
|
2014-10-02 16:02:00 +04:00
|
|
|
If you are building Open MPI from a Git clone, the default build
|
|
|
|
includes a lot of debugging features. This happens automatically when
|
|
|
|
when configure detects the hidden ".git" Git meta directory (that is
|
|
|
|
present in all Git clones) in your source tree, and therefore
|
|
|
|
activates a number of developer-only debugging features in the Open
|
|
|
|
MPI code base.
|
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:
|
|
|
|
|
2014-10-02 01:44:09 +04:00
|
|
|
shell$ git clone git@github.com:open-mpi/ompi.git
|
2005-08-25 02:10:06 +04:00
|
|
|
shell$ cd ompi
|
2010-09-18 03:04:06 +04:00
|
|
|
shell$ ./autogen.pl
|
2005-08-25 02:10:06 +04:00
|
|
|
shell$ mkdir build
|
|
|
|
shell$ cd build
|
2015-03-16 20:45:58 +03:00
|
|
|
shell$ ../configure --with-platform=optimized ...
|
2005-08-25 02:10:06 +04:00
|
|
|
[...lots of output...]
|
|
|
|
shell$ make all install
|
|
|
|
|
|
|
|
2. Use a VPATH build. Simply build Open MPI from a different
|
2014-10-02 01:44:09 +04:00
|
|
|
directory than the source tree -- one where the .git subdirectory
|
|
|
|
is not present. For example:
|
2005-06-09 05:12:54 +04:00
|
|
|
|
2014-10-02 01:44:09 +04:00
|
|
|
shell$ git clone git@github.com:open-mpi/ompi.git
|
2005-06-09 05:12:54 +04:00
|
|
|
shell$ cd ompi
|
2010-10-07 00:39:08 +04:00
|
|
|
shell$ ./autogen.pl
|
2005-06-09 05:12:54 +04:00
|
|
|
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
|
|
|
|
|
|
|
|
2012-11-27 22:09:35 +04:00
|
|
|
Use of GNU Autoconf, Automake, and Libtool (and m4)
|
|
|
|
===================================================
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2015-02-21 14:25:06 +03:00
|
|
|
You need to read/care about this section *ONLY* if you are building
|
|
|
|
from a developer's tree (i.e., a Git clone of the Open MPI source
|
|
|
|
tree). If you have an Open MPI distribution tarball, the contents of
|
|
|
|
this section are optional -- you can (and probably 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
|
2012-11-27 22:09:35 +04:00
|
|
|
install fairly recent versions of the GNU tools Autoconf, Automake,
|
|
|
|
and Libtool (and possibly GNU m4, because recent versions of Autoconf
|
|
|
|
have specific GNU m4 version requirements). The specific versions
|
2015-02-21 14:25:06 +03:00
|
|
|
required depend on if you are using the Git master branch or a release
|
|
|
|
branch (and which release branch you are using). The specific
|
|
|
|
versions can be found here:
|
2007-05-09 00:37:08 +04:00
|
|
|
|
2014-10-02 01:44:09 +04:00
|
|
|
http://www.open-mpi.org/source/building.php
|
2007-05-09 00:37:08 +04:00
|
|
|
|
|
|
|
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
|
|
|
|
2013-11-15 01:01:25 +04:00
|
|
|
Required version levels for all the OMPI releases can be found here:
|
|
|
|
|
2014-10-02 01:44:09 +04:00
|
|
|
http://www.open-mpi.org/source/building.php
|
2013-11-15 01:01:25 +04:00
|
|
|
|
2005-06-09 05:12:54 +04:00
|
|
|
To strengthen the above point: the core Open MPI developers typically
|
2010-03-27 00:03:50 +03:00
|
|
|
use very, very recent versions of the GNU tools. There are known bugs
|
|
|
|
in older versions of the GNU tools that Open MPI no longer compensates
|
|
|
|
for (it seemed senseless to indefinitely support patches for ancient
|
|
|
|
versions of Autoconf, for example). You *WILL* have problems if you
|
|
|
|
do not use recent versions of the GNU tools.
|
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
|
2012-11-27 22:09:35 +04:00
|
|
|
GNU libtool. You must download and install the GNU version
|
|
|
|
(e.g., via MacPorts, Homebrew, or some 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:
|
|
|
|
|
|
|
|
ftp://ftp.gnu.org/gnu/autoconf/
|
|
|
|
ftp://ftp.gnu.org/gnu/automake/
|
|
|
|
ftp://ftp.gnu.org/gnu/libtool/
|
2012-11-27 22:09:35 +04:00
|
|
|
and if you need it:
|
|
|
|
ftp://ftp.gnu.org/gnu/m4/
|
|
|
|
|
|
|
|
NOTE: It is certainly easiest to download/build/install all four of
|
|
|
|
these tools together. But note that Open MPI has no specific m4
|
|
|
|
requirements; it is only listed here because Autoconf requires
|
|
|
|
minimum versions of GNU m4. Hence, you may or may not *need* to
|
|
|
|
actually install a new version of GNU m4. That being said, if you
|
|
|
|
are confused or don't know, just install the latest GNU m4 with the
|
|
|
|
rest of the GNU Autotools and everything will work out fine.
|
2004-01-17 03:16:23 +03:00
|
|
|
|
|
|
|
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
|
|
|
|
2010-09-29 03:37:15 +04:00
|
|
|
3. You MUST install the last three tools (Autoconf, Automake, Libtool)
|
|
|
|
into the same prefix directory. These three tools are somewhat
|
|
|
|
inter-related, and if they're going to be used together, they MUST
|
2015-01-30 14:33:54 +03:00
|
|
|
share a common installation prefix.
|
2012-11-27 22:09:35 +04:00
|
|
|
|
|
|
|
You can install m4 anywhere as long as it can be found in the path;
|
|
|
|
it may be convenient to install it in the same prefix as the other
|
|
|
|
three. Or you can use any recent-enough m4 that is in your path.
|
2004-01-17 03:16:23 +03:00
|
|
|
|
|
|
|
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).
|
|
|
|
|
2013-11-15 01:01:25 +04:00
|
|
|
shell$ cd <m4 directory>
|
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
|
|
|
|
2013-11-15 01:01:25 +04:00
|
|
|
shell$ cd <autoconf directory>
|
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.
|
|
|
|
|
2013-11-15 01:01:25 +04:00
|
|
|
shell$ cd <automake directory>
|
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
|
|
|
|
2013-11-15 01:01:25 +04:00
|
|
|
shell$ cd <libtool directory>
|
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.
|
|
|
|
|
2010-09-18 03:04:06 +04:00
|
|
|
5. You can now run OMPI's top-level "autogen.pl" 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
|
|
|
|
2012-11-27 22:09:35 +04:00
|
|
|
Running autogen.pl may take a few minutes, depending on your
|
2009-05-27 18:22:32 +04:00
|
|
|
system. It's not very exciting to watch. :-)
|
|
|
|
|
|
|
|
If you have a multi-processor system, enabling the multi-threaded
|
2010-09-18 03:04:06 +04:00
|
|
|
behavior in Automake 1.11 (or newer) can result in autogen.pl
|
2009-05-27 18:22:32 +04:00
|
|
|
running faster. Do this by setting the AUTOMAKE_JOBS environment
|
|
|
|
variable to the number of processors (threads) that you want it to
|
2012-11-27 22:09:35 +04:00
|
|
|
use before invoking autogen.pl. For example (you can again put
|
|
|
|
this in your shell startup files):
|
2009-05-27 18:22:32 +04:00
|
|
|
|
|
|
|
# For bash/sh:
|
|
|
|
export AUTOMAKE_JOBS=4
|
|
|
|
# For csh/tcsh:
|
|
|
|
set AUTOMAKE_JOBS 4
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2010-09-18 03:04:06 +04:00
|
|
|
5a. You generally need to run autogen.pl whenever the top-level
|
2012-11-27 22:09:35 +04:00
|
|
|
file "configure.ac" changes, or any files in the config/ or
|
|
|
|
<project>/config/ directories change (these directories are
|
|
|
|
where a lot of "include" files for OMPI's configure script
|
|
|
|
live).
|
2004-01-17 03:16:23 +03:00
|
|
|
|
2010-09-18 03:04:06 +04:00
|
|
|
5b. You do *NOT* need to re-run autogen.pl if you modify a
|
2004-01-17 03:16:23 +03:00
|
|
|
Makefile.am.
|
|
|
|
|
2004-10-16 03:19:33 +04:00
|
|
|
Use of Flex
|
|
|
|
===========
|
|
|
|
|
|
|
|
Flex is used during the compilation of a developer's checkout (it is
|
2012-11-27 22:09:35 +04:00
|
|
|
not used to build official 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.
|
2008-11-11 18:12:46 +03:00
|
|
|
|
2011-10-11 20:55:50 +04:00
|
|
|
Note that no testing has been performed to see what the minimum
|
|
|
|
version of Flex is required by Open MPI. We suggest that you use
|
|
|
|
v2.5.35 at the earliest.
|
2010-01-22 19:39:38 +03:00
|
|
|
|
2012-11-27 22:09:35 +04:00
|
|
|
*** NOTE: Windows developer builds of Open MPI *require* Flex version
|
|
|
|
2.5.35. Specifically, we know that v2.5.35 works and 2.5.4a does not.
|
|
|
|
We have not tested to figure out exactly what the minimum required
|
|
|
|
flex version is on Windows; we suggest that you use 2.5.35 at the
|
|
|
|
earliest. It is for this reason that the
|
|
|
|
contrib/dist/make_dist_tarball script checks for a Windows-friendly
|
|
|
|
version of flex before continuing.
|
|
|
|
|
|
|
|
For now, Open MPI will allow developer builds with Flex 2.5.4. This
|
|
|
|
is primarily motivated by the fact that RedHat/Centos 5 ships with
|
|
|
|
Flex 2.5.4. It is likely that someday Open MPI developer builds will
|
|
|
|
require Flex version >=2.5.35.
|
2008-11-11 18:12:46 +03:00
|
|
|
|
|
|
|
Note that the flex-generated code generates some compiler warnings on
|
|
|
|
some platforms, but the warnings do not seem to be consistent or
|
|
|
|
uniform on all platforms, compilers, and flex versions. As such, we
|
|
|
|
have done little to try to remove those warnings.
|
2004-10-16 03:19:33 +04:00
|
|
|
|
|
|
|
If you do not have Flex installed, it can be downloaded from the
|
|
|
|
following URL:
|
|
|
|
|
2008-11-11 18:12:46 +03:00
|
|
|
http://flex.sourceforge.net/
|