ATLAS on Linux

This page gives some information on how to compile and install the Automatically Tuned Linear Algebra Software (ATLAS) on a Linux system. On Windows, the procedure is similar, but a bit more complicated. People interested in compiling ATLAS on Windows should have a look here (cached version).

On Debian

Most Linux distributions, like Debian for example, provide pre-compiled versions of ATLAS tuned for the most common types of processor. You may therefore consider installing directly from the packaged version rather than compiling from scratch. For a Debian system running on a Pentium IV processor you can, for example, do

apt-get install atlas-sse2
apt-get install atlas-sse2-dev

From Source

First, we need to get the source code. Choose the stable branch (3.6.0, at the time of writing) and download atlas3.6.0.tar.bz2. The rest is just a matter of answering questions and… waiting.


We extract the files, move to the main directory and start the configuration

tar xvfj atlas3.6.0.tar.bz2

At this point, we have to answer some questions

Enter number at top left of screen [0]: <put your value here>
Have you scoped the errata file? [y]: <return>
Are you ready to continue? [y]: <return>

At this point, the configuration check for your compiler. Most recent Linux distributions only come with gcc 4 installed. If it is your case, you will see a message telling you that “no pre-2.96 gcc” is installed and that it may lead to up to 50% performance loss. If you check this page, you will see that the problem has now been fixed. If you have the choice between gcc 3 and gcc 4, then pick gcc 3 because it has been more thoroughly tested. I personally did not see any significant difference between the two so far.

Stop ATLAS install? [y]: n
use express setup? [y]: <return>
Enter Architecture name (ARCH) [Linux_P4SSE2]: <return>

The next question asks for the maximum cache size. A rule of thumb is to put two times the size of your processor cache. If you are running Linux, this later value is generally explicitly written in /proc/cpuinfo. If you do not know, use the default value.

Enter Maximum cache size (KB) [512]: 2048
Enter File creation delay in seconds [0]: <return>
Tune the Level 1 BLAS? [y]: <return>


If everything goes normaly, you are eventually asked to start the compilation with a command similar to

make install arch=Linux_P4SSE2

The compilation takes a while, even on a recent machine. So be patient.


Once the compilation is finished, you can install the necessary files into the location of your choice. I generally prefer installing things I compile myself into /usr/local.

cp include/clapack.h include/cblas.h /usr/local/include
cp lib/Linux_P4SSE2/*.a /usr/local/lib

Leave a Reply

Your email address will not be published. Required fields are marked *