AMBER: compiling amber with pgi 5.2.4

From: Hannes Barsch <>
Date: Mon, 24 Oct 2005 14:21:11 +0200

Dear AMBER community!

On a newly installed Opteron system I am not able to compile AMBER 8 using
the Portland Group compilers. I use the same settings as in a former
install - the only differences are the version of PGI (now 5.2.4, before
5.2.2) and the Rocks-OS version (now 4.0.0 (based on CentOS 4.0), before
3.2.0 (based on RHEL 3.0)). I also included Bob Duke's configuration updates
for PMEMD now, but the compilation error occurs already earlier at the
compilation of bondtype.C in the antechamber module:

   pgcc -O2 atomtype.o -lm -o atomtype
   pgCC -c -o bondtype.o bondtype.C
   "/usr/local/pgi/linux86-64/5.2/include/CC/stl/_bvector.h", line 86:
             identifier "__CHAR_BIT__" is undefined
         if (_M_offset++ == __WORD_BIT - 1) {

   "/usr/local/pgi/linux86-64/5.2/include/CC/stl/_bvector.h", line 94:
             identifier "__CHAR_BIT__" is undefined
           _M_offset = __WORD_BIT - 1;

   "/usr/local/pgi/linux86-64/5.2/include/CC/stl/_bvector.h", line 106:
             identifier "__CHAR_BIT__" is undefined
         _M_p += __n / __WORD_BIT;

   "/usr/local/pgi/linux86-64/5.2/include/CC/stl/_bvector.h", line 116:
             identifier "__CHAR_BIT__" is undefined
         return __WORD_BIT * (_M_p - __x._M_p) + _M_offset - __x._M_offset;

   4 errors detected in the compilation of "bondtype.C".
   make[1]: *** [bondtype.o] Error 2
   make[1]: Leaving directory
   make: *** [serial] Error 2
   error: Bad exit status from /var/tmp/rpm-tmp.72495 (%build)

The /usr/local/pgi/linux86-64/5.2/include/CC/stl/_bvector.h does not differ
from the header file of the older PGI installation.

Has anyone compiled amber with this combination of HW / OS / compilers and
realized similar compile errors? Does anybody know why this error might
happen? If so, please give me a hint!
Thanks for your help! Regards,

Hannes Barsch


The RPM spec file looks like this:

   Summary: AMBER 8
   Name: amber
   Version: 8
   Release: 0
   Copyright: University of California
   Group: Sciences/Chemistry
   Source0: %{name}-%{version}.tar.gz # amber 8 source from CD
   Source1: %{name}-%{version}.pmemd.tar.gz # new configuration files from
   Source2: %{name}-%{version}.local.tar.gz # configuration files for
opterons/PGI from
   Patch0: %{name}-%{version}.patch0 # amber bugfixes from
   Patch1: %{name}-%{version}.patch1 # PGI fixes adopted from
   Packager: Hannes Barsch, University of Bielefeld
   AutoReq: no
   Requires: /bin/csh, /bin/sh, /bin/sh, /bin/sh, /usr/bin/perl,,,,,,,,,,,,,, perl(CPin),
perl(Carp), perl(Data::Dumper), perl(Getopt::Long), perl(IO::File),
perl(lib), perl(strict), rpmlib(CompressedFileNames)<= 3.0.4-1,
rpmlib(PayloadFilesHavePrefix) <= 4.0-1

   Amber refers to two things: a set of molecular mechanical force fields
for the simulation of biomolecules (which are in the public domain, and are
used in a variety of simulation programs); and a package of molecular
simulation programs which includes source code and demos.

   %setup -q
   %setup -qDTb 1
   %setup -qDTb 2
   %patch -P 0
   %patch -P 1

   export PGI=/usr/local/pgi
   export AMBERHOME=$RPM_BUILD_DIR/%{name}-%{version}
   export GM_LIBDIR=/opt/gm/lib
   cd $AMBERHOME/src
   ./configure -nopar -opteron -acml -lapack pgf90
   make -e YACC="/usr/bin/bison -y" X11LIBDIR="lib64" serial
   cd pmemd
   ./new_configure linux_opteron pgf90 nopar
   make install
   cd $AMBERHOME/exe
   mv pmemd pmemd.serial
   mv sander sander.serial
   mv sander.LES sander.LES.serial

   cd $AMBERHOME/src
   ./configure -mpich -opteron -acml -lapack pgf90
   make -e YACC="/usr/bin/bison -y" X11LIBDIR="lib64" parallel
   cd pmemd
   ./new_configure linux_opteron pgf90 mpich
   make install


The AMBER Mail Reflector
To post, send mail to
To unsubscribe, send "unsubscribe amber" to
Received on Mon Oct 24 2005 - 13:53:00 PDT
Custom Search