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

bfast-0.6.5a, MUMmer-3.22, and Amos-3.0.0 Installs In Ubuntu 10.04 LTS (And Related)

Taking care of a DNA/RNA fragment alignment installation triple-threat with this post. These Ubuntu installs for largely problem-free, but one little trick is needed for Amos (this because of my use of "/opt" for my usual installation and compilation attempts and, more so, my not being interested in modifying the root PATH statement despite the constant use of sudo when building in "/opt").

So, with the downloads of

bfast-0.6.5a (currently: sourceforge.net/apps/mediawiki/bfast/index.php?title=Main_Page)
MUMmer-3.22 (currently: mummer.sourceforge.net)
Amos-3.0.0 (currently: sourceforge.net/apps/mediawiki/amos/index.php?title=AMOS)

taken care of, the following process is performed.

user@machine:~sudo aptitude update
user@machine:~sudo aptitude upgrade

[POSSIBLE RESTART REQUIRED after this. You don't need-need to update/upgrade, but I do it before all builds regardless.]

user@machine:~sudo apt-get install bison build-essential cmake csh doxygen flex fort77 freeglut3-dev g++ g++-multilib gcc gcc-multilib gettext gfortran gnuplot ia32-libs lib32asound2 lib32gcc1 lib32gcc1-dbg lib32gfortran3 lib32gomp1 lib32mudflap0 lib32ncurses5 lib32nss-mdns lib32z1 libavdevice52 libbz2-dev libc6-dev-i386 libc6-i386 libfreeimage-dev libglew1.5-dev libnetcdf-dev libopenal1 libopenexr-dev libopenmpi-dev libpng12-dev libqt4-dev libssl-dev libstdc++6-4.3-dbg libstdc++6-4.3-dev libstdc++6-4.3-doc libxext-dev libxi-dev libxml-simple-perl libxmu-dev libxt-dev mercurial nfs-common nfs-kernel-server openmpi-bin patch portmap python2.6-dev rpm ssh tcsh xorg-dev zlib1g-dev

The large apt-get above is my "default" additional install for a variety of programs, including Amber, Abinit, GAMESS, GROMAC, etc. Many of these may not be needed but hard drives are cheap and figuring out the minimum list is more work than simply installing everything. Do check the list, however, to make sure something won't confuse any other installs on your machine (if you're new to this, likely not. If you've done builds a few times, you may already know the difference).

user@machine:~$ sudo mv bfast-0.6.5a.tar.gz /opt
user@machine:~$ sudo mv MUMmer3.22.tar.gz /opt
user@machine:~$ sudo mv amos-3.0.0.tar.gz /opt
user@machine:~$ cd /opt

Move the three programs to /opt (or not). Specifically for bfast, two additional apt-get's are required.

user@machine:/opt$ sudo apt-get install libstatistics-descriptive-perl libdbd-pg-perl

The build for bfast is straightforward.

user@machine:/opt$ sudo tar xvfz bfast-0.6.5a.tar.gz 
user@machine:/opt$ cd bfast-0.6.5a/
user@machine:/opt/bfast-0.6.5a$ sudo ./configure 
user@machine:/opt/bfast-0.6.5a$ sudo make
user@machine:/opt/bfast-0.6.5a$ sudo make install
user@machine:/opt/bfast-0.6.5a$ cd ..

bfast is officially built and you've returned to your "/opt" directory. MUMmer is also straightforward.

user@machine:/opt$ sudo tar xvfz MUMmer3.22.tar.gz 
user@machine:/opt$ cd MUMmer3.22/
user@machine:/opt/MUMmer3.22$ sudo make check
user@machine:/opt/MUMmer3.22$ sudo make install

MUMmer is officially built. If you intend to build Amos, you will need some of what you built in MUMmer. Specifically, nucmer, delta-filter, and show-coords are used by Amos and must be present in your PATH during the Amos build. As I am building in "/opt," I'm using sudo. As I do not want to deal with setting a new PATH for root, the solution is simply to move these three programs to a universally accessible place.

user@machine:/opt/MUMmer3.22$ sudo cp nucmer /usr/local/bin/
user@machine:/opt/MUMmer3.22$ sudo cp delta-filter /usr/local/bin/
user@machine:/opt/MUMmer3.22$ sudo cp show-coords /usr/local/bin/
user@machine:/opt/MUMmer3.22$ cd ..

And, with that, you are ready for the Amos build procedure. You will need two more apt-get installs to complete the Amos build.

user@machine:/opt/amos-3.0.0$ sudo apt-get install libboost-all-dev libqt3-headers

To build Amos with no errors and all of the listed components, note the ./configure settings and run the list below.

user@machine:/opt$ sudo tar xvfz amos-3.0.0.tar.gz 
user@machine:/opt$ cd amos-3.0.0/
user@machine:/opt/amos-3.0.0$ sudo ./configure --with-Qt-dir=/usr/share/qt3 --prefix=/opt/amos-3.0.0
user@machine:/opt/amos-3.0.0$ sudo make
user@machine:/opt/amos-3.0.0$ sudo make check
user@machine:/opt/amos-3.0.0$ sudo make install

If nucmer, delta-filter, show-coords, and the qt3 libraries are not present, you'll see the following error list after running ./configure:

-- AMOS Assembler 2.0.8 Configuration Results --
  C compiler:          gcc -g -O2
  C++ compiler:        g++ -g -O2
  GCC version:         gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
  Host System type:    x86_64-unknown-linux-gnu
  Install prefix:      /opt/amos-3.0.0
  Install eprefix:     ${prefix}

  See config.h for further configuration information.
  Email  with questions and bug reports.

WARNING! nucmer was not found but is required to run AMOScmp
   install nucmer if planning on using AMOScmp
WARNING! delta-filter was not found but is required to run AMOScmp-shortReads-alignmentTrimmed
   install delta-filter if planning on using AMOScmp-shortReads-alignmentTrimmed
WARNING! show-coords was not found but is required to run minimus2
   install show-coords if planning on using minimus2
WARNING! Qt3 toolkit was not found but is required to run AMOS GUIs
   install Qt3 or locate Qt3 with configure to build GUIs
   see config.log for more information on what went wrong
WARNING! Boost graph toolkit was not found but is required to run parts of the AMOS Scaffolder (Bambus 2)
   install Boost or locate Boost with configure to build Scaffolder
   see config.log for more information on what went wrong

And, finally, add these directories to your PATH.

user@machine:~$ cd
user@machine:~$ pico .profile

Add the following to your PATH statement:

/opt/amos-3.0.0/bin/:/opt/MUMmer3.22/:/opt/bfast-0.6.5a/butil/:

Crtl-X, "Y", and quit.