RE: AMBER: compiler error for Amber9

From: Ross Walker <>
Date: Wed, 7 Jun 2006 08:34:20 -0700

Dear Weihua,
Whenever you see this type of message:
/usr/bin/ld: skipping incompatible
/home/ytang/gdata/whli/openmpi/lib/libmpi_f90.a when searching for -lmpi_f90
/usr/bin/ld: cannot find -lmpi_f90

It means that the type of executable you are building (32 bit vs 64 bit)
does not match with the way the library you are linking against was built. I
suspect that you build openmpi using pgf90 running in 64 bit mode. However,
at the time of Amber9's release the latest pgf90 version was pgf90 6.1-3
64-bit target on x86-64 Linux - this has numerous bugs in the 64 bit
implementation and as a result the amber executables fail a large number of
the test cases. We managed to work around this problem by forcing 32 bit
compilation with the Portland group compilers on x86_64 architectures. This
means that you need to build MPI in 32 bit as well (-tpp7). However, my
advice to you on Opteron is, suprisingly enough, to download the Intel
compilers (the em64t ones) and use these. These will build amber and pmemd
fine in 64 bit mode and will probably run faster (Get version 9.0.033 from after you setup an account).
For pmemd the problem is that the configure script is looking for mpich and
not openmpi - the installations have very different library names. I don't
think there is a configure option available for openmpi - perhaps Bob Duke
can comment further. For the moment I would edit the config.h and replace
the MPI_LIBS line with:
-L$(MPI_LIBDIR) -lmpi_f90 -lmpi -lorte -lopal -lutil -lnsl -lpthread -ldl
-Wl,--export-dynamic -lm -lutil -lnsl -lpthread -ldl
This should probably work. Note, pmemd 'does' work with the Portland group
compiler in 64 bit mode, although I have not rigorously tested it to be sure
of this. This means that if you want to build both Sander and PMEMD with the
Portland group compilers you will need to either build both a 32 bit and a
64 bit version of openmpi or edit pmemd's config.h and add -tp p7 to the
F90_OPT_* lines to force 32 bit compilation.
Note if you have a different Portland group compiler to 6.1-3 you could
always try compiling sander in 64 bit mode - just edit the
$AMBERHOME/src/config.h file and just delete the -tp p7 and change all
occurances of -m32 to -m64. Just make sure you run ALL of the test cases and
carefully check the output.
All the best

|\oss Walker

| HPC Consultant and Staff Scientist |
| San Diego Supercomputer Center |
| Tel: +1 858 822 0854 | EMail:- |
| <> | 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.



From: [] On Behalf Of
Weihua Li
Sent: Wednesday, June 07, 2006 07:35
Subject: AMBER: compiler error for Amber9

Dear all,
        CPU: AMD opeteron Linux86-64
         I used the following command to configure the open-mpi-1.0.2.
        ./configure --prefix=/home/ytang/gdata/whli/openmpi CC=pgcc CXX=pgCC
F90=pgf90 --with-openib
       and set environment variables in .bashrc as follows:
           export MPI_HOME=/home/ytang/gdata/whli/openmpi
          export PATH=$MPI_HOME/bin:$PATH
In the ~openmpi/lib directory: libmpi_f90.a
<> <>
<> mpi_kinds.mod mpi.mod openmpi
For PMEMD module:

pgf90 -o pmemd gbl_constants.o gbl_datatypes.o state_info.o file_io_dat.o
parallel_dat.o mdin_ctrl_dat.o mdin_ewald_dat.o prmtop_dat.o inpcrd
_dat.o dynamics_dat.o img.o parallel.o pme_direct.o pme_recip.o pme_fft.o
fft1d.o bspline.o pme_force.o pbc.o nb_pairlist.o cit.o dynamics.o b
onds.o angles.o dihedrals.o runmd.o loadbal.o shake.o runmin.o constraints.o
axis_optimize.o gb_ene.o veclib.o gb_force.o timers.o pmemd_lib.o
 runfiles.o file_io.o bintraj.o pmemd_clib.o pmemd.o random.o degcnt.o
erfcfun.o nmr_calls.o nmr_lib.o get_cmdline.o master_setup.o alltasks_s
etup.o pme_setup.o ene_frc_splines.o nextprmtop_section.o
-L/home/ytang/gdata/whli/openmpi/lib -lmpich
/usr/bin/ld: cannot find -lmpich
make[1]: *** [pmemd] Error 2
make[1]: Leaving directory `/gdata/lun8/ytang/whli/amber9/src/pmemd/src'
make: *** [install] Error 2

For sander module:

 ../lmod/lmod.a ../lapack/lapack.a ../blas/blas.a \
../lib/nxtsec.o ../lib/sys.a -L/home/ytang/gdata/whli/openmpi/lib -lmpi_f90
-lmpi -lorte -lopal -lutil -lnsl -lpthread -ldl -Wl,--export-dynamic -lm
-lutil -lnsl -lpthread -ldl
/usr/bin/ld: skipping incompatible
/home/ytang/gdata/whli/openmpi/lib/libmpi_f90.a when searching for -lmpi_f90
/usr/bin/ld: cannot find -lmpi_f90
make[1]: *** [sander.MPI] Error 2
make[1]: Leaving directory `/gdata/lun8/ytang/whli/amber9/src/sander'
make: *** [parallel] Error 2

I know it must be something wrong with the installation of open-mpi, but I
don't know where it is.

Could you please give me some advice?

Best regards,
The AMBER Mail Reflector
To post, send mail to
To unsubscribe, send "unsubscribe amber" to
Received on Sun Jun 11 2006 - 06:07:07 PDT
Custom Search