About HPC Systems Software User Guides Education Partners

  / gears / hpc / software / numlib / atlas


Bioinformatics

Compilers and Programming Tools

Computational Chemistry

File System

Finite Element Solvers

Graphics

Mathematics

Numerical Libraries

Optimization

Parallel Programming Libraries and Tools

Queuing and Scheduling Systems

Solid Modeling

Statistics

ATLAS

Overview

The Automatically Tuned Linear Algebra Software (ATLAS) project is an ongoing research effort focusing on applying empirical techniques in order to provide portable performance. At present, it provides C and Fortran77 interfaces to a portably efficient BLAS implementation, as well as a few routines from LAPACK.

Setup

There is no setup needed for this software package.

Usage

ATLAS provides the following libraries:

    liblapack.a
    • a full LAPACK library containing a combination of functions optimized by the ATLAS project and functions from the LAPACK reference library.
    libcblas.a
    • a non-threaded ANSI C interface to BLAS.
    libf77blas.a
    • a non-threaded Fortran77 interface to BLAS.
    libptcblas.a
    • a threaded ANSI C interface to BLAS.
    libptf77blas.a
    • a threaded Fortran77 interface to BLAS.
    libatlas.a
    • the main ATLAS library providing low-level routines for all of the interface libraries.

Different compiler flags are necessary to link with different types of code that use BLAS and/or LAPACK.

For Fortran77 code calling non-threaded BLAS functions, these flags would be needed:

-L/usr/global/atlas -lf77blas -latlas

Fortran77 code calling threaded BLAS functions would need to replace the non-threaded library with the threaded:

-L/usr/global/atlas -lptf77blas.a -latlas

For ANSI C code calling non-threaded BLAS functions, the following flags would be necessary:

-L/usr/global/atlas -lcblas -latlas

ANSI C code calling threaded BLAS functions would need to replace the non-threaded library with the threaded:

-L/usr/global/atlas -lptcblas.a -latlas

When using the LAPACK library, both Fortran77 and ANSI C code use the same flags. For the non-threaded interface this would be:

-L/usr/global/atlas -llapack -lf77blas -lcblas -latlas

For the threaded interface this would be:

-L/usr/global/atlas -llapack -lptf77blas -lptcblas -latlas

Examples

For a Fortran77 file foo.f that uses BLAS functions and is compiled with pgf77 to create an executable foo the following command would be used:

pgf77 foo.f -o foo -L/usr/global/atlas -lf77blas -latlas

For an ANSI C file quux.c that uses LAPACK functions and is compiled with gcc to create an executable quux the following command would be used:

gcc quux.c -o quux -L/usr/global/atlas -llpack -lf77blas -lcblas -latlas

Special Notice

Note that you may be an error when linking with ATLAS that looks like the following:

/usr/global/atlas/libf77blas.a(xerbla.o)(.text+0x18): In function `xerbla_':
: undefined reference to `s_wsfe'
/usr/global/atlas/libf77blas.a(xerbla.o)(.text+0x2f): In function `xerbla_':
: undefined reference to `do_fio'
/usr/global/atlas/libf77blas.a(xerbla.o)(.text+0x46): In function `xerbla_':
: undefined reference to `do_fio'
/usr/global/atlas/libf77blas.a(xerbla.o)(.text+0x50): In function `xerbla_':
: undefined reference to `e_wsfe'
collect2: ld returned 1 exit status

If you do, you need to compile your own copy of xerbla.f. Copy and paste the following into your working directory in a file named xerbla.f.

      SUBROUTINE XERBLA( SRNAME, INFO )
*
*  -- LAPACK auxiliary routine (preliminary version) --
*     Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
*     Courant Institute, Argonne National Lab, and Rice University
*     February 29, 1992
*
*     .. Scalar Arguments ..
      CHARACTER*6        SRNAME
      INTEGER            INFO
*     ..
*
*  Purpose
*  =======
*
*  XERBLA  is an error handler for the LAPACK routines.
*  It is called by an LAPACK routine if an input parameter has an
*  invalid value.  A message is printed and execution stops.
*
*  Installers may consider modifying the STOP statement in order to
*  call system-specific exception-handling facilities.
*
*  Arguments
*  =========
*
*  SRNAME  (input) CHARACTER*6
*          The name of the routine which called XERBLA.
*
*  INFO    (input) INTEGER
*          The position of the invalid parameter in the parameter list
*          of the calling routine.
*
*
      WRITE( *, FMT = 9999 )SRNAME, INFO
*
      STOP
*
 9999 FORMAT( ' ** On entry to ', A6, ' parameter number ', I2, ' had ',
     $      'an illegal value' )
*
*     End of XERBLA
*
      END

Compile to a .o file with

YOUR COMPILER HERE: -c xerbla.f

Example:

  pgf90 -c xerbla.f

Be sure to use the same compiler that you use to compile the rest of your application.

Then link in your own custom xerbla.o as follows:

YOUR COMPILER HERE YOUR_CODE.f90 xerbla.o ATLAS_LINK_COMMANDS_HERE -o output
Documentation

Documentation on ATLAS can be found in the ATLAS home page at:

http://math-atlas.sourceforge.net


Please send questions or suggestions about this web page to beatnic@aset.psu.edu

ASET | ITS | Penn State