LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Blogs > vanKampen92
User Name
Password

Notices

Rate this Entry

Installing ATLAS LAPACK

Posted 01-12-2009 at 08:57 AM by vanKampen92

## ## ## ATLAS - LAPACK Installation

## Installing ATLAS in 10 'easy' steps
## (based on ATLAS Installation Guide by R. Clint Whaley,
## JAN 25, 2008)
#
## First: "Turn off CPU throttling"
## Since I have a dual machine (two processors)...

vankampen07:~$ cpufreq-selector -c 0 -g performance
vankampen05:~$ cpufreq-selector -c 1 -g performance

## Second: Find out my CPU speed
By typing:
vankampen07:~$ cat /proc/cpuinfo

you will know your CPU maximum speed (Mine is 2001.000 MHz!!)

## Third: Find out options (pre-configuration) in a temporary directory:

vankampen07:~$ cd ATLAS
vankampen07:~$ mkdir bogus
vankampen07:~$ cd bogus

## In bogus try:
vankampen07~:$ ../configure -Ss kern /usr/bin/gcc-4.2 -b 64 -D c -DPentiumCPS=2001 -Fa alg -fPIC

-----> -D c -PentiumCPS=2001 ||| Sets CPU speed for ATLAS optimization
-----> -Fa alg -fPIC ||| Allows for dynamics library generation
-----> -b 64 ||| 64 bits (rather than 32)
-----> -Ss kern <path/gcc-v.x> ||| Uses an updated gcc compiler to build the
||| core components of ATLAS.
## If this doesn't work try to fiddle with PATH and LD_LIBRARY_PATH. The problem
## is the imcompatibility between gcc-4.1 and gcc-4-2 or recent versions!!!

## First, I made sure my compiler was gcc-4.2 rather than gcc-4.1, because this
## newer version produces a better optimization of the ATLAS library.

## I guess my kernel does not support 64 bits (or something...)
## Finally, I got configure to work with these options:
vankampen07:~$ ../configure -b 32 -D c -DPentiumCPS=2001.000 -Fa alg -fPIC

## Fourth: Edit LAPACK make.inc with the same options in ATLAS make.inc you
## discovered in the previous pre-configuration step (see documentation).
## The same options for make.inc to build the LAPACK and ATLAS library
## should be used for optimal interoperability
FORTRAN = gfortran
OPTS = -O -fPIC -m32
DRVOPTS = $(OPTS)
NOOPT = -m32
LOADER = $(FORTRAN)
LOADOPTS = $(OPTS)
TIMER = INT_ETIME
## These options were found through the previous 'configure' command (see
## example in documentation: ATLAS Installation Guide by R. Clint Whaley,
## JAN 25, 2008)

##Fifth: Build LAPACK library for real
vankampen07:~/lapack-3.1.1$ make lib
## This should generate the library (lapack_LINUX.a). In the lapack directory,
## we should have:
vanKampen07:~/lapack-3.1.1$ ls
BLAS COPYING html INSTALL lapack_LINUX.a Makefile make.inc make.inc.example manpages README SRC TESTING tmglib_LINUX.a

##Sixth: Configure and build ATLAS library for real
## I created first a building directory in the source directory. This will be my
## building directory: 'animal64'
## This is the configuration command I used:
vanKampen07:~/ATLAS/animal64$ ../configure -b 32 -D c -DPentiumCPS=2001.000 -Fa alg -fPIC --prefix=/home/dalonso/local/atlas --with-netlib-lapack=/home/dalonso/lapack-3.1.1/lapack_LINUX.a

## Notice that my final destination directory is /home/dalonso/local/atlas
## as defined by --prefix option. In this directory, you should find all
## the libraries at the end of the building-installation process.
##
## This is, simply, the building command I used
vankampen07:~/ATLAS/animal64$ make

## Seventh: Two (optional, but recommended, see documentation) checking steps:
vankampen07:~/ATLAS/animal64$ make check

vankampen07:~/ATLAS/animal64$ make time

## Eighth: Final installing step:
vankampen07:~/ATLAS/animal64$ make install

## You should find your brand-new build libraries where you specified
## in your configuration step (--prefix=/home/dalonso/local/atlas).
vankampen07:~/ATLAS/animal64$ cd /home/dalonso/local/atlas
vankampen07:~/local/atlas $ ls
include lib

## Nineth: Adding a full Lapack library to an already-installed ATLAS
## (see 3.1.3 from ATLAS Installation Guide)

## Tenth: Adding shared-object libraries [*.so] to complete installation
## As in the example from the ATLAS Installation Guide, the configuration
## option
##
## ----> -Fa alg -fPIC ||| Allows for dynamics library generation
##
## didn't work, so you are forced to install dynamics libraries by hand.
## (see 8.3 from ATLAS Installation Guide)
## You should check whether the dynamic linking is working (see also
## 8.3 from ATLAS Installation Guide). This is what I got:
dalonso@vanKampen07:~/ATLAS/animal64/bin$ ./xdlutst_dyn
NREPS Major M N lda NPVTS TIME MFLOP RESID
===== ===== ===== ===== ===== ===== ======== ======== ========
0 Col 100 100 100 95 0.001 1140.755 4.989e-02
0 Col 200 200 200 194 0.002 2493.739 4.155e-02
0 Col 300 300 300 295 0.007 2590.472 4.162e-02
0 Col 400 400 400 394 0.011 3748.335 4.177e-02
0 Col 500 500 500 490 0.024 3492.955 4.004e-02
0 Col 600 600 600 594 0.037 3938.030 4.415e-02
0 Col 700 700 700 693 0.056 4043.549 4.287e-02
0 Col 800 800 800 793 0.079 4313.600 3.850e-02
0 Col 900 900 900 893 0.111 4372.206 3.706e-02
0 Col 1000 1000 1000 995 0.151 4407.562 3.879e-02

10 cases ran, 10 cases passed
Posted in Uncategorized
Views 3380 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 12:54 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration