AMBER Archive (2005)Subject: RE: AMBER: Amber 8 with lam compilation problem
From: Ross Walker (ross_at_rosswalker.co.uk)
Date: Mon Feb 21 2005 - 03:20:21 CST
> I am trying to compile amber 8 with intel 8.1 fortran compiler
> and lam on my slackware linux dual xeon system . I dont known
> what i have done wrong i folow instructions in
> http://amber.ch.ic.ac.uk/archive/200408/0094.html and when i make
> make parallel i have that output
> : undefined reference to `pthread_create'
> /opt/lam//lib/liblam.a(lamthreads.o)(.text+0x1d): In function
> `lam_thread_exit':
> : undefined reference to `pthread_exit'
> /opt/lam//lib/liblam.a(lamthreads.o)(.text+0x2b): In function
> `lam_thread_join':
> : undefined reference to `pthread_join'
> /opt/lam//lib/liblam.a(lamthreads.o)(.text+0x35): In function
> `lam_thread_self':
> : undefined reference to `pthread_self'
> /opt/lam//lib/liblam.a(lamthreads.o)(.text+0x43): In function
> `lam_thread_compare':
> : undefined reference to `pthread_equal'
> make[1]: *** [sander] Error 1
> make: *** [parallel] Error 2
This sounds to me like you have lam compiled for g77 while you are compiling
amber with ifort. This a common problem and has been discussed on the list
before. You may also be missing the pthreads library. This is part of the
glibc-devel rpm. E.g. on my system:
rpm -q -f /usr/lib/libpthread.so
glibc-devel-2.3.2-27.9.7
Try locate libpthread
Also check the LOADLIB line of your amber config.h file. It should be
something like this (paths may be slightly different):
LOADLIB= -L/usr/local/mpi/lam/intel-8.0//lib -llammpio -llamf77mpi -lmpi
-llam -lutil -lsvml /opt/intel/mkl61//lib/32/libmkl_lapack.a
/opt/intel/mkl61//lib/32/libmkl_ia32.a -L/opt/intel/mkl61//lib/32 -lguide
-lpthread
If you can't get things to work I would start again from scratch. First of
install the development RPMS. Then confirm that you can compile serial. If
this all works then the problem is definitely with your lam installation.
The installation of lam that comes with Linux by default is compile for use
with g77 this is no good with ifort because ifort and g77 use different
naming conventions. Step 1 use rpm to uninstall lam. Step 2 go and get the
latest version of lam from the lam website as source:
http://www.lam-mpi.org/download/files/lam-7.0.6.tar.bz2
Untar it and then do:
setenv CC=icc
setenv CXX=icc
setenv FC=ifort
setenv F77=ifort
setenv LDFLAGS -all-static
setenv FFLAGS -static
setenv CFLAGS -static
setenv CXXFLAGS -static
setenv CXXLDFLAGS -static
./configure --without-romio --prefix=/add your install dir here/intel-8.0/
make
make install
make examples
Once all the examples work you need to add LAMHOME and related variables to
your bashrc or equivalent shell config file. E.g.
export PATH="/usr/local/mpi/lam/intel-8.0/bin:$PATH"
export LAMHOME="/usr/local/mpi/lam/intel-8.0"
export LAM_HOME="/usr/local/mpi/lam/intel-8.0"
Then open a new shell so it sources the settings. Go to your amber8 dir and
do:
./configure -p4 -static -lam ifort
(Note if you only have libpthread.so.xxx and not .a.xxx then you will not be
able to compile statically. Similarly if you have not compiled lamd with
-all-static you may have problems building statically.)
Check the config.h file and check the paths for the mpi libraries point to
your new lam installation.
Then you should be good to build amber8 in parallel... Once that is done
make sure you run the tests:
lamboot lamdef_file
export DO_PARALLEL="mpirun -np 4"
cd $AMBERHOME/test
make
All the best
Ross
/\
\/
|\oss Walker
| Department of Molecular Biology TPC15 |
| The Scripps Research Institute |
| Tel:- +1 858 784 8889 | EMail:- ross_at_rosswalker.co.uk |
| http://www.rosswalker.co.uk/ | PGP Key available on request |
Note: Electronic Mail is not secure, has no guarantee of delivery, may not
be read every day, and should not be used for urgent or sensitive issues.
-----------------------------------------------------------------------
The AMBER Mail Reflector
To post, send mail to amber_at_scripps.edu
To unsubscribe, send "unsubscribe amber" to majordomo_at_scripps.edu
|