FAQ

  1. Why was MDP first release numbered 0.9.0?
  2. Which Python numerical extension should I install: Numeric, Numarray, or SciPy?
  3. How do I install {Python, LAPACK, ATLAS, Numeric, Numarray, SciPy, MDP}?
  1. Why was MDP first release numbered 0.9.0?
    MDP has been privately developed in the context of computational neuroscience research for some time. When we felt that the library was useful and robust enough to face a larger audience, we put MDP into the public domain. At this point a version number had to be fixed, and we chose 0.9.0 because this number conveys the idea of being in development status although stable enough to be considered in production status.
  2. Which Python numerical extension should I install: Numeric, Numarray, or SciPy?
    As of version 1.1.0, MDP supports the most popular numerical extensions to the Python library: Numeric, Numarray, and SciPy. In our experience with MDP, Numarray is the slowest one by a factor of five. Numeric is pretty fast but lacks many of the advanced features that can be found in SciPy. We recommend to install SciPy to achieve the top performance. For intensive scientific applications you should install a complete LAPACK library with ATLAS optimization (see this FAQ for more info). You will also be able to install symeig, which boosts MDP's speed.
  3. How do I install {Python, LAPACK, ATLAS, Numeric, Numarray, SciPy, MDP}?
    If you have a GNU/Linux system we can tell you how we managed to do it, even without root password. If you have a Windows system, you should install Python Enthought Edition. It contains Python 2.3, SciPy and a lot of other useful stuff. In addition, it has a nice installer. On top of this, you can easily install MDP. If you have a MacOS system, you should try the MacEnthon Python edition: it already contains MDP, together with tens of other useful packages.

    GNU/Linux:
    1. Choose a directory to be used as base directory for the installation of Python and related software. Of course you must have write access on it. We'll call it /mydir/ in the following.
    2. Get the latest Python release source tarball and install it configuring the installation path:
      configure --prefix=/mydir/
      Make sure to put /mydir/bin as first entry in your PATH, if you use the BASH shell this is done for example by:
      export PATH="/mydir:$PATH"
    3. Optional step (for maximum speed)
      Get the latest LAPACK library release and install it configuring the installation path:
      cp lapack.tgz /mydir/lib/
      tar -xvzf lapack.tgz
      make all
    4. Optional step (for maximum speed)
      Get the latest ATLAS library release and compile it. The compilation process is interactive:
      make(choose default everywhere)
      make install arch=XXX(put the suggested architecture ID in XXX)
      It takes a loooooong time here. Outstanding speed has its price.
    5. Optional step (for maximum speed)
      Link the full LAPACK library with your optimized ATLAS as explained in this paragraph from the ATLAS FAQ:
      ATLAS does not provide a full LAPACK library. However, there is a simple way to get ATLAS to provide its faster LAPACK routines to a full LAPACK library. ATLAS's internal routines are distinct from LAPACK's, so it is safe to compile ATLAS's LAPACK routines directly into a netlib-style LAPACK library. First, download and install the standard LAPACK library from the LAPACK homepage. Then, in your ATLAS/lib/ARCH directory (where you should have a liblapack.a), issue the following commands:
      mkdir tmp
      cd tmp
      ar x ../liblapack.a
      cp your_LAPACK_path_&_lib ../liblapack.a
      ar r ../liblapack.a *.o
      cd ..
      rm -rf tmp
      Just linking in ATLAS's liblapack.a first will not get you the best LAPACK performance, mainly because LAPACK's untuned ILAENV will be used instead of ATLAS's tuned one. So, if you use any LAPACK routine that is not provided by ATLAS, it is essential that you create this hybrid LAPACK/ATLAS library in order to get the best performance.
    6. Optional step (for maximum speed)
      Now you can install your hybrid LAPACK/ATLAS library:
      cp include/{cblas.h,clapack.h} /mydir/lib/atlas
      cp lib/Linux_XXX/*.a /mydir/lib/atlas
      export ATLAS=/mydir/lib/atlas
    7. Choose which numerical extension to Python you want to install. As of version 1.1.0 MDP fully supports Numeric, Numarray, and SciPy. See also this FAQ. Get the latest available release of the numeric extension, unpack the source and configure the installation:
      Numeric
      If you have installed a complete LAPACK with ATLAS optimizations, you can tell the installer that you want Numeric to be compiled using your own ATLAS/LAPACK. Customize the installation setting the following variables in the file customize.py:
      use_system_lapack = 1
      lapack_library_dirs = ['/mydir/lib/atlas']
      lapack_libraries=['lapack','cblas','f77blas','atlas','g2c']
      use_dotblas = 1
      dotblas_include_dirs = ['/mydir/lib/atlas']
      Now you can compile and install:
      python setup.py install
      Numarray
      There must be a way to tell the installer that you want Numarray to be compiled using your own ATLAS/LAPACK, but unfortunately it's not documented anywhere. To perform a default installation:
      python setup.py config install --gencode
      SciPy
      Before installing SciPy, we strongly suggest to install F2PY (Fortran to Python Interface Generator). With this you will be able to generate extension modules for Python using good old libraries written in FORTRAN and C. You will also be able to install symeig, which boosts MDP's speed.
      Get and install F2PY:
      python setup.py install
      Get the latest SciPy release. For installation you can follow these instructions and read the file INSTALL.txt in the source tarball. If you compiled your own LAPACK/ATLAS then compilation is really easy. Set the enviromental variable ATLAS to match /mydir/lib/atlas:
      export ATLAS="/mydir/lib/atlas"
      followed by the usual:
      python setup.py install
      Verify your SciPy installation. See the output of:
      python /mydir/pythonX.X/site-packages/scipy_core/scipy_distutils/system_info.py
      and check that your ATLAS and LAPACK library have been detected.
      You should also run all available SciPy tests in a Python shell:
      >>> import scipy
      >>> scipy.test(level=10)
      
    8. Optional step (for maximum speed)
      Get and install the symeig module.
    9. If everything went right, you can now happily get and install MDP.
      Make sure to run all tests and benchmarks and that you don't get any error.