1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
% -*- latex -*-
%
% Copyright (c) 2001-2004 The Trustees of Indiana University.
% All rights reserved.
% Copyright (c) 1998-2001 University of Notre Dame.
% All rights reserved.
% Copyright (c) 1994-1998 The Ohio State University.
% All rights reserved.
%
% This file is part of the LAM/MPI software package. For license
% information, see the LICENSE file in the top level directory of the
% LAM/MPI source distribution.
%
% $Id: build.tex,v 1.12 2003/07/09 13:03:07 jsquyres Exp $
%
\chapter{Building LAM/MPI}
This chapter provides instructions on building both LAM/MPI and the
examples that are part of the LAM distribution. In general, this step
is both the easiest and longest phase of the installation process.
This step is best accompanied by a trip to the coffee maker -- even on
a modern machine it can take well over 15 minutes.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Building LAM}
Once the configuration step has completed, build LAM by doing:
\lstset{style=lam-cmdline}
\begin{lstlisting}
shell$ make
\end{lstlisting}
% stupid emacs mode: $
%
in the top level LAM directory. This will build the LAM binaries and
libraries within the distribution source tree. Once they have
compiled properly, you can install them with:
\lstset{style=lam-cmdline}
\begin{lstlisting}
shell$ make install
\end{lstlisting}
% stupid emacs mode: $
%
\cmd{make} is capable of ``chaining'' commands, performing the build
and install in one command. The following example chains the two
above commands (``\cmd{make all}'' and ``\cmd{make install"}) into
one, but if there is a failure during the build phase, \cmd{make} will
not start the install phase.
\lstset{style=lam-cmdline}
\begin{lstlisting}
shell$ make all install
\end{lstlisting}
% stupid emacs mode: $
\begin{description}
\item[NOTE :] Previous version of LAM included \icmd{make}
\maketarget{install} in the default \icmd{make}. {\em This is no
longer true.} You {\em must} execute \icmd{make}
\maketarget{install} to install the LAM executables, libraries, and
header files to the location specified by the \confflag{prefix}
option to configure.
\end{description}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Advanced Building: Alternate Install Directory}
The LAM build system is capable of installing into a directory other
than the one specified by the \confflag{prefix} configure option. LAM
will not operate properly when installed in the alternate directory.
However, the feature is useful for building binary packages (such as
RPMs or Mac OS X Installer packages) or staging for read-only
filesystems.
The \cmdarg{DESTDIR} flag to \cmd{make} allows LAM to be installed in
a ``prefixed'' location. If LAM is configured to install in
\file{/usr/local} and the \cmdarg{DESTDIR=/tmp/lam} flag is used to
\cmd{make}, LAM will be installed in \file{/tmp/lam/usr/local}:
\lstset{style=lam-cmdline}
\begin{lstlisting}
shell$ ./configure --prefix=/usr/local
# ...lots of output...
shell$ make all
# ...lots of output...
shell$ make DESTDIR=/tmp/lam install
# ...lots of output - LAM installed in /tmp/lam/usr/local ...
shell$ export LAMHOME=/tmp/lam/usr/local
# allow testing of LAM while installed in alternate directory
shell$ lamboot boot_schema
# ... usual LAM testing ...
\end{lstlisting}
% stupid emacs mode: $
LAM will not operate correctly when installed in an alternate
directory to the one specified with the \confflag{prefix} configure
option. LAM relies on the installation prefix information to search
for various files. It is possible to ``fix'' LAM's search path by
using the \ienvvar{LAMHOME} environment variable. It is not
recommended that \envvar{LAMHOME} not be used beyond initial testing
(See Chapter~\ref{sec:postbuild}, page~\pageref{sec:postbuild} for
testing information).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Building the Included Examples}
LAM includes two example packages: general LAM examples and ROMIO
examples.
%
\changebegin{7.1}
%
Both packages can be build from a single top-level ``\icmd{make}
\maketarget{lamexamples}''.
%
\changeend{7.1}
%
Note that the examples can {\em only} be built after a successful
\icmd{make} \maketarget{install}, and \$\file{prefix/bin} has been
placed in your \$\var{PATH}.
\changebegin{7.1}
\lstset{style=lam-cmdline}
\begin{lstlisting}
shell$ make lamexamples
\end{lstlisting}
% stupid emacs mode: $
\changeend{7.1}
%
This will do the following (where \var{TOPDIR} is the top-level directory of
the LAM source tree):
\begin{enumerate}
\item Build the LAM examples. They are located in:
\file{TOPDIR/examples}
The \file{examples} directory includes C, C++, and Fortran
examples. The C++ and Fortan examples if support for the
language is built in LAM.
\item If you configured LAM with ROMIO support (i.e., if you did not
configure with \confflag{without-romio}), the ROMIO examples will be
built. See the notes about ROMIO in the RELEASE\_\-NOTES file.
They are located in:
\file{TOPDIR/romio/test}
\end{enumerate}
\noindent Additionally, the following commands can be used to build
each of the packages' examples separately (provided that support for
each was compiled in to LAM) from \var{TOPDIR}:
\changebegin{7.1}
\lstset{style=lam-cmdline}
\begin{lstlisting}
shell$ (cd examples; make examples)
shell$ make romio-examples
\end{lstlisting}
% stupid emacs mode: $
\changeend{7.1}
|