AMBER Archive (2004)

Subject: RE: AMBER: Amber8 - LAM MPI Compilation problems

From: Ross Walker (
Date: Tue Aug 10 2004 - 11:59:33 CDT

Hi Thomas,

> I am trying to compile the parallel programs of amber8
> using gcc and intel fortran compilers for use with lam_mpi
> version 6.5.6 on Suse Linux.

Step 1 - edit config.h and change gcc to icc. (make sure you have sourced and
> configure -lam ifort
> to prepare for parallel installation. make install results
> in this error:
> sander.o: In function `MAIN__':
> sander.o(.text+0x2b): undefined reference to `mpi_init_'
> sander.o(.text+0x57): undefined reference to `mpi_comm_rank_'
> sander.o(.text+0x7b): undefined reference to `mpi_comm_size_'
> sander.o(.text+0x97): undefined reference to `mpi_barrier_'

Step 2 - you need compile lam using the intel compilers. By default the RPM
version of lam is compiled with g77 and so will not link again ifort
compiled binaries.


rpm -e lam

This will uninstall the current version of lam. Then get the latest version
of lam from

You want the source code version, currently

Untar this to a suitable directory. tar xvzf lam-7.0.6.tar.gz

mkdir lam
cd lam-7.0.6
export CC=icc
export CXX=icc
export FC=ifort
export F77=ifort
./configure --prefix=/path_to_where_lam_dir_was_made/lam
make install
make examples

Once this is all done you should have an installation of lam in ../lam

Add the full path to the new binaries to your path variable, probably best
to edit /etc/bashrc also add the other required variables:

For me this is:
export PATH=$PATH:/redfish/applications/case/mpi/lam/intel-8.0/bin
export LAMRSH=rsh
export LAMHOME=/redfish/applications/case/mpi/lam/intel-8.0/

Then you are all set. Just check that you are using the correct version of

which lamboot should give /path_to_new_lam/bin/lamboot

Then go to your amber src directory, delete config.h and run ./configure
again. It is probably best to compile the amber as static so:

./configure -p4 -static -lam ifort

Note, make sure you change gcc to icc in config.h before recompiling (not
strictly necessary but a good idea in case we introduce any mpi programs
written in c in the future.)

Hope this helps.
If you still have problems give me a ring... If you still have a login for
redfish take a look on there as well in /redfish/applications/case/

All the best

|\oss Walker

| Department of Molecular Biology TPC15 |
| The Scripps Research Institute |
| Tel:- +1 858 784 8889 | EMail:- |
| | PGP Key available on request |

The AMBER Mail Reflector
To post, send mail to
To unsubscribe, send "unsubscribe amber" to