blas-library-help

This guide is primarily for linux systems.

Locate BLAS Library

The first step is to determine where is the BLAS library on your system. Use the command "locate libblas.so" to find the library. If several results are reported, look for the version under /usr/lib/ or /usr/lib64 or something similar to that path. For example, on my machine the library is located at /usr/lib/libblas.so. That location is most likely a symbolic link to another location in your filesystem. Use "ls -l /usr/lib/libblas.so" to determine the target of the symbolic link. The target you identify may itself be a symbolic link, so repeat the command "ls -l" on the target until you run out of symbolic links. After following 4 symbolic links, I finally locate the BLAS library at /usr/lib/libblas/libblas.so.3gf.0.

Take the name of the BLAS library and type it into Google to determine which implementaiton of BLAS you are running. In my case, I found it easiest to Google for "libblas 3gf". The results of that search indicate that I am running the Fortran 77 reference implementation found at netlib. We can probably find a faster implementation somewhere....

Install new BLAS library

Installing a new BLAS implementation is a giant morass that is highly dependent on the linux distribution you are running. For example, in Ubuntu, I would begin by installing the libopenblas-base package. You can then read a file /usr/share/doc/libopenblas-base/README.Debian that has instructions on compiling the library for your specific architecture. Or you can install the libatlas3gf-base package. It has a file /usr/share/doc/libatlas3gf-base/README.Debian that has instructions on compiling. In either case, you'll need to use "sudo update-alternatives --config libblas.so.3gf" to change the symbolic links to point to your new BLAS library. update-alternatives will prompt you with menu of the current BLAS alternatives installed on your machine, and allow you to select the alternative you wish to run.