Installation
MutInf requires NumPy and SciPy, and the current version works with Python 2.6.2, though it should also work with Python 2.5.x The easiest way to install NumPy and SciPy is through a package manager such as Fink or yum. Package names can be found at http://www.numpy.org/ .
NumPy and SciPy take advantage of high-performance libraries that do matrix math, ideally using optimized versions of BLAS, LAPACK, etc. I recommend using Intel’s MKL libraries. I originally used ATLAS to produce optimizedversions of these (http://math-atlas.sourceforge.net/atlas_install/ ), but this requires a different compilation for each kind of node on the cluster.
I recommend using the Intel C-compiler with MKL or building LAPACK then ATLAS using gcc and gfortran with the -fPIC option. These will provide optimized linear algebra routines for your particular architecture. The "weave" statements with pointer arithmetic yield performance that can approach that of C or FORTRAN code while allowing the code to be written for the most part in higher-level expressions that read more like math. For MutInf to work, the main thing you have to do is build GCC-compiled Python with packages Numpy/Scipy (I use the Intel C-compiler and MKL 10 for the math libraries; you can use ATLAS or your own BLAS/LAPACK). Basically, it looks like only with recent changes to the repository will this go without a hitch on our machines for both numpy and scipy. First: Get the right versions of numpy and scipy. This protocol didn't work without the newest versions from svn: svn co http://svn.scipy.org/svn/numpy/trunk numpy
svn co http://svn.scipy.org/svn/scipy/trunk scipy
I had to patch these to get them to work. /home/mcclendon/scipy_0.7.x.svn.tar.gz/home/mcclendon/numpy_1.3.x.patched.svn.tar.gz you should make separate directories of these for 32-bit and 64-bit installs.
Export(in bash) the following environment variable for 32-bit MKL: (as per http://www.scipy.org/Download# )
Adapt this to wherever your MKL libraries are. LD_RUN_PATH=/software/intel/cc/10.1.011/lib:/software/intel/cce/10.1.011/lib:/software/intel/fc/10.1.011/lib:/software/intel/mkl/10.0.1.014/lib/32 note: these should *not* be in your LD_LIBRARY_PATH right now.
1. Use GCC to configure and build Python 2.6.2. You need to make separate Python 2.6.2 directories for 32-bit and 64-bit versions. Don't set up intel licenses yet. I used the system's default GCC 4.1.2, but I recommend using a newer version. ########################################################################################### Here are the commands I needed to run: 32-bit on 32-bit linux box: cd Python-2.6.2 ./configure --prefix=/home/mcclendon/opt32 make make install 64-bit on 64-bit linux box: export CFLAGS='-m64 -fPIC'
export CC=gcc
./configure --with-universal-archs=64-bit --prefix=/home/mcclendon/opt64
2. Make a site.cfg file (for 32-bit or 64-bit) and **copy it to the numpy/ and scipy/ install directories**. Each of these contain a site.cfg.example to show you what's needed. ------------site.cfg-----------------# MKL#----# For recent (9.0.21, for example) mkl, you need to change the names of the# lapack library. Assuming you installed the mkl in /opt, for a 32 bits cpu:#[mkl]
#library_dirs = /software/intel/mkl/9.1.023/lib/64/# lapack_libs = mkl_lapack## For 10.*, on 32 bits machines:[mkl]library_dirs = /software/intel/mkl/10.0.1.014/lib/32/
lapack_libs = mkl_lapack
mkl_libs = mkl, guide
## For 10.*, on 64 bits machines:#[mkl]
#library_dirs = /software/intel/mkl/10.0.1.014/lib/em64t/#lapack_libs = mkl_lapack#mkl_libs = mkl, guide#-------------EOF-------------------------------------------- 3.Set up the Intel C-compiler licenses and environment variables
source /software/intel/intel32.sh 4. Build NumpyGo into the numpy directoryUse your new build of Python 2.6.2 and the intel C-compiler with MKL to build numpy: For 32-bit, ~/opt32/bin/python setup.py config --compiler=intel --fcompiler=intel config_fc --fcompiler=intel build_ext --compiler=intel install --fcompiler=intel --prefix=/home/mcclendon/opt32 For 64-bit, ~/opt64/bin/python setup.py config --compiler=intelem --fcompiler=intel config_fc --fcompiler=intelem build_ext --compiler=intelem --fcompiler=intel install --prefix=/home/mcclendon/opt64 5. Build ScipyGo into the scipy directoryUse your new build of Python 2.6.2 and the intel C-compiler with MKL to build scipy: For 32-bit, ~/opt32/bin/python setup.py config --compiler=intel --fcompiler=intelem build_ext --compiler=intel --fcompiler=intel install --prefix=/home/mcclendon/opt32For 64-bit, ~/opt64/bin/python setup.py config --compiler=intelem --fcompiler=intelem config_fc --fcompiler=intelem build_ext --compiler=intelem --fcompiler=intelem install --prefix=/home/mcclendon/opt64 6. Build Biopython Go into biopython directoryFor 32-bit, ~/opt32/bin/python setup.py build ~/opt32/bin/python setup.py installFor 64-bit, ~/opt64/bin/python setup.py build ~/opt64/bin/python setup.py install 7. Test Biopython if desired ... looks like some of the tests failed (7/133) perhaps due to missing 3rd-party libraries but it looked liked it built correctly. ~/opt32/bin/python setup.py test ~/opt64/bin/python setup.py test 8. Install matplotlib export CC=gcc Go into matplotlib directory ~/opt32/bin/python setup.py build ~/opt32/bin/python setup.py install