// -*- c++ -*-
// Automatically generated file -- DO NOT EDIT!!
// Generated on: July 23, 2005 at 07:07:18
$topdir = "..";
$faqtop = ".";
$maintdir = "admin";
require("$faqtop/admin/constants.php3");
require("$faqtop/nav.php3");
$title = "LAM FAQ: Building LAM
";
include("$topdir/includes/nav_header.php3");
?>
Table of contents:
configure complains that it can't find a C++ compiler --
I don't have one installed. Can I still use LAM?configure complains that it can't find a Fortran compiler
-- I don't have one installed. Can I still use LAM?[ Return to FAQ ]
| 1. I just want to build LAM and use it; don't hassle me with options. |
If you don't want to read the rest of the instructions, the following should do the trick for most situations:
shell% gunzip -c lam-7.1.1.tar.gz | tar xf -
shell% cd lam-7.1.1
shell% ./configure --prefix=/path/to/install/in
[...lots of output...]
shell% make all
[...lots of output...]
shell% make install
[...lots of output...]
If you do not specify a prefix, LAM will look for the executable
lamclean and install into that prefix. Otherwise, it will default to
/usr/local.
It is highly recommended that you go read at least the "For the Impatient" and "Release Notes" sections of the the LAM/MPI Installation Guide.
[ Top of page | Return to FAQ ]
| 2. What flavors of Unix does LAM/MPI work under? |
The official list of operating systems and architectures is maintained on the main LAM page.
For the most part, LAM is built upon ANSI C, and is pretty portable to most Unixes. As such, when testing LAM on a new operating system, there are usually a handful of items that need to be checked and possibly modified. But LAM's configure script is pretty smart, and usually figures out most operating system-dependant issues. So even if you don't see your operating system/hardware/compiler configuration on the official list, you might want to just try compiling it anyway and seeing if it works.
If you get LAM to compile and work properly on configurations that are not listed on the official list, please send a mail to the LAM mailing list so that we can update the official list.
[ Top of page | Return to FAQ ]
| 3. Is LAM 64 bit clean? |
Yes, LAM is 64 bit clean. You should be able to use LAM on 64 bit architectures and operating systems with no difficulty.
[ Top of page | Return to FAQ ]
| 4. I want to run LAM on a Linux system. Are there RPM's available? |
Yes, the LAM Team has released LAM in Red Hat's RPM format. These RPM's can be downloaded from the LAM download page.
Before the LAM Team started distributing RPM's, other people were kind enough to provide RPM's of LAM 6.1 and LAM 6.2b, but these are not entirely compatible with the new LAM RPM's. In order to upgrade to the new RPM's, you will need to use the "rpm -e" command to remove the old RPM's before installing the new RPM's.
[ Top of page | Return to FAQ ]
|
5. Why are there three RPM's for every LAM 6.5.x?
Applies to LAM 6.5 |
LAM can be compiled with three transport mechanisms (RPI's): tcp,
sysv, and usysv. Prior to LAM 7.0, which RPI to use
was a compile-time decision, so there is one RPM for each RPI.
[ Top of page | Return to FAQ ]
|
6. Why is there only one RPM for LAM 7.0?
Applies to LAM 7.0 |
LAM 7.0 introduces SSI, a run-time selectable service interface for LAM. With this architecture change, LAM is able to make the choice of RPIs a run-time decision. The LAM RPM includes support for a number of SSI modules - see the LAM User's Guide for a complete listing.
[ Top of page | Return to FAQ ]
| 7. What are the requirements for rebuilding the LAM SRPM? |
Rebuilding the SRPM is almost the same as building from source. In general, if you have all the right mechanisms for rebuilding SRPMS, you should meet the requirements.
However, [re]building RPMs on some Linux distributions invokes the GNU Autotools and/or Libtool. Hence, you must also have recent versions of the GNU Autotools and Libtool. If you do not, you may encounter problems such as missing pthread symbols (this is a symptom of the problem -- the real problem is older versions of libtool). This thread on the LAM user's mailing list describes the problem in more detail. In short: if you run into missing symbols problems while [re]building the LAM RPMs, upgrade your versions of the GNU Autotools and Libtool.
[ Top of page | Return to FAQ ]
| 8. How do I unpack the distribution? |
The latest LAM distribution (version 7.1.1) is packaged as a
compressed tape archive, lam-7.1.1.tar.Z or
lam-7.1.1.tar.gz. It is available from the main
LAM web site.
Uncompress the archive and extract the sources.
shell% gunzip -c lam-7.1.1.tar.gz | tar xf -
or
shell% uncompress -c lam-7.1.1.tar.Z | tar xf -
This will create a directory named lam-7.1.1,
where all the LAM source code is unpacked into.
[ Top of page | Return to FAQ ]
| 9. How do I apply the LAM patches? |
LAM patches are no longer distributed; new tarballs will be created by the LAM team for users to download when bug fixes are necessary.
[ Top of page | Return to FAQ ]
| 10. How do I configure LAM? |
LAM uses a GNU configure script to perform site and architecture specific configuration.
Change directory to the top level LAM directory
(lam-7.1.1) and run the configure script.
shell% ./configure {options}
or
shell% sh ./configure {options}
Remember, it may be necessary to compile different versions of LAM for each OS version as well as each machine architecture. For example, you may need to have a separate versions for Solaris 2.5 and 2.6. You will need to run the configure script on each architecture.
At a minimum, the LAM Team strongly advises reading at least the "For the Impatient" section of the LAM/MPI Installation Guide.
[ Top of page | Return to FAQ ]
| 11. How do I change the default installation directory? |
By default, LAM 7.1.1 will look for lamclean and
install into the same prefix. If lamclean is not found,
LAM will default to installing in /usr/local/
You can change this default directory by using the
--prefix option to configure. For example,
to install the LAM binaries into the /home/beowulf tree,
use the following:
shell% cd lam-7.1.1
shell% ./configure --prefix=/home/beowulf
This will install the LAM binaries into
/home/beowulf/bin. Your users will need to put this
directory into their path for LAM to function correctly.
At a minimum, the LAM Team strongly advises reading at least the "For the Impatient" section of the LAM/MPI Installation Guide.
[ Top of page | Return to FAQ ]
12. configure complains that it can't find a C++ compiler --
I don't have one installed. Can I still use LAM? |
No. Starting with LAM 7.0, portions of LAM are written in C++ and it
is not possible to build a working LAM installation without a C++
compiler.
It is still possible to disable the MPI-2 C++ bindings with the
--without-mpi2cpp configure option.
[ Top of page | Return to FAQ ]
13. configure complains that it can't find a Fortran compiler
-- I don't have one installed. Can I still use LAM? |
Yes. LAM does not require a Fortran compiler to install or function
properly. You can specify the --without-fc option to
configure to disable the checks for the Fortran compiler:
shell% cd lam-7.1.1
shell% ./configure --without-fc
However, you will not be able to use the MPI Fortran bindings that are included in LAM/MPI.
[ Top of page | Return to FAQ ]
| 14. How do I change the default C/C++/Fortran compilers? |
The default C/C++/Fortran compilers can be specified using the
or, with a
[ Top of page | Return to FAQ ]
As with the C/C++/Fortran compilers, you can set an environment
variable before running
For example, to enable debugging support for the LAM C and C++
libraries (i.e., to enable debugging support within the LAM functions
when debugging user code):
with a C shell or C shell derrivative:
or, with the
[ Top of page | Return to FAQ ]
Just as with the compile flags, you can set the environment variable
For example, to enable debugging support for all LAM executables:
with a C shell or C shell derrivative:
or with
[ Top of page | Return to FAQ ]
Generally, you will have to specify C, C++, and Fortran flags in
the configuration step. However, each vendor's compiler flags are
different. For example, the following will configure LAM for 64 bit
mode under using the Solaris Forte 6.0 compilers (using Bourne-like
shells):
[ Top of page | Return to FAQ ]
LAM/MPI uses GNU Libtool to build its libraries. Hence, all LAM/MPI
supports all platforms that Libtool supports.
Although Libtool supports building static libraries with most
compilers on most platforms, Libtool only supports building shared
libraries on a subset of those compilers and platforms. Consult the
GNU Libtool web
site (particularly the mailing list archives) for the most recent
information and patches to support modern compilers and platforms.
For example, problems with the Intel compiler version 7.1 are
discussed in the following post on the GNU Libtool mailing list: http://mail.gnu.org/archive/html/libtool/2003-04/msg00008.html.
[ Top of page | Return to FAQ ]
Starting with LAM 7.0, the message passing mechanism selection is a run-time
option. See the Running LAM/MPI Applications section of the FAQ for more
information.
[ Top of page | Return to FAQ ]
If you do not specify one, the For example, to specify the
Note that the [ Top of page | Return to FAQ ]
The compiled-in value for the remote shell program can be overriden at
run-time by the user by setting the
For example, to specify the
Note that the [ Top of page | Return to FAQ ]
By default, LAM uses As the argument to the For example, to change the signal that LAM uses internally to
[ Top of page | Return to FAQ ]
ROMIO support is now enabled by default (it wasn't in prior versions
of LAM/MPI).
The ROMIO package from the
Argonne National Laboratory provides MPI I/O support as described
in Chapter 9 of the MPI-2
standard. ROMIO is layered almost entirely on top of MPI-1
function calls; hence, the LAM Team was able to import the ROMIO code
and "hook it in" to LAM.
When ROMIO support is enabled, the
ROMIO support is not enabled by default in LAM's
[ Top of page | Return to FAQ ]
If you do not wish to build LAM with the MPI 2 C++ bindings, you can use the
[ Top of page | Return to FAQ ]
Simply type [ Top of page | Return to FAQ ]
You can invoke [ Top of page | Return to FAQ ]
include("$lamtop/includes/nav_footer.php3");
CC
CODE>, CXX, and FC environment
variables. With a C shell or C shell derrivative:
shell% cd lam-7.1.1
shell% setenv CC cc
shell% setenv CXX CC
shell% setenv FC f77
shell% ./configure
sh shell or derivative:
shell$ cd lam-7.1.1
shell$ CC=cc
shell$ CXX=CC
shell$ FC=f77
shell$ export CC CXX FC
shell$ ./configure
15. How do I change the default C/C++/Fortran compiler flags?
configure to set compiler flags.
If you do not specify any of these flags, configure will
choose suitable optimization flags for your architecture (such as
-O or -fast).
Compiler
Environment variable
C
CFLAGS
Fortran
FFLAGS
C++
CXXFLAGS
shell% cd lam-7.1.1
shell% setenv CFLAGS -g
shell% setenv CXXFLAGS -g
shell% ./configure
sh or derivative shell:
shell$ cd lam-7.1.1
shell$ CFLAGS=-g
shell$ CXXFLAGS=-g
shell$ export CFLAGS CXXFLAGS
shell$ ./configure
16. How do I change the default linker flags?
LDFLAGS before you run configure:
shell% cd lam-7.1.1
shell% setenv LDFLAGS -g
shell% ./configure
sh or derivative shell:
shell$ cd lam-7.1.1
shell$ LDFLAGS=-g
shell$ export LDFLAGS
shell$ ./configure
17. How do I compile LAM in 64 bit mode?
shell$ CFLAGS="-xarch=v9"
shell$ CXXFLAGS="-xarch=v9"
shell$ FFLAGS="-xarch=v9"
shell$ export CFLAGS CXXFLAGS FFLAGS
shell$ ./configure ...
18. Can LAM build shared libraries?
19. How do I change the message passing mechanism?
Applies to LAM 7.0 and above
20. How do I change the default remote shell program (e.g., rsh) at
compile time??
configure script will
choose a remote shell program appropriate for your architecture. You
can override the default with the --with-rsh option to
configure. You can specify a different remote shell
program, and optionally specify command line options for it (be sure
to put them in quotes). This may be necessary at some sites where
rsh is disabled for security reasons.
ssh secure shell program,
use:
shell% cd lam-7.1.1
shell% ./configure --with-rsh="/bin/ssh -x"
-x option to ssh may be
necessary for the 1.x series of ssh clients.
-x disables X forwarding; using X forwarding will trigger
a status message from xauth that ssh outputs
to the standard error. Any output in the standard error will cause
LAM binaries to fail (because they assume that an error has occurred).
The -p option may also be helpful in suppressing
stderr output; see the ssh documentation.
21. How do I change the default remote shell program (e.g. rsh) at run time?
LAMRSH environment variable. Using this option only sets
the default remote shell program that LAM will use if the
user does not override it.
ssh secure shell program,
use (with a Bourne shell, or sh derrivative):
or with a C shell or other csh derrivative:
shell$ LAMRSH="ssh -x"
shell$ export LAMRSH
shell$ mpirun ...
shell% setenv LAMRSH "ssh -x"
shell% mpirun ...
-x option to ssh is
necessary for the 1.x series of ssh clients.
-x disables X forwarding; using X forwarding will trigger
a status message from xauth that ssh outputs
to the standard error. Any output in the standard error will cause
LAM binaries to fail (because they assume that an error has occurred).
The -p option may also be helpful in suppressing
stderr output; see the ssh documentation.
22. How do I change the signal that LAM uses internally?
SIGUSR2 internally for some of its
signalling. LAM must use some signal -- but it does not need
to be SIGUSR2. You can change it with the
--with-signal command line argument to
configure.
--with-signal option, you can
use either a name that is defined in signal.h or an
integer number. It is probably safer to use a name from
signal.h.
SIGUSR1:
shell% cd lam-7.1.1
shell% ./configure --with-signal=SIGUSR1
23. How do I enable ROMIO MPI I/O support?
mpicc,
mpiCC, and mpif77 LAM "wrapper" compilers
automatically link in the ROMIO include directories, library
directories, and relevant libraries. As a result, user LAM/MPI
programs that use MPI-2 I/O calls can compile with no extra flags on
the command line -- ROMIO has been seamlessly integrated into LAM:
shell% mpicc my-romio-program.c -o romio-program
configure script because of some current limitations in
the ROMIO implementation with LAM. All MPI-2 datatypes that are
enabled in LAM will not work
with ROMIO. For example, the MPI-2 datatype
MPI_TYPE_DARRAY (which LAM supports) will not work with
ROMIO. It is hoped that this will be fixed in the next release of
ROMIO.
24. How do I disable MPI 2 C++ bindings support?
--without-mpi2cpp option to configure. Note that
you still must have a C++ compiler available to build LAM 7.0 and later.
25. After I've got all this configured, how do I build LAM?
make and LAM will build itself. To install
LAM, use the command make install and LAM will install itself into
the tree specified with the --prefix option (or /usr/local
code>, if not specified).
26. How do I build the LAM / ROMIO / MPI 2 C++ example programs?
make examples from the top-level LAM directory. This will build the LAM examples, the ROMIO examples (if ROMIO support is enabled), and the MPI 2 C++ examples (if MPI 2 C++ support is enabled). By default, the Makefiles are set to use the
mpicc, mpiCC, and mpif77 compilers from the version of LAM that you just compiled. These executables must be in your path for the Makefile to work.