RE: AMBER: Amber8 - LAM MPI Compilation problems

From: Ross Walker <ross.rosswalker.co.uk>
Date: Tue, 10 Aug 2004 09:59:33 -0700

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
ifcvars.sh and iccvars.sh).
 
> 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.

Do:

rpm -e lam

This will uninstall the current version of lam. Then get the latest version
of lam from http://www.lam-mpi.org/7.0/download.php

You want the source code version, currently
http://www.lam-mpi.org/download/files/lam-7.0.6.tar.gz

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
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
lam:

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
Ross

/\
\/
|\oss Walker

| Department of Molecular Biology TPC15 |
| The Scripps Research Institute |
| Tel:- +1 858 784 8889 | EMail:- ross.rosswalker.co.uk |
| http://www.rosswalker.co.uk/ | PGP Key available on request |


-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber.scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo.scripps.edu
Received on Tue Aug 10 2004 - 18:53:00 PDT
Custom Search