473,651 Members | 2,937 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Installing ATLAS and LAPACK


The following is a first attempt to almost create a shell script for
installation of ATLAS and LAPACK. It does not work right now and it is
specific to a particular platform. It is posted here to archive it and
throw into the public domain, maybe others will find it useful. It is
at least a documentation of some relevant notes on the procedure.
Corrections and updates would be really appreciated. Alternatives to
automate this process also welcome, but not rpm (unless it can be
demonstrated that an rpm installation achieves an equivalent optimized
blas to a full compilation). Also, advice about integrating this with
compilation of python and numeric python libraries much appreciated
too, particularly the definition of some commonly accepted paths for
the library installation, so that all python compilation can link the
libraries without having to modify their configure scripts.
############### ############### ############### ##########

For background about creating and using libraries with linux, see

http://www.gnu.org/software/libtool/libtool.html

http://www.dwheeler.com/program-library
http://www.faqs.org/docs/Linux-HOWTO...ary-HOWTO.html
http://www.ibiblio.org/pub/Linux/doc...ary-HOWTO.html

"In theory, code in static ELF libraries that is linked into an
executable should run slightly faster (by 1-5%) than a shared library
or a dynamically loaded library, but in practice this rarely seems to
be the case due to other confounding factors."
Locations for installation (from Program-Library-HOWTO):

3.1.2. Filesystem Placement

Shared libraries must be placed somewhere in the filesystem. Most open
source software tends to follow the GNU standards; for more information
see the info file documentation at info:standards# Directory_Varia bles.
The GNU standards recommend installing by default all libraries in
/usr/local/lib when distributing source code (and all commands should
go into /usr/local/bin). They also define the convention for overriding
these defaults and for invoking the installation routines.

The Filesystem Hierarchy Standard (FHS) discusses what should go where
in a distribution (see http://www.pathname.com/fhs). According to the
FHS, most libraries should be installed in /usr/lib, but libraries
required for startup should be in /lib and libraries that are not part
of the system should be in /usr/local/lib.

There isn't really a conflict between these two documents; the GNU
standards recommend the default for developers of source code, while
the FHS recommends the default for distributors (who selectively
override the source code defaults, usually via the system's package
management system). In practice this works nicely: the ``latest''
(possibly buggy!) source code that you download automatically installs
itself in the ``local'' directory (/usr/local), and once that code has
matured the package managers can trivially override the default to
place the code in the standard place for distributions. Note that if
your library calls programs that can only be called via libraries, you
should place those programs in /usr/local/libexec (which becomes
/usr/libexec in a distribution). One complication is that Red
Hat-derived systems don't include /usr/local/lib by default in their
search for libraries; see the discussion below about /etc/ld.so.conf.
Other standard library locations include /usr/X11R6/lib for X-windows.
Note that /lib/security is used for PAM modules, but those are usually
loaded as DL libraries (also discussed below).

....
3.2. How Libraries are Used
....
The list of directories to be searched is stored in the file
/etc/ld.so.conf. Many Red Hat-derived distributions don't normally
include /usr/local/lib in the file /etc/ld.so.conf. I consider this a
bug, and adding /usr/local/lib to /etc/ld.so.conf is a common ``fix''
required to run many programs on Red Hat-derived systems.
############### ############### ############### ##########
# A. ATLAS INSTALLATION

1. download and extract ATLAS source, eg

cd /usr/local/src/
tar zxvf atlas3.6.0.tar. gz
cd ATLAS

#2. follow the INSTALL.txt instructions to build it and test ATLAS

../configure
make

#3. if successful, copy atlas files into common system locations, eg

mkdir -p /usr/local/lib/atlas
cp lib/Linux_P4SSE2/* /usr/local/lib/atlas/
chmod +x /usr/local/lib/atlas/lib*

mkdir -p /usr/local/include/atlas
cp include/Linux_P4SSE2/* /usr/local/include/atlas/
############### ############### ############### ##########
# B. LAPACK INSTALLATION
#
#1. download and extract LAPACK source

cd /usr/local/src/
tar zxvf lapack.tgz
cd LAPACK

#2. make LAPACK with all defaults

cp INSTALL/make.inc.$PLATF ORM make.inc
make

#(On my fedora core 3 system, the timing failed)

#3. if successful, install the default lapack

mkdir -p /usr/local/lib/lapack
cp lapack_LINUX.a /usr/local/lib/lapack/liblapack.a
cp blas_LINUX.a /usr/local/lib/lapack/libf77blas.a
############### ############### ############### ##########
# C. compile LAPACK for ATLAS
#
#1. prepare LAPACK for recompilation

make clean
cp Makefile Makefile.backup

#3. remove all blas* entries from the Makefile all: and lib: entries

echo ""
echo " remove all blas* entries from the Makefile all: and lib:
entries"
echo ""
cat Makefile | sed s/blaslib// | sed s/blas_testing// | sed
s/blas_timing// > tmp.txt
mv -f tmp.txt Makefile

#4. edit make.inc, this is the tricky part!
#
#WRT, the BLASLIB entry of make.inc:
#
#BLASLIB here is just for testing purpose. We are not
#creating a combined LAPACK/BLAS library. They are kept
#separate. BLASLIB is the BLAS library with which you
#want to test LAPACK.
#
#When you type 'make', the installation of LAPACK begins.
#It consists of constucting the LAPACK library.
#
#LAPACK is Fortran code so you need the Fortran BLAS interface to
ATLAS:
#-L/usr/local/src/ATLAS/lib/Linux_P4SSE2 -lf77blas -latlas
#(ie, there is no requirement for the libcblas.a)
#
#To test LAPACK with the ATLAS BLAS, set:
#
#BLASLIB = -L/usr/local/src/ATLAS/lib/Linux_P4SSE2/ -lf77blas -latlas
#
#or (given standardized installation location suggested above)
#
#BLASLIB = -L/usr/local/lib/atlas/ -lf77blas -latlas
#
#When testing LAPACK with ATLAS-BLAS:
#!!!!make sure there is no -fno-f2c options!!!!
#in the option of compilation of LAPACK (see in make.inc).
#
#When done,

cp INSTALL/make.inc.LINUX make.inc
oldlib=`cat make.inc | grep BLASLIB | sed s#/#.#g`
newlib="BLASLIB = -L/usr/local/lib/atlas/ -lf77blas -latlas"
cat make.inc | sed s/$oldlib/$newlib/
cp make.inc make.inc.atlas

#5. recompile LAPACK (see the Makefile for options)

make install
make lib

############### ############### ############### ##########
# D. INTEGRATE LAPACK with ATLAS INSTALLATION
#
#1. Combine the lapack_LINUX.a from the last lapack
#build with the previous optimized ATLAS
#liblapack.a, according to this web page:
#
#http://math-atlas.sourceforge.net/er...tml#completelp
#
#ATLAS provides optimized versions for 10 LAPACK driver routines:
#[S,D,C,Z]GESV [S,D,C,Z]GETRF [S,D,C,Z]GETRS [S,D,C,Z]GETRI
[S,D,C,Z]TRTRI
#[S,D,C,Z]POSV [S,D,C,Z]POTRF [S,D,C,Z]POTRS [S,D,C,Z]POTRI
[S,D,C,Z]LAUUM
#You have no reason not to use them.
#
#So,

cd /usr/local/src/ATLAS/lib/Linux_P4SSE2/
mkdir tmp
cd tmp
ar x /usr/local/src/ATLAS/lib/Linux_P4SSE2/liblapack.a
cp /usr/local/src/LAPACK/lapack_LINUX.a libcombinedlapa ck.a
ar r libcombinedlapa ck.a *.o

#2. install the combined lapack library, eg:

cp libcombinedlapa ck.a /usr/local/lib/atlas/
cp libcombinedlapa ck.a ..
cd ..
rm -rf tmp

#3. Update the system?
#
#ln -s /usr/local/lib/atlas/libcombinedlapa ck.a /lib/liblapack.a
#
#If, for some reason, you build a shared library, run
#ldconfig to update symbolic links and the cache in
#/etc/ld.so.cache

############### ############### ############### ######
# Using the library

#A last remark: remember that LAPACK needs libf77blas.a and
#LAPACK from ATLAS needs libcblas.a; so now the new liblapack.a
#will need both. When linking programs, this looks like:
#
#-lcombinedlapack -lcblas -lf77blas -latlas
#
#
#Acknowledgemen t: Some very helpful comments above were
#provided by Julie Langou at cs utk edu

Nov 6 '05 #1
0 2457

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3067
by: drife | last post by:
Hello, Could someone please provide instructions for install Numeric with ATLAS and LAPACK? I've actually done this correctly, I think. But I don't see any difference in the speed. I'm calculating eigenvalues for a 3600 X 3600 covariance matrix.
4
2499
by: Chris Weisiger | last post by:
I'm trying to install numeric on my MacOS X box using Darwin, with the eventual goal of satisfying all of PyGame's dependencies so I can finally start working on my semester project. I would be using MacPython, except that I can't seem to get its Package Manager to work. Anyway, when I try to install numeric, I get the following error: chriswei% sudo ./setup.py install Password: running install running build
1
3239
by: pervinder | last post by:
Hi, I am building a c++ executable which uses fortan math libs. blas, lapack etc. But when i build this on HP-UX, i get below linker errors while it build without anyissues on Sun and Linux platforms. dgetrs_ (first referenced in .../../output/HPUX_32/lib/acc352/dbg/libmtx.a(denseMatrix.o)) (code) dsytrs_ (first referenced in
0
620
by: Darren L. Weber | last post by:
The following is a first attempt to almost create a shell script for installation of ATLAS and LAPACK. It does not work right now and it is specific to a particular platform. It is posted here to archive it and throw into the public domain, maybe others will find it useful. It is at least a documentation of some relevant notes on the procedure. Corrections and updates would be really appreciated. Alternatives to automate this process...
3
3102
by: eri | last post by:
Hi all I need to convert a Fortran program I wrote some months ago. I need BLAS / LAPACK routines and it seems to be very difficult to make it work under Win + MingW32 + DevCPP; so I wonder if there is someone who has managed to install them and has written a sort of HOWTO. I've already downloaded the .zip packages from netlib. What I couldn't find is how to fit them to my needs: I mean, which libs are needed, which header, how to link...
7
2144
by: taoyangsjtu | last post by:
Dear friends, Now, I have just installed the system with full fedora core 4. I had to use lapack, but I don't know how to install and use it. Can anybody tell me the installation process in detail. Thank you! I have downloaded the lapack.tgz and the fortran compiler (g77) is on my computer. Thank you! Tao Yang
1
3449
by: Ken Dere | last post by:
I am trying to install numpy-0.9.8 prior to installing scipy (0.4.9) on a machine running Suse 10.0 with Python 2.4 I am able to get numpy installed to the point when I import it I can do the following: numpy.show_config() atlas_threads_info: NOT AVAILABLE
2
2993
by: aberte | last post by:
Hi, i'm learning how to use lapack library (in particular, Intel MKL). I wish to know how I have to format the my inputs. I'm calling lapack functions from c++ (zhetri, zhemm, zgemm, zhseqr, ztrevc). I declare the 3x3 matrix (in c++) in this way: complex MyMatrix; I intend MyMatrix, MyMatrix, MyMatrix
1
5114
by: Preben | last post by:
Hi, don't know if this is the correct group, but try anyway. I would like to use boostbindings from the boost sandbox together with my project where I use boost::numeric::ublas vectors and matrices. I would guess that I could use these directly with the bindings in the boost sandbox like:
1
1607
by: 1960_j | last post by:
I have tried to install numpy and scipy on python 5.2. Using gcc 2.95.3, lapack 3.1.1 and ATLAS 3.6.0. When installin numpy it seems to work but when I try to run test get error no test for numpy. When I try to Install scipy only get error. Any ideas on how to install would be appreciated. Thanks
0
8357
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8803
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8700
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7298
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1910
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.