PGI Guide to ATLAS

This guide is intended to help build the Automatically Tuned Linear Algebra Software (ATLAS) for Linux using PGI 9.0 compilers.

Version Information

This guide was created for ATLAS version 3.8.3 and the PGI 9.0 Release. This information is for both x64 processors running 64-bit Linux or x86 processors running 32-bit Linux.

Application Notes

Information about ATLAS can be found at the ATLAS home page. From the ATLAS home page:

"ATLAS (Automatically Tuned Linear Algebra Software) provides highly optimized Linear Algebra kernels for arbitrary cache-based architectures. ATLAS provides ANSI C and Fortran77 interfaces for the entire BLAS API, and a small portion of the LAPACK API."

Obtaining the Source Code

The source code for ATLAS can be found at the ATLAS Release Page. Note that you should download the platform independent version. The system specific versions have been precompiled.



Configuration and Set-up Information

Once unpacked, ATLAS must be configured before it can be built. The libraries created will be optimized for either P3, P4, or AMD64 and either serial or parallel. We recommend you build ATLAS on each target system or a system comparable to each target.

Steps to configure ATLAS:

  1. Build the "xconfig" utility.

    make xconfig

  2. Run the configuration script setting the Fortran compiler to pgfortran.

    ./xconfig -f pgfortran -F f "-fast"

    Follow the instructions on the screen and configure as needed.

  3. The following is for configuring ATLAS for use with pgcc.

    The authors of ATLAS recommand using gcc. However, pgcc can be used in place of gcc. When asked if you would like the express set-up, select 'n'. When prompted for the ANSI C compiler, enter the following information.

    Note: for 32-bit SSE enabled systems, replace "-fast -Mvect" with "-fast -Mvect -Mscalarsse".

       Enter ANSI C compiler(CC) [/usr/bin/gcc]: pgcc
       Enter C Flags (CCFLAGS) [-fomit-frame-pointer -O3 -funroll-all-loops]: -fast -Mvect
    CC & FLAGS: pgcc -fast -Mvect
       Enter C compiler for generated code (MCC) [/usr/bin/gcc]: pgcc
       Enter C FLAGS (MMFLAGS) [-fomit-frame-pointer -O]: -O1
       Enter C Linker  [$(CC)]: pgcc
       Enter C Link Flags  [$(CCFLAGS)]: $(CCFLAGS)
    MCC & FLAGS: pgcc -O1
    CLINKER & FLAGS: pgcc -fast -Mvect

    On 64-bit systems, you will need to remove from the created make file the "-m64" flag from the ARCHDEFS variable.

Building ATLAS

To build ATLAS, simply run the following make command, replacing $ARCH with your actual architecture. Note that ATLAS can take quite a while to build and tune.

make install arch=Linux_$ARCH


Please refer to the accompanying documentation for information on how to use ATLAS.

Verifying Correctness

ATLAS includes several blas and lapack tests which test the Fortran interface. These tests can be found in ATLAS/interfaces/blas/F77/testing/Linux_$ARCH. Tests for the C interface can be found in ATLAS/interfaces/blas/C/testing/Linux_$ARCH. The sanity tests check that there are no obvious problems with the build and installation. It runs a set of standard BLAS interface testers and a few LAPACK interface tests. A more complete set of LAPACK tests can be created with some modification. See the file TestTime.txt with the ATLAS documentation for more information. To run the tests, move to the appropriate directory and issue one or both of the following make commands:

make sanity_test

Or for threaded versions, use:

make ptsanity_test

Once complete, reivew the "sanity.out" or "ptsanity.out" files for errors.

Known Issues and Limitations

Compiling using "-fastsse" with pgcc can cause a few of the sanity tests to fail. Compiling the Fortran interface with "-fastsse" is fine.

Click me