Programming‎ > ‎MPS Bundle‎ > ‎

MPS Bundle numerical backend

The backend is the set of LAPACK and BLAS libraries that drive matrix and vector operations. These backends provide low-level operations, as well as higher level algorithms, such as:
  • Adding matrices
  • Multiplying matrices and vectors
  • Computing eigenvalue and singular value decompositions
  • Solving systems of linear equations
The OSX (Apple) operating system provides a pretty decent version of Atlas called Veclib and which is available with the operating system. You do not need anything else for the library to work. If you are happy with the performance, you may stop reading

In Linux or Unix-like systems there is no excuse not to use the Atlas library. It is a decent library with a reasonable performance that is available for almost any linux distribution I know of, meaning that a simple yum install atlas-devel in Fedora or similar platforms, or the equivalent command in Ubuntu, Debian or the like. Some considerations though:
  • Investigate whether your distribution provides optimized versions of the library. Atlas may be compiled to profit from nice features of the most recent Intel processors. It is a waste of resources not to use that possibility.
  • If performance is lagging or you find that the library does not use as many cores as there are available, investigate the possibility of building Atlas yourself on the computer that you use for production. The process is much easier than you would think and, though it takes a couple of hours, the outcome is a library that is optimized for that particular computer.
If you have the money, or you have a student or university license, I recommend using both the Intel compiler and the Intel MKL libraries. Notice that I mention both. In theory you can use the MKL libraries together with the GCC compiler that comes with the operating system, but my experience is quite mixed, as the multithreaded component is quite fragile and the GCC OMP component (the parallelizing component for C) has evolved independently from the MKL library. This means that if your version of MKL is too old, it may need an older GCC compiler and fail with newer ones in unexpected ways.

If you use the Intel libraries, make sure that the libraries are available at the command line environment where you will compile the programs. This implies running
source /opt/intel/bin/ intel64
source /opt/intel/mkl/bin/ intel64
from the command line or adding these lines to your ~/.bashrc or ~/.profile files.

In Windows the build system currently relies on the use of the cblapack library. Fortunately the build system already takes care of that. Performance is ok, but it is recommended to run production code elsewhere.