Amber 11 And AmberTools 1.5 In Ubuntu 10.04 LTS (And Related, Including A How-To For EOL 8.10)

Having successfully navigated serial and parallel Amber10 installs under Ubuntu 8.10, I am pleased to report that the process for Amber11 with OpenMPI (from apt-get, one doesn’t have to build from scratch) under Ubuntu 10.10 is seemingly much easier (and have it here so I don’t forget). There is a bit of persnicketiness to the order of the serial and parallel installs that must be kept track of (and I’m building in serial-to-parallel order), but the process is otherwise straightforward.

For organizational purposes, I’m building amber11 in my $HOME directory. This removes some of the PATH issues with sudo-ing aspects of the install (and can be moved into another directory after the build is complete).

1. apt-get Installs

The search for dependent programs and libraries is a long and involved one given how many programs I have installed. Therefore, instead of trying to find all of the amber-dependent installs for successful building, I’m simply providing the list of everything I have on the test machine. As hard drives are cheap and Ubuntu will warn of conflicts, I recommend simply installing the below and accepting the 100 Mb hit to NOT have to find the smallest apt-get set (yes, some of these are obviously not needed).

sudo apt-get install build-essential cmake doxygen freeglut3-dev g++-multilib gcc-multilib gettext gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev libopenal1 libopenexr-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxi-dev libxml-simple-perl libxmu-dev mercurial nfs-common nfs-kernel-server portmap python2.6-dev rpm ssh

The above said, there are some obvious most-important installs that have to be there (according to the “official” Ubuntu amber11 install summary at ambermd.org/ubuntu.html). You could try to work with only these first if you were in a diagnostic mood today:

sudo apt-get install bison csh flex fort77 g++ gcc gfortran libbz2-dev libnetcdf-dev libopenmpi-dev libxext-dev libxt-dev openmpi-bin patch tcsh xorg-dev zlib1g-dev

With that, we move onto the AmberTools 1.5 install.

2. AmberTools 1.5 (Serial)

The AmberTools build process deals with PATH specifications for both it and Amber, then walks you through patching and a successful build.

user@machine:~$ tar xjf AmberTools-1.5.tar.bz2 
user@machine:~$ cd amber11/
user@machine:~/amber11$ echo "export AMBERHOME=$PWD" >> ~/.bashrc
user@machine:~/amber11$ echo "export PATH=$PATH:$AMBERHOME/bin" >> ~/.bashrc
user@machine:~/amber11$ source ~/.bashrc
user@machine:~/amber11$ wget http://ambermd.org/bugfixes/AmberTools/1.5/bugfix.all
user@machine:~/amber11$ patch -p0 < bugfix.all
user@machine:~/amber11$ rm bugfix.all
user@machine:~/amber11$ cd AmberTools/src/
user@machine:~/amber11/AmberTools/src$ ./configure gnu
user@machine:~/amber11/AmberTools/src$ make install
user@machine:~/amber11/AmberTools/src$ cd

3. Amber 11 (Serial Install)

For the Amber build, not building the serial version first will produce the following error (which you may or may not be searching against in google presently):

Warning: Deleted feature: PAUSE statement at (1)
cpp -traditional -P  -DBINTRAJ -DMPI    svbksb.f > _svbksb.f
mpif90 -c -O3 -mtune=generic -ffree-form   -o svbksb.o _svbksb.f
cpp -traditional -P  -DBINTRAJ -DMPI    pythag.f > _pythag.f
mpif90 -c -O3 -mtune=generic -ffree-form   -o pythag.o _pythag.f
Error: a serial version of libFpbsa.a must be built before parallel build.
make[2]: *** [libFpbsa.parallel] Error 2
make[2]: Leaving directory `/home/genomebio/amber11/AmberTools/src/pbsa'
make[1]: *** [libpbsa] Error 2
make[1]: Leaving directory `/home/genomebio/amber11/src/sander'
make: *** [parallel] Error 2

The “gnu” is also important, as there appears to be some kind of formatting (fortran-specific) issue with some files in the non-gnu build attempt that produces the following error if you just blindly run a ./configure:

Error: Unclassifiable statement at (1)
constants.f:39.1:

double precision, parameter :: two       = 2.0d0                        
 1
Error: Non-numeric character in statement label at (1)
constants.f:39.1:

double precision, parameter :: two       = 2.0d0                        
 1
Error: Unclassifiable statement at (1)
constants.f:40.1:

double precision, parameter :: three     = 3.0d0                        
 1
Error: Non-numeric character in statement label at (1)
Fatal Error: Error count reached limit of 25.
make[1]: *** [constants.o] Error 1
make[1]: Leaving directory `/home/user/amber11/src/sander'
make: *** [parallel] Error 2

With that, the serial build is below, including bug fixes.

user@machine:~$ tar xfj Amber11.tar.bz2
user@machine:~$ cd $AMBERHOME
user@machine:~/amber11$ wget http://ambermd.org/bugfixes/11.0/bugfix.all
user@machine:~/amber11$ wget http://ambermd.org/bugfixes/11.0/apply_bugfix.x
user@machine:~/amber11$ chmod +x ./apply_bugfix.x
user@machine:~/amber11$ ./apply_bugfix.x bugfix.all
user@machine:~/amber11$ cd AmberTools/src/
user@machine:~/amber11/AmberTools/src$ ./configure gnu
user@machine:~/amber11/AmberTools/src$ cd $AMBERHOME
user@machine:~/amber11$ ./AT15_Amber11.py 
user@machine:~/amber11$ cd src/
user@machine:~/amber11/src$ make serial

4. Amber 11 (Parallel)

Hopefully the serial build ran non-problematically. The parallel install works just as simply provided you run the process in the order below. The key steps are the “make clean,” new ./configure, re-run of ./AT_Amber11.py, and the other “make clean.”

user@machine:~/amber11/src$ cd $AMBERHOME
user@machine:~/amber11$ cd AmberTools/src/
user@machine:~/amber11/AmberTools/src$ make clean
user@machine:~/amber11/AmberTools/src$ ./configure -mpi gnu
user@machine:~/amber11/AmberTools/src$ cd $AMBERHOME
user@machine:~/amber11$ ./AT15_Amber11.py 
user@machine:~/amber11$ cd src/
user@machine:~/amber11/src$ make clean
user@machine:~/amber11/src$ make parallel

5. Amber 11 (Tests)

Finally, testing the install. Nothing specific to be done as far as the code is concerned, simply running the tests.

user@machine:~/amber11/src$ cd ..
user@machine:~/amber11$ cd test/
user@machine:~/amber11/test$ make -f Makefile
user@machine:~/amber11/test$ 

From the out-of-the-box installation above, my test results complete as follows:

365 file comparisons passed
15 file comparisons failed
0 tests experienced errors
Test log file saved as logs/test_amber_serial/2011-07-14_11-19-47.log
Test diffs file saved as logs/test_amber_serial/2011-07-14_11-19-47.diff

The failed tests include those already mentioned by the Amber developers to fail. This list is provided at the end of the AT15_Amber11.py results:

NOTE: Because PBSA has changed since Amber 11 was released, some
tests are known to fail and others are known to quit in error. These
can be safely ignored.

Tests that error: Tests in $AMBERHOME/test/sander_pbsa_frc
   Run.argasp.min    Run.dadt.min      Run.dgdc.min
   Run.lysasp.min    Run.polyALA.min   Run.polyAT.min
   Run.argasp.min    Run.dadt.min      Run.dgdc.min
   Run.lysasp.min    Run.polyALA.min   Run.polyAT.min
   Run.argasp.min    Run.dadt.min      Run.dgdc.min
   Run.lysasp.min    Run.polyALA.min   Run.polyAT.min

Tests that produce possible FAILUREs:
   cd sander_pbsa_ipb2   && ./Run.110D.min
   cd sander_pbsa_lpb    && ./Run.lsolver.min (only some of them fail here)
   cd sander_pbsa_tsr    && ./Run.tsrb.min
   cd sander_pbsa_decres && ./Run.pbsa_decres
   mm_pbsa.pl tests 02, 03, and 05

6. Quick Summary

For ease of copy-and-paste-ing, the command list is below:

apt-get

sudo apt-get install build-essential cmake doxygen freeglut3-dev g++-multilib gcc-multilib gettext gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev libopenal1 libopenexr-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxi-dev libxml-simple-perl libxmu-dev mercurial nfs-common nfs-kernel-server portmap python2.6-dev rpm ssh

sudo apt-get install bison csh flex fort77 g++ gcc gfortran libbz2-dev libnetcdf-dev libopenmpi-dev libxext-dev libxt-dev openmpi-bin patch tcsh xorg-dev zlib1g-dev

AmberTools

tar xjf AmberTools-1.5.tar.bz2 
cd amber11/
echo "export AMBERHOME=$PWD" >> ~/.bashrc
echo "export PATH=$PATH:$AMBERHOME/bin" >> ~/.bashrc
source ~/.bashrc
wget http://ambermd.org/bugfixes/AmberTools/1.5/bugfix.all
patch -p0 < bugfix.all
rm bugfix.all
cd AmberTools/src/
./configure gnu
make install
cd

Amber 11 (Serial)

tar xfj Amber11.tar.bz2
cd $AMBERHOME
wget http://ambermd.org/bugfixes/11.0/bugfix.all
wget http://ambermd.org/bugfixes/11.0/apply_bugfix.x
chmod +x ./apply_bugfix.x
./apply_bugfix.x bugfix.all
cd AmberTools/src/
./configure gnu
cd $AMBERHOME
./AT15_Amber11.py 
cd src/
make serial

Amber 11 (Parallel)

cd $AMBERHOME
cd AmberTools/src/
make clean
./configure -mpi gnu
cd $AMBERHOME
./AT15_Amber11.py 
cd src/
make clean
make parallel

Amber Tests

cd ..
cd test/
make -f Makefile

7. And Furthermore…

I tried the above on an old linux box running Intrepid Ibex (8.10), which counts as an End-Of-Life (Obsolete) version. Running all of the apt-get installs will work despite 8.10 not existing in the standard package locations, but you have to make the following addition to /etc/apt/sources.list.

sudo pico /etc/apt/sources.list

And copy-and-paste the following (this all taken from help.ubuntu.com/community/EOLUpgrades/Intrepid):

## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ intrepid main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ intrepid-security main restricted universe multiverse

Two Degrees Of Installation – How To Offline Apt-Get In Ubuntu (and Debian-Related)

Here’s a possible situation leading to your stumbling on this post.  You’ve installed and updated Ubuntu on a machine (or 11) in a room with its one IP address already dedicated to another machine (and the building sys admin doesn’t take kindly to you sitting on a dozen or more dedicated IP addresses), you didn’t set up any NAT to feed the connection of one dedicated machine to the rest of the machines in the room, you don’t want to switch cables around because you’ve already zip-tied everything down with a Vulcan death grip and don’t want to start cutting because you can’t find free CAT6, and you don’t feel like opening /etc/network/interfaces a dozen times to reset the IP addresses and gateways on 11 machines to install one #&$@*ing piece of software you forgot on your initial install + upgrade (or, as was my case, I didn’t know that one piece of software WASN’T installed as part of the standard package).

You are in luck, with the dirty work made much, much easier if you already have an Ubuntu box online.

Installing packages in Ubuntu while offline involves (1) determining which programs and assorted libraries are required for what you want to install, (2) collecting all of the necessary install files from either the intertubes or an online Ubuntu box you can apt-get with (what I will assume here) and (3) using the Debian dpkg program instead of apt-get (which, to the best of my knowledge, is basically the same difference) to perform the installation on the offline box.  If you’ve an online Ubuntu box, then step (1) involves installing the program you want to install on the other computers so that all of the necessary install files are downloaded, sitting locally, and ready for flashdrive (or LAN) transfer (and I assume you’re running either all 32- or all 64-bit on the machines, such that the offline machine is the same as the online machine).

LEGEND

Text in black – my ramblings.

Text in bold red – things you will type in the Terminal

Text in green – text you will either see or will type into files (using pico, my preference)

I’ll be using the installation of NFS (network file system) as my example.  You’ll get a handle for what needs to be done for your own installs this way.

(1 – Online Box) Installing Program [X] On An Online Ubuntu Box With apt-get

For some programs, only one install file may be required.  Generally, however, your apt-get install will list several additional “new” and “extra” packages, often missing libraries and system files required for the installed program to run.  As you should suspect, you will need ALL of these files to install your programs on offline machines.  Fortunately, all of these packages are downloaded and saved in their installation format (.deb) locally.

For NFS, the three core installed packages I ran my initial apt-get for…

a. sudo apt-get install nfs-kernel-server nfs-common portmap

Yielded the following output

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
libevent1 libgssglue1 libnfsidmap2 librpcsecgss3
The following NEW packages will be installed:
libevent1 libgssglue1 libnfsidmap2 librpcsecgss3 nfs-common nfs-kernel-server portmap
0 upgraded, 7 newly installed, 0 to remove and 96 not upgraded.
Need to get 530kB of archives.
After this operation, 1642kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://us.archive.ubuntu.com hardy/main libevent1 1.3e-1 [49.3kB]
Get:2 http://us.archive.ubuntu.com hardy/main libgssglue1 0.1-1 [22.2kB]
Get:3 http://us.archive.ubuntu.com hardy/main libnfsidmap2 0.20-0build1 [24.7kB]
Get:4 http://us.archive.ubuntu.com hardy-updates/main librpcsecgss3 0.17-1ubuntu2 [33.8kB]
Get:5 http://us.archive.ubuntu.com hardy/main portmap 6.0-4 [34.6kB]
Get:6 http://us.archive.ubuntu.com hardy-updates/main nfs-common 1:1.1.2-2ubuntu2.2 [203kB]
Get:7 http://us.archive.ubuntu.com hardy-updates/main nfs-kernel-server 1:1.1.2-2ubuntu2.2 [162kB]
Fetched 530kB in 1s (378kB/s)
Preconfiguring packages …
Selecting previously deselected package libevent1.
(Reading database … 31771 files and directories currently installed.)
Unpacking libevent1 (from …/libevent1_1.3e-1_amd64.deb) …
Selecting previously deselected package libgssglue1.
Unpacking libgssglue1 (from …/libgssglue1_0.1-1_amd64.deb) …
Selecting previously deselected package libnfsidmap2.
Unpacking libnfsidmap2 (from …/libnfsidmap2_0.20-0build1_amd64.deb) …
Selecting previously deselected package librpcsecgss3.
Unpacking librpcsecgss3 (from …/librpcsecgss3_0.17-1ubuntu2_amd64.deb) …
Selecting previously deselected package portmap.
Unpacking portmap (from …/portmap_6.0-4_amd64.deb) …
Selecting previously deselected package nfs-common.
Unpacking nfs-common (from …/nfs-common_1%3a1.1.2-2ubuntu2.2_amd64.deb) …
Selecting previously deselected package nfs-kernel-server.
Unpacking nfs-kernel-server (from …/nfs-kernel-server_1%3a1.1.2-2ubuntu2.2_amd64.deb) …
Setting up libevent1 (1.3e-1) …

Setting up libgssglue1 (0.1-1) …

Setting up libnfsidmap2 (0.20-0build1) …

Setting up librpcsecgss3 (0.17-1ubuntu2) …

Setting up portmap (6.0-4) …
* Starting portmap daemon…
…done.

Setting up nfs-common (1:1.1.2-2ubuntu2.2) …

Creating config file /etc/idmapd.conf with new version

Creating config file /etc/default/nfs-common with new version
Adding system user `statd’ (UID 104) …
Adding new user `statd’ (UID 104) with group `nogroup’ …
Not creating home directory `/var/lib/nfs’.
* Starting NFS common utilities
…done.

Setting up nfs-kernel-server (1:1.1.2-2ubuntu2.2) …

Creating config file /etc/exports with new version

Creating config file /etc/default/nfs-kernel-server with new version
* Starting NFS common utilities
…done.
* Exporting directories for NFS kernel daemon…
…done.
* Starting NFS kernel daemon
…done.

Processing triggers for libc6 …
ldconfig deferred processing now taking place

So, from the three programs I knew I needed…

nfs-kernel-server nfs-common portmap

The following list of packages were downloaded and installed…

nfs-kernel-server nfs-common portmap libevent1 libgssglue1 libnfsidmap2 librpcsecgss3

As for NFS, the installation does not perform configuration (NFS is part of an upcoming post if interested).

Now for the .deb collection…

The default apt-get behavior is to download .deb package files and place them into /var/cache/apt/archives/, thereby greatly simplifying the offline installation process.  As of April 2009, the NFS install list is the following (version numbers will change and ignore the _amd64 if you’re on a 32-bit machine).

libevent1_1.3e-1_amd64.deb
libgssglue1_0.1-1_amd64.deb
libnfsidmap2_0.20-0build1_amd64.deb
librpcsecgss3_0.17-1ubuntu2_amd64.deb
nfs-common_1%3a1.1.2-2ubuntu2.2_amd64.deb
nfs-kernel-server_1%3a1.1.2-2ubuntu2.2_amd64.deb
portmap_6.0-4_amd64.deb

This directory may be quite full (especially if you’ve apt-get update’d lately).  You can make the search a little easier on your eyes by sorting by date (assuming the install on the “online” machine is recent and by itself).  I will assume you’re doing the transport by flashdrive.

b. ls /media
Note the [name of flashdrive] sitting in this directory
c. cd /var/cache/apt/archives/
d. ls -tl
e. cp [filename.deb] /media/[name of flashdisk]

z. umount /media/[name of flashdrive]

(2 – Offline Box) From-Flashdrive Installation

Once the flashdrive is plugged into the offline box and the terminal window is open, you’re going to copy the .deb files to a directory (I will assume your home directory, ~/) on the hard drive and then run dpkg to install them.

a. cp /media/[name of flashdrive]/*.deb ~/
b. cd ~/
c. dpkg -I *.deb

The proper output should be as follows:

Selecting previously deselected package libevent1.
(Reading database … 115620 files and directories currently installed.)
Unpacking libevent1 (from libevent1_1.3e-1_amd64.deb) …
Selecting previously deselected package libgssglue1.
Unpacking libgssglue1 (from libgssglue1_0.1-1_amd64.deb) …
Selecting previously deselected package libnfsidmap2.
Unpacking libnfsidmap2 (from libnfsidmap2_0.20-0build1_amd64.deb) …
Selecting previously deselected package librpcsecgss3.
Unpacking librpcsecgss3 (from librpcsecgss3_0.17-1ubuntu2_amd64.deb) …
Selecting previously deselected package nfs-common.
Unpacking nfs-common (from nfs-common_1%3a1.1.2-2ubuntu2.2_amd64.deb) …
Selecting previously deselected package nfs-kernel-server.
Unpacking nfs-kernel-server (from nfs-kernel-server_1%3a1.1.2-2ubuntu2.2_amd64.deb) …
Selecting previously deselected package portmap.
Unpacking portmap (from portmap_6.0-4_amd64.deb) …
Setting up libevent1 (1.3e-1) …

Setting up libgssglue1 (0.1-1) …

Setting up libnfsidmap2 (0.20-0build1) …

Setting up librpcsecgss3 (0.17-1ubuntu2) …

Setting up portmap (6.0-4) …
* Starting portmap daemon…
…done.

Processing triggers for man-db …
Setting up nfs-common (1:1.1.2-2ubuntu2.2) …

Creating config file /etc/idmapd.conf with new version

Creating config file /etc/default/nfs-common with new version
Adding system user `statd’ (UID 113) …
Adding new user `statd’ (UID 113) with group `nogroup’ …
Not creating home directory `/var/lib/nfs’.
* Starting NFS common utilities
…done.

Setting up nfs-kernel-server (1:1.1.2-2ubuntu2.2) …

Creating config file /etc/exports with new version

Creating config file /etc/default/nfs-kernel-server with new version
* Starting NFS common utilities
…done.
* Exporting directories for NFS kernel daemon…
…done.
* Starting NFS kernel daemon
…done.

Processing triggers for libc6 …
ldconfig deferred processing now taking place

And, if you happen to miss a package during the transfer, dpkg will be kind enough to tell you.  Here’s the output from my forgetting to transport libevent1_1.3e-1_amd64.deb

Selecting previously deselected package libgssglue1.
(Reading database … 115620 files and directories currently installed.)
Unpacking libgssglue1 (from libgssglue1_0.1-1_amd64.deb) …
Selecting previously deselected package libnfsidmap2.
Unpacking libnfsidmap2 (from libnfsidmap2_0.20-0build1_amd64.deb) …
Selecting previously deselected package librpcsecgss3.
Unpacking librpcsecgss3 (from librpcsecgss3_0.17-1ubuntu2_amd64.deb) …
Selecting previously deselected package nfs-common.
Unpacking nfs-common (from nfs-common_1%3a1.1.2-2ubuntu2.2_amd64.deb) …
Selecting previously deselected package nfs-kernel-server.
Unpacking nfs-kernel-server (from nfs-kernel-server_1%3a1.1.2-2ubuntu2.2_amd64.deb) …
Selecting previously deselected package portmap.
Unpacking portmap (from portmap_6.0-4_amd64.deb) …
Setting up libgssglue1 (0.1-1) …

Setting up libnfsidmap2 (0.20-0build1) …

Setting up librpcsecgss3 (0.17-1ubuntu2) …

dpkg: dependency problems prevent configuration of nfs-common:
nfs-common depends on libevent1 (>= 1.3e); however:
Package libevent1 is not installed.
dpkg: error processing nfs-common (–install):
dependency problems – leaving unconfigured
dpkg: dependency problems prevent configuration of nfs-kernel-server:
nfs-kernel-server depends on nfs-common (>= 1:1.0.8-1); however:
Package nfs-common is not configured yet.
dpkg: error processing nfs-kernel-server (–install):
dependency problems – leaving unconfigured
Setting up portmap (6.0-4) …
* Starting portmap daemon…
…done.

Processing triggers for man-db …
Processing triggers for libc6 …
ldconfig deferred processing now taking place
Errors were encountered while processing:
nfs-common
nfs-kernel-server

To review:

(1) Install Program [X] On An Online Ubuntu Box

a. sudo apt-get install [program list]
b. ls /media
c. cd /var/cache/apt/archives/
d. ls -tl
e. cp [filename.deb] /media/[name of flashdrive]

z. umount /media/[name of flashdrive]

(2) To The “Offline” Machine…

a. cp /media/[name of flashdrive]/*.deb ~/
b. cd ~/
c. dpkg -I *.deb

www.ubuntu.com
en.wikipedia.org/wiki/Network_address_translation
en.wikipedia.org/wiki/Vulcan_nerve_pinch
www.debian.org
en.wikipedia.org/wiki/Dpkg
en.wikipedia.org/wiki/Apt-get
en.wikipedia.org/wiki/Network_File_System_(protocol)