Amber 11 on CentOS 4.3
This article will explain how to get Amber 11 ( http://ambermd.org ) to compile and run on my cluster with MPICH2. The systems I work with are old, well in terms of computers anyway. It consists of a cluster of PowerEdge 1950's running CentOS 4.3. Specifically:
- Dual Intel Xeon E5320 1.86GHz
- 4GB or 8GB 533MHz DDR2
- 146GB 15kRPM Hardrive
- CentOS 4.3
- gcc-4.1.2
Before we get started, some acknowledments are in order, many of the procedures posted herein are pulled from Mark Williamson [1], the MPICH2 readme [2] and from the Amber 11 and AmberTools 1.4 manuals [3].
The main reason for this, is that Amber 11 does not compile properly with gcc-4.1.2 which is available on CentOS 4.3. Therefore we must compile gcc-4.4.4, then MPICH2-1.2.1p1 and Amber 11 using it.
Setup
All the programs we setup here will be placed in /opt, and things are built in $BUILD as much as possible
$ BUILD=/scratch
Compiling gcc-4.4.4
gcc-4.4.4 requires gmp ( GNU MP, a library for abritrary precision arithmitic ). It is available on CentOS and must be installed prior to compilation.
- yum install gmp gmp-devel
Get gcc-4.4.4:
$ cd $BUILD
$ wget ftp://mirrors.kernel.org/gnu/gcc/gcc-4.4.4/gcc-4.4.4.tar.gz
$ sha1sum gcc-4.4.4.tar.bz245d1e7242a08cbb7a343ed2bf640a5afd0ebe098 gcc-4.4.4.tar.bz2
Untar it.
$ tar -jxf gcc-4.4.4.tar.bz2
Gcc requires MPFR 2.3.2+ for it compile. MPFR is not available on CentOS 4.3, so we must provide it within the gcc source directory. The highest version of MPFR that is recommended with our version of gmp is MPFR-2.3.2
Get MPFR 2.3.2
The mpfr source must be placed within the gcc source directory in a directory
$ tar -jxf mpfr-2.3.2.tar.bz2
Create a build directory for building gcc outside the main source directory.
$ mkdir build
Run the gcc configure script from the build directory. We only need c,c++ and
$ ../gcc-4.4.4/configure --enable-languages=c,c++,fortran --prefix=/opt/gcc-4.4.4
This is running on an 8 core node, so make with '-j8' to enable compililation on
$ make -j8
Install the compiler.
$ sudo make install
Compilation MPICH2
Setup the environment to use the newly installed gcc-4.4.4.
$ export PATH=/opt/gcc-4.4.4/bin:$PATH
Set the fortran environment variables so that MPICH2 enables fortran modules.
$ export F90=gfortran
Go back to the build directory and get mpich2 source code.
$ cd $BUILD
Configure and make.
$ cd mpich2-1.2.1p1
And finally Install
$ sudo make install
Setup the environment to use our newly compilied MPICH2 install.
$ export PATH=/opt/mpich2-1.2.1p1/bin:$PATH
Do some quick MPICH2 envrioment tests. See the mpich2-1.2.1p1 README[4] for more details.
$ which mpd
Amber 11
Unpack Amber
$ cd $BUILD
Get the latest bugfixes and patch the source.
Amber has a poor compile/make setup. It has a bad habit of hardcoding paths
Copy the amber11 directory to the target directory. I name it amber11p6 to
$ sudo cp -r $BUILD/amber11 /opt/amber11p6
Now start the Amber 11 configure/make process
$ cd /opt/amber11p6
Make AmberTools. Unfortuanely the Makefiles don't play nice with parallel make
$ make install
Here comes the fun part. We'll start the testing of AmberTools while compiling
Start AmberTools testing. This takes about 1/2 hour.
$ cd ../test
While this is testing, open a new window and setup the enviroment. I can do this
$ cd /opt/amber11p6
In window 2, compile amber11. This takes a 3 minutes.
$ cd src
Now, in Window 2 run the amber11 tests. This takes about 75 minutes.
$ cd ../test
Close the second window, we don't need it anymore.
When both serial tests are done, we can move on to
$ cd $AMBERHOME/AmberTools/src
Setup a simple Parallel environment to test the MPI environment. We'll try doing
2 Cores, about 24 minutes.
$ mpd &
4 Cores, about 16 minutes.
$ export DO_PARALLEL='mpiexec -n 4'
All done for now
$ mpdallexit
Taring everything up
This is pretty easy, just use tar.
$ cd /
Amber and AmberTools do not need all the compiliation directories to work.
$ tar -cP --owner=root --group=root -f ~/amber11p6-x86_64.tar \
/opt/amber11p6/AmberTools/{bin,include,exe,lib} \
Now compress them
$ cd ~
And we are done.
Awesome. Do you plan on performing any experiments now? You can find plenty of PDB files at rcsb.org to play with, and use VMD 1.8.7 (Mac, Sun, Windows, etc. versions available) to view resulting trajectories..
ReplyDeleteAgain, awesome!
-HK