ATLAS (Automatically Tuned Linear
Algebra Software) produces BLAS (Basic Linear Algebra
Subprograms) libraries which has been specifically
optimized for the platform you install ATLAS on. In order
to achieve optimized preformance it relies strongly on the
particular hardware (CPU) and software (C and Fortran
compilers) in your particular system. Lots of scientific
libraries use Atlas and that is probably why most people
install it. With its newer versions, its installation has
become much more easier than before. I am primarily
writing this for users of those other libaries or
programs which use ATLAS (my self included).
My primary aim in creating and maintaining this page is as
a shared note. So I do not at all claim that it is general
and can be applied for all systems, this is just the steps
I took. atlas_install.pdf is a great
reference for understanding the installation process, see
the first section below on how to find it. You must read
it.
In this webpage I am explaining how to install ATLAS
3.10.2 on Arch Linux. Arch linux is a very
interesting GNU/linux distribution where you get
to assemble all the components your self. Since it
requires minimum maintaining by its distributors, you get
the most updated and pure versions of all the GNU/Linux
components. It also has
a fantastic documentation which you can
learn from while building. So if you are the kind of
person that learns by practice and want to learn the
components of the system you are using by assembling your
OS yourself, there is no better distribution.
The commands starting with a # should be run
as super user (root) while those starting with
a $ can be run as a user.
Source files and documentation You can
download the latest Atlas package
from here. Once you have downloaded it, you
can run this command to unpack it:
$ bunzip2 -c
atlas3.10.2.tar.bz2 | tar xfm - In the
unpacked folder (named ATLAS ) you will find
the doc directory that
contains atlas_install.pdf . Put the time to
read it because it has some excellent information.
Disabling CPU frequency scaling: Modern
operating systems change the CPU frequency based on what
they precieve you need. This is good for simple tasks and
when you want to save energy (for example on a
laptop). But if you are installing Atlas, this means that
you have very CPU intensive taks and the simple task of
choosing a frequency can slow you down. You can either
permanantly set the frequency of your CPU or change it
temporarily until your next boot. The
recommended tool by Arch wiki
is cpupower which is a component of the
Linux kernel. In Arch Linux, you can install it with:
# pacman -S
cpupower and you can enable it upon system
boot with # systemctl enable
cpupower Using $
cpupower frequency-info you can see your
current CPU's frequency and its power
plan. Arch wiki has explained this and other
capabilities nicely, see there for more information. Atlas
needs the CPU frequency to be fixed atleast during
installation. So you can run
#cpupower frequency-set -g
performance to set your CPU frequency to its
fixed maximum value. This is a temporary command and will
only fix your CPU frequency until you reboot. On a laptop
(where power-saving might be a big concern) this is
good. But for a desktop where you are always plugged to
electricity, you might always want to use your maximum CPU
frequency. In order to do that you have to
edit /etc/default/cpupower . So if you are
using GNU nano, you run
nano
/etc/default/cpupower and uncomment (remove
the # from the beginning of the line) the
line that says
governer='...'
and put performance in the single quotes
instead of what ever is in there. If you don't want your
maximum CPU frequency but a fixed frequency, then keep
this line commented and uncomment the line that says
freq= and put
your desired frequency there in the same format as the
examles in that file. Upon your next boot (if you have
enabled cpupower ), the settings of this file
will be used all the time.
Disabling hyperthreading As
atlas_install.pdf nicely explains, CPU creators
enable virtual threads for badly written code. For example,
my CPU has 4 physical cores, but my OS sees 8 threads. To
optimally run high performance tasks, its is best to disable
such virtual threads and use the real physical
ones. The best way to do this (if you have full access
to your computer) is to change your BIAS settings. So you
can reboot the computer and go in the BIAS menu. On my
motherboard, the setting is found after the following
titles: "MB intelligence tweaker" -> "Advanced frequency
settings" -> "Advanced CPU features" -> "CPU
multi-threading", then choose disable . If you
see your OS performance
degrades, atlas_install.pdf has a suggestion
during the configuration in the section 3.3 (Handling hyper
threading...).
Configure options Read
the atlas_install.pdf for a complete and nice
explanation on the configure options. The following
configure options were good for my system. Note that you
have to download the LAPACK tgz file from
the LAPACK webpage and correct
the /path/to/ in the first line to where ever
you have put it.
--with-netlib-lapack-tarfile=/path/to/lapack-3.x.x.tgz
--shared
-b 64
-D c
-DPentiumCPS=XXXX Note that the spaces between
the options are very important. You probably remember the
frequency value (to be replaced by XXXX ) from
the cpupower configuration above. Just don't
forget it has to be in mega hertz (MHz) not giga hertz (GHz)
as you probably saw and used above. I just have to
note that I was interested to see the configure in the most
verbose version, so as atlas_install.pdf
suggested I tried adding -v 2 option as
well. But there was a problem and it wouldn't work. I got
the same error when I tried ../configure
--help , so be aware of this problem with this option.
Configuring, building and installing The rest
of the job is very easy, simply run the following commands
inside the ATLAS directory. Be sure to replace
the WITH-THE-ABOVE-OPTIONS-IN-ONE-LINE with
your desired options. mkdir
MyObj cd MyObj
$ ../configure
WITH-THE-ABOVE-OPTIONS-IN-ONE-LINE
$ make
$ make check
$ make ptcheck
$ make time
$ su
# make install
Once you have installed atlas all the necessary
include and library files are placed in a system wide
location (by default in /usr/local/atlas/ .
Therefore you will generally not need the source files any
more. You can completely remove them with the commands
below. The first command below is to exit (or logout) from
the root user: # exit
$ cd ../../
$ rm -rf ./ATLAS
./atlas3.10.2.tar.bz2
Updated on October 7th, 2014.
Created on August 15th, 2012.
|