[SciPy-user] ATLAS and gcc v4.0.2

Eric Emsellem emsellem at obs.univ-lyon1.fr
Tue Feb 28 04:05:28 EST 2006


Hi,

to summarize: just go on with gcc4. It works (although things may not be 
optimal, but I would guess the difference may be only 10% or so).

==> below is the way I compile things on Suse 10 with gcc4 starting with 
Lapack and going up to matplotlib. I have no problem with it although 
compiling ATLAS is a real pain (it just takes forever). Hope this helps. 
Please adapt things to your machine and system (using the right 
architecture name for ATLAS). Things that I don't do anymore are 
commands starting with "#".

ALso please update some of the version numbers (ipython, matplotlib).

A cleaned and updated version of such a simple procedure would be very 
helpful, if someone can post it.

cheers

Eric
=============================

#######################
# LAPACK
# #####################
# Build Lapack from the web since then you are sure it is complete
# It is in the Suse distribution but I don't trust it
wget  http://www.netlib.org/lapack/lapack.tgz

mdkir install_lapack
cd install_lapack
tar xvfz ../lapack.tgz
cp INSTALL/make.inc.LINUX make.inc

## This will build a lapack_LINUX.a
## That you will use later on for ATLAS
make lapacklib

########################
# ATLAS
# ######################
tar xvfz atlas3.6.0.tar.gz
cd ATLAS

## You will have to answer a few questions...
# don't care about the warning on gcc
make

# change "arch" with the right one
# you will be asked a few question there
# don't care about the warning on gcc
make install arch=Linux_UNKNOWNSSE2

## Create a new directory where to put the include and lib files
## (root)
mkdir /usr/local/lib/atlas
## then  copy all the include and archive (*.a) files
## under this new dir
cp include/*  /usr/local/lib/atlas
cp *.a  /usr/local/lib/atlas

# in .cshrc
# and don't forget to set it up, this is for tcsh. For bash use "set .. 
= .."
setenv ATLAS /usr/local/lib/atlas

## save the lapack lib built from ATLAS (which is incomplete)
cd /usr/local/lib/atlas
cp liblapack.a liblapack.a_ATLAS
# then create a new temporary dir which will allow you to complete
# lapack
mkdir tmp
cd tmp
# detar the atlas lapack lib
ar x ../liblapack.a
# then cp the true lapack linux lib into the liblapack.a file
cp  <path>/install_lapack/lapack_LINUX.a ../liblapack.a
# and add the files from the atlas lib
# you will then have a full lapack lib with the atlas files too
ar r ../liblapack.a *.o
cd ..
# remove the temp dir
rm -rf tmp
## copy all *.a into your local atlas dir
cp *.a  /usr/local/lib/atlas

# ######################
## Added all fftw libraries from yast2
# ######################

##############################################################
###### NO NEED TO INSTALL NUMERIC IF YOU HAVE ALREADY the new NUMPY...
##### HOWEVER Numarray is required for pyfits
##### NUmeric
###cvs -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/numpy login
###cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/numpy co -P 
Numerical
###
#### THEN EDIT your customize.py
##############################################################
##### Customization variables for installing Numeric
###
###use_system_lapack = 1
###lapack_library_dirs = ['/usr/local/lib/atlas']
###lapack_libraries = ['lapack', 'cblas', 'f77blas', 'atlas', 'g2c']
###lapack_extra_link_args = []
###
#### Set use_dotblas to 1 to use BLAS for the matrix multiplication 
routines.
#### Put the directory that 'cblas.h' is in into dotblas_include_dirs
###use_dotblas = 1
###dotblas_include_dirs = ['/usr/local/lib/atlas']
###dotblas_cblas_header = '<cblas.h>'
###dotblas_library_dirs = lapack_library_dirs
###dotblas_libraries = lapack_libraries
###dotblas_extra_link_args = []
##############################################################
###
###python setup.py install
###########################################################
# NUMPY
# #########
svn co http://svn.scipy.org/svn/numpy/trunk numpy
cd numpy
python setup.py install

# ######################
## INSTALLED IPYTHON
# ######################
tar xvfz ipython-0.6.15.tar.gz
cd ipython-0.6.15
python setup.py install

# ######################
## F2PY
# ######################
  (CVS password: guest)
  cvs -d :pserver:anonymous at cens.ioc.ee:/home/cvs login
  cvs -z6 -d :pserver:anonymous at cens.ioc.ee:/home/cvs checkout f2py2e
  cd f2py2e
  make install

# ######################
## SCIPY
# ######################
## Remove any scipy in your python before..
## ALSO REMOVE the "build" directories from the "core" and "scipy" 
directories before
## doing the install!!
svn co http://svn.scipy.org/svn/scipy/trunk scipy
cd scipy
python setup.py install

## Test::

  cd
  # Start python and run as tests:
  # (level 10 will take a while ...)
  import scipy
  scipy.test(1,verbosity=10)
  scipy.test(10,verbosity=10)

#################################
# Matplotlib 0.86
#################################
# Note that some matplotlibrc options have changed
# such that tick ==> xtick + ytick

# add one line in setupext.py:

        o.tcl_inc="/usr/include/"

# before
        if not os.path.exists(o.tcl_inc):
            print 'cannot find tcl/tk headers. giving up.'
            sys.exit()
    return o

# and run the usual
python setup.py install

-- 
===============================================================
Observatoire de Lyon                 emsellem at obs.univ-lyon1.fr
9 av. Charles-Andre                      tel: +33 4 78 86 83 84
69561 Saint-Genis Laval Cedex            fax: +33 4 78 86 83 86
France               http://www-obs.univ-lyon1.fr/eric.emsellem
===============================================================




More information about the SciPy-User mailing list