Difference between revisions of "ATLAS"

From CBLFS
Jump to navigationJump to search
(Optional: Update about ATLAS / gcc-4.x performance)
(Complete re-write for new ATLAS version.)
Line 1: Line 1:
{| style="text-align: left; background-color: AliceBlue;"
+
{|style="text-align: left; background-color: AliceBlue;"
 
|-
 
|-
 
!Download Source:
 
!Download Source:
| http://www.netlib.org/atlas/atlas{{BLAS-Version}}.tgz
+
|http://downloads.sourceforge.net/math-atlas/atlas{{ATLAS-Version}}.tar.bz2
 
|-
 
|-
!Download Source:
+
!Download Patch:
| http://www.netlib.org/blas/blas.tgz (F77 source files only, see below)
+
|http://svn.cross-lfs.org/svn/repos/patches/atlas-{{ATLAS-Version}}/atlas-{{ATLAS-Version}}-shared-libs-1.patch
 +
|-
 +
!Download Patch:
 +
|http://svn.cross-lfs.org/svn/repos/patches/atlas-{{ATLAS-Version}}/atlas-{{ATLAS-Version}}-decl-fix-1.patch
 
|}
 
|}
  
 
----
 
----
  
{{Package-Introduction|BLAS are '''B'''asic '''L'''inear '''A'''lgebra '''S'''ubprograms written in Fortran77.  There are Level 1 (scalar and vector operations), Level 2 (scalar-matrix operations) and Level 3 (matrix-matrix operations) subprograms.  They are available at [http://www.netlib.org/blas/ as tarballs] of F77 source files and are un-optimized for any particular architecture.  Use the second download source if you want or need these source files.
+
{{Package-Introduction|BLAS are '''B'''asic '''L'''inear '''A'''lgebra '''S'''ubprograms written in Fortran.  There are Level 1 (scalar and vector operations), Level 2 (scalar-matrix operations) and Level 3 (matrix-matrix operations) subprograms.  ATLAS (Automatically Tuned Linear Algebra Software) will provide C and FORTRAN interfaces to a BLAS implementation optimized for a specific machine architecture.  The ideal source of BLAS and LAPACK libraries are those provided by the microprocesor vendor such as AMD's [[ACML]].  However, these are not provided under a license that allows re-distribution without written consent from the vendor.|http://www.netlib.org/blas/}}
  
LAPACK is a '''L'''inear '''A'''lgebra '''PACK'''age that provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems.  LAPACK routines are written so that as much as possible of the computation is performed by calls to the BLAS.  The LAPACK libraries produced by ATLAS are not optimal.  Use the [[LAPACK]] package for optimal LAPACK libraries.
+
== Configuration Information ==
  
ATLAS (Automatically Tuned Linear Algebra Software) will provide C and FORTRAN interfaces to a BLAS and LAPACK implementation optimized for a specific machine architecture.  The ideal source of BLAS and LAPACK libraries are those provided by the microprocesor vendor such as AMD's [[ACML]].  However, these are not provided under a license that allows re-distribution without written consent from the vendor.|http://www.netlib.org/blas/}}
+
Patch the package:
  
== Dependencies ==
+
patch -Np1 -i ../atlas-{{ATLAS-Version}}-decl-fix-1.patch &&
 +
patch -Np1 -i ../atlas-{{ATLAS-Version}}-shared-libs-1.patch
  
=== Optional ===
+
Create a wrapper script to assist in building the shared libraries:
 +
 +
export BUILD_DIR=CBLFS-build &&
 +
mkdir -pv ${BUILD_DIR} &&
 +
cd ${BUILD_DIR}
  
* [[GCC-3.3]] Benchmarking by the ATLAS maintainers indicated that, with the exception of Core Duo and Pentium M, compiling ATLAS with gcc-3.X [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27827 produced better x87 code than gcc-4.0]. But this performance regression appears to have been fixed in later versions of gcc-4.x, and the bug report has now been closed as 'RESOLVED'.
+
cat > war << "EOF"
 +
#! /bin/bash
 +
#
 +
# war -- wrapper for the archiver
 +
#
 +
# Executed by ATLAS build as:
 +
# full_path/war ARCHIVER ARFLAGS LIBNAME.a OBJS.lo
 +
 +
TOPDIR=$(echo $0 | sed 's/\(.*\)\/.*/\1/')
 +
PWD=$(pwd)
 +
 +
ARCHIVER=$1
 +
LIBRARY=$(echo $3 | sed 's/.*\/\(.*\)/\1/')
 +
OBJ_DIR=${TOPDIR}/CBLFS/$LIBRARY
 +
 +
if [ ! -x $OBJ_DIR ]; then mkdir -p ${OBJ_DIR}/.libs; fi
 +
 +
$ARCHIVER $@
 +
 +
shift 3
 +
for obj in $@ ; do
 +
    lobj=$(echo $obj | sed 's/\.o/\.lo/')
 +
    ln -sf ${PWD}/$obj ${OBJ_DIR}/$obj
 +
    ln -sf ${PWD}/$lobj ${OBJ_DIR}/$lobj
 +
    ln -sf ${PWD}/.libs/$obj ${OBJ_DIR}/.libs/$obj
 +
done
 +
EOF
  
== Configuration ==
+
Make the script executable:
  
If you are building BLAS libraries for more than one TARGET architecture, either place each set of libraries in a subdirectory of /usr/lib or give each set a unique name so as not to overwrite earlier versions.
+
chmod a+x war
  
 
== Non-Multilib ==
 
== Non-Multilib ==
  
 +
{{Note|Either create a BUILD variable similar to the multiarch BUILD32, BUILDN32, and BUILD64 with compiler options or replace ${BUILD} in the configure flags below with your compiler options directly.}}
 +
 +
{{Note|Replace the <BITS> in the configure command below with 32 or 64 as appropriate for your non-multilib architecture.}}
 +
 
Compile the package:
 
Compile the package:
  
  make
+
../configure --cc=gcc --cflags="${BUILD}" --prefix=/usr --incdir=/usr/include/atlas \
 +
-C ac gcc -F ac "${BUILD}" -C if gfortran -F if "${BUILD}" -Ss pmake "\make -j3" \
 +
-Si cputhrchk 0 -b <BITS> &&
 +
make &&
 +
export RPATH=/usr/lib/blas/atlas &&
 +
make LIBDIR=/usr/lib RPATH="${RPATH}" shared
  
The configuration is interactive.  Simply follow the instructions presented on the screenIf you've installed the FORTRAN provided by gcc-4.0.3 and later use <b>gfortran</b> when the configuration complains that the F77 version it finds is unsuitable.
+
Timing tests are critical for optimizing the performance of the libraries for your machineDo not skip the tests.
 +
 
 +
for i in F77 C; do
 +
    cd interfaces/blas/${i}/testing
 +
    make sanity_test
 +
    if <nowiki>[[ -d CBLFS/libptf77blas.a ]]</nowiki>; then
 +
      make ptsanity_test
 +
    fi
 +
done
 +
cd ../../../../
 +
make time
  
 
Install the package:
 
Install the package:
  
  make install arch=<TARGET> &&
+
mkdir -pv ${RPATH} &&
  cp -v lib/<TARGET>/*.a /usr/lib
+
cd ./CBLFS/libs &&
 
+
cp -vP libatlas* ${RPATH} &&
Where <TARGET> will be displayed at the completion of the 'make' step.
+
cp -vP *blas* ${RPATH} &&
 
+
mkdir -pv /usr/include/atlas &&
Install the API and other documentation.
+
install -v ../../../include/cblas.h /usr/include/atlas &&
 
+
  install -v ../../../include/atlas_misc.h /usr/include/atlas &&
  install -v -m755 -d /usr/share/doc/ATLAS-{{BLAS-Version}} &&
+
install -v ../../../include/atlas_enum.h /usr/include/atlas &&
  for doc in doc/*.{ps,txt}; do
+
install -v ../../include/*.h /usr/include/atlas
    cp -v $doc /usr/share/doc/ATLAS-{{BLAS-Version}}
 
  done
 
 
 
The ATLAS compilation and tuning produces several log files in bin/<TARGET>/INSTALL_LOG. These may be of interest or helpful if the BLAS libraries are found not to be optimal and you seek help from the ATLAS maintainersInstall them as follows:
 
 
 
  install -v -m755 -d /usr/share/doc/ATLAS-{{BLAS-Version}}/INSTALL_LOG &&
 
  for log in bin/<TARGET>/INSTALL_LOG/*.LOG; do
 
    cp -v $log /usr/share/doc/ATLAS-{{BLAS-Version}}/INSTALL_LOG
 
  done
 
  
 
== Multilib ==
 
== Multilib ==
Line 61: Line 105:
 
Compile the package:
 
Compile the package:
  
  make
+
../configure --cc=gcc --cflags="${BUILD32}" --prefix=/usr --libdir=/usr/lib64 --incdir=/usr/include/atlas \
 +
-C ac gcc -F ac "${BUILD32}" -C if gfortran -F if "${BUILD32}" -Ss pmake "\make -j3" -Si cputhrchk 0 -b 32 &&
 +
make &&
 +
export RPATH=/usr/lib/blas/atlas &&
 +
make LIBDIR=/usr/lib RPATH="${RPATH}" shared
 +
 
 +
Timing tests are critical for optimizing the performance of the libraries for your machine.  Do not skip the tests.
  
The configuration is interactiveSimply follow the instructions presented on the screen. If you've installed the FORTRAN provided by gcc-4.0.3 and later use <b>gfortran</b> when the configuration complains that the F77 version it finds is unsuitable.
+
for i in F77 C; do
 +
    cd interfaces/blas/${i}/testing
 +
    make sanity_test
 +
    if <nowiki>[[ -d CBLFS/libptf77blas.a ]]</nowiki>; then
 +
      make ptsanity_test
 +
    fi
 +
  done
 +
cd ../../../../
 +
make time
  
 
Install the package:
 
Install the package:
  
  make install arch=<TARGET> &&
+
mkdir -pv ${RPATH} &&
  cp -v lib/<TARGET>/*.a /usr/lib
+
cd ./CBLFS/libs &&
 
+
cp -vP libatlas* ${RPATH} &&
Where <TARGET> will be displayed at the completion of the 'make' step.
+
cp -vP *blas* ${RPATH} &&
 
+
mkdir -pv /usr/include/atlas &&
The ATLAS compilation and tuning produces several log files in bin/<TARGET>/INSTALL_LOG. These may be of interest or helpful if the BLAS libraries are found not to be optimal and you seek help from the ATLAS maintainersInstall them as follows:
+
install -v ../../../include/cblas.h /usr/include/atlas &&
 
+
install -v ../../../include/atlas_misc.h /usr/include/atlas &&
  install -v -m755 -d /usr/share/doc/ATLAS-{{BLAS-Version}}/INSTALL_LOG32 &&
+
  install -v ../../../include/atlas_enum.h /usr/include/atlas &&
  for log in bin/<TARGET>/INSTALL_LOG/*.LOG; do
+
install -v ../../include/*.h /usr/include/atlas
    cp -v $log /usr/share/doc/ATLAS-{{BLAS-Version}}/INSTALL_LOG32
 
  done
 
  
 
=== N32 ===
 
=== N32 ===
Line 83: Line 139:
 
Compile the package:
 
Compile the package:
  
  make
+
../configure --cc=gcc --cflags="${BUILDN32}" --prefix=/usr --libdir=/usr/lib64 --incdir=/usr/include/atlas \
 +
-C ac gcc -F ac "${BUILDN32}" -C if gfortran -F if "${BUILDN32}" -Ss pmake "\make -j3" -Si cputhrchk 0 -b 32 &&
 +
make &&
 +
export RPATH=/usr/lib32/blas/atlas &&
 +
make LIBDIR=/usr/lib32 RPATH="${RPATH}" shared
  
The configuration is interactive.  Simply follow the instructions presented on the screenIf you've installed the FORTRAN provided by gcc-4.0.3 and later use <b>gfortran</b> when the configuration complains that the F77 version it finds is unsuitable.
+
Timing tests are critical for optimizing the performance of the libraries for your machineDo not skip the tests.
 +
 
 +
for i in F77 C; do
 +
    cd interfaces/blas/${i}/testing
 +
    make sanity_test
 +
    if <nowiki>[[ -d CBLFS/libptf77blas.a ]]</nowiki>; then
 +
      make ptsanity_test
 +
    fi
 +
done
 +
cd ../../../../
 +
make time
  
 
Install the package:
 
Install the package:
  
  make install arch=<TARGET> &&
+
mkdir -pv ${RPATH} &&
  cp -v lib/<TARGET>/*.a /usr/lib32
+
cd ./CBLFS/libs &&
 
+
cp -vP libatlas* ${RPATH} &&
Where <TARGET> will be displayed at the completion of the 'make' step.
+
cp -vP *blas* ${RPATH} &&
 
+
mkdir -pv /usr/include/atlas &&
The ATLAS compilation and tuning produces several log files in bin/<TARGET>/INSTALL_LOG. These may be of interest or helpful if the BLAS libraries are found not to be optimal and you seek help from the ATLAS maintainersInstall them as follows:
+
install -v ../../../include/cblas.h /usr/include/atlas &&
 
+
install -v ../../../include/atlas_misc.h /usr/include/atlas &&
  install -v -m755 -d /usr/share/doc/ATLAS-{{BLAS-Version}}/INSTALL_LOGN32 &&
+
  install -v ../../../include/atlas_enum.h /usr/include/atlas &&
  for log in bin/<TARGET>/INSTALL_LOG/*.LOG; do
+
install -v ../../include/*.h /usr/include/atlas
    cp -v $log /usr/share/doc/ATLAS-{{BLAS-Version}}/INSTALL_LOGN32
 
  done
 
  
 
=== 64Bit ===
 
=== 64Bit ===
Line 105: Line 173:
 
Compile the package:
 
Compile the package:
  
  make
+
../configure --cc=gcc --cflags="${BUILD64}" --prefix=/usr --libdir=/usr/lib64 --incdir=/usr/include/atlas \
 +
-C ac gcc -F ac "${BUILD64}" -C if gfortran -F if "${BUILD64}" -Ss pmake "\make -j3" -Si cputhrchk 0 -b 64 &&
 +
make &&
 +
export RPATH=/usr/lib64/blas/atlas &&
 +
make LIBDIR=/usr/lib64 RPATH="${RPATH}" shared
  
The configuration is interactive.  Simply follow the instructions presented on the screenIf you've installed the FORTRAN provided by gcc-4.0.3 and later use <b>gfortran</b> when the configuration complains that the F77 version it finds is unsuitable.
+
Timing tests are critical for optimizing the performance of the libraries for your machineDo not skip the tests.
 +
 
 +
for i in F77 C; do
 +
    cd interfaces/blas/${i}/testing
 +
    make sanity_test
 +
    if <nowiki>[[ -d CBLFS/libptf77blas.a ]]</nowiki>; then
 +
      make ptsanity_test
 +
    fi
 +
done
 +
cd ../../../../
 +
make time
  
 
Install the package:
 
Install the package:
  
   make install arch=<TARGET> &&
+
mkdir -pv ${RPATH} &&
  cp -v lib/<TARGET>/*.a /usr/lib64
+
cd ./CBLFS/libs &&
 +
cp -vP libatlas* ${RPATH} &&
 +
   cp -vP *blas* ${RPATH} &&
 +
mkdir -pv /usr/include/atlas &&
 +
install -v ../../../include/cblas.h /usr/include/atlas &&
 +
install -v ../../../include/atlas_misc.h /usr/include/atlas &&
 +
install -v ../../../include/atlas_enum.h /usr/include/atlas &&
 +
install -v ../../include/*.h /usr/include/atlas
 +
 +
== Configuration Information ==
  
Where <TARGET> will be displayed at the completion of the 'make' step.
+
Create and install pkgconfig metadata files:
 +
 +
cat > blas.pc.in << "EOF"
 +
prefix=/usr
 +
exec_prefix=${prefix}
 +
libdir=/usr/<LIB>/blas/atlas
 +
includedir=${prefix}/include
 +
 +
Name: blas
 +
Description: Automatically Tuned Linear Algebra Software F77 BLAS implementation
 +
Version: 3.8.0
 +
URL: http://math-atlas.sourceforge.net/
 +
Libs: -L${libdir} -lblas -latlas
 +
Libs.private: -lm -lgfortran
 +
EOF
 +
 +
cat > cblas.pc.in << "EOF"
 +
prefix=/usr
 +
exec_prefix=${prefix}
 +
libdir=/usr/<LIB>/blas/atlas
 +
includedir=${prefix}/include
 +
 +
Name: cblas
 +
Description: Automatically Tuned Linear Algebra Software C BLAS implementation
 +
Version: 3.8.0
 +
URL: http://math-atlas.sourceforge.net/
 +
Libs: -L${libdir} -lcblas -latlas
 +
Libs.private: -lm -lgfortran
 +
Cflags: -I${includedir}
 +
EOF
  
Install the API and other documentation.
+
=== Non-Multilib or 32-Bit ===
  
  install -v -m755 -d /usr/share/doc/ATLAS-{{BLAS-Version}} &&
+
sed -i 's/<LIB>/lib/' blas.pc.in &&
  for doc in doc/*.{ps,txt}; do
+
sed -i 's/<LIB>/lib/' cblas.pc.in &&
    cp -v $doc /usr/share/doc/ATLAS-{{BLAS-Version}}
+
cp -v blas.pc.in /usr/lib/pkgconfig/blas.pc &&
  done
+
cp -v cblas.pc.in /usr/lib/pkgconfig/cblas.pc
  
The ATLAS compilation and tuning produces several log files in bin/<TARGET>/INSTALL_LOG.  These may be of interest or helpful if the BLAS libraries are found not to be optimal and you seek help from the ATLAS maintainers.  Install them as follows:
+
=== N32 ===
  
  install -v -m755 -d /usr/share/doc/ATLAS-{{BLAS-Version}}/INSTALL_LOG64 &&
+
sed -i 's/<LIB>/lib32/' blas.pc.in &&
  for log in bin/<TARGET>/INSTALL_LOG/*.LOG; do
+
sed -i 's/<LIB>/lib32/' cblas.pc.in &&
    cp -v $log /usr/share/doc/ATLAS-{{BLAS-Version}}/INSTALL_LOG64
+
cp -v blas.pc.in /usr/lib32/pkgconfig/blas.pc &&
  done
+
cp -v cblas.pc.in /usr/lib32/pkgconfig/cblas.pc
 +
 +
=== 64-Bit ===
  
 +
sed -i 's/<LIB>/lib64/' blas.pc.in &&
 +
sed -i 's/<LIB>/lib64/' cblas.pc.in &&
 +
cp -v blas.pc.in /usr/lib64/pkgconfig/blas.pc &&
 +
cp -v cblas.pc.in /usr/lib64/pkgconfig/cblas.pc
 +
 
== Contents ==
 
== Contents ==
  
Line 135: Line 262:
 
|-valign="top";
 
|-valign="top";
 
!Installed Libraries:
 
!Installed Libraries:
| libatlas.a, libcblas.a, libf77blas.a, liblapack.a
+
| libatlas.{a,so}, libcblas.{a,so}, libblas{.a,so}
 
|}
 
|}
  
Line 142: Line 269:
 
{|style="text-align: left"
 
{|style="text-align: left"
 
|-valign="top"
 
|-valign="top"
!libatlas.a:
+
!libatlas
|The main ATLAS library, providing low-level routines for all interface libraries.
+
|is the main ATLAS library, providing low-level routines for all interface libraries.
|-valign="top"
 
!libcblas.a:
 
|The C library with optimized BLAS functions.
 
 
|-valign="top"
 
|-valign="top"
!libf77blas.a:
+
!libcblas
|The FORTRAN library with optimized BLAS functions.
+
|is the C library with optimized BLAS functions.
 
|-valign="top"
 
|-valign="top"
!liblapack.a:
+
!libblas
|The LAPACK routines provided by ATLAS.
+
|is the FORTRAN library with optimized BLAS functions.
 
|}
 
|}

Revision as of 23:16, 1 November 2007

Download Source: http://downloads.sourceforge.net/math-atlas/atlas3.8.0.tar.bz2
Download Patch: http://svn.cross-lfs.org/svn/repos/patches/atlas-3.8.0/atlas-3.8.0-shared-libs-1.patch
Download Patch: http://svn.cross-lfs.org/svn/repos/patches/atlas-3.8.0/atlas-3.8.0-decl-fix-1.patch

Introduction to ATLAS

BLAS are Basic Linear Algebra Subprograms written in Fortran. There are Level 1 (scalar and vector operations), Level 2 (scalar-matrix operations) and Level 3 (matrix-matrix operations) subprograms. ATLAS (Automatically Tuned Linear Algebra Software) will provide C and FORTRAN interfaces to a BLAS implementation optimized for a specific machine architecture. The ideal source of BLAS and LAPACK libraries are those provided by the microprocesor vendor such as AMD's ACML. However, these are not provided under a license that allows re-distribution without written consent from the vendor.

Project Homepage: http://www.netlib.org/blas/

Configuration Information

Patch the package:

patch -Np1 -i ../atlas-3.8.0-decl-fix-1.patch &&
patch -Np1 -i ../atlas-3.8.0-shared-libs-1.patch

Create a wrapper script to assist in building the shared libraries:

export BUILD_DIR=CBLFS-build &&
mkdir -pv ${BUILD_DIR} &&
cd ${BUILD_DIR}
cat > war << "EOF"
#! /bin/bash
#
# war -- wrapper for the archiver
#
# Executed by ATLAS build as:
# full_path/war ARCHIVER ARFLAGS LIBNAME.a OBJS.lo

TOPDIR=$(echo $0 | sed 's/\(.*\)\/.*/\1/')
PWD=$(pwd)

ARCHIVER=$1
LIBRARY=$(echo $3 | sed 's/.*\/\(.*\)/\1/')
OBJ_DIR=${TOPDIR}/CBLFS/$LIBRARY

if [ ! -x $OBJ_DIR ]; then mkdir -p ${OBJ_DIR}/.libs; fi

$ARCHIVER $@

shift 3
for obj in $@ ; do
    lobj=$(echo $obj | sed 's/\.o/\.lo/')
    ln -sf ${PWD}/$obj ${OBJ_DIR}/$obj
    ln -sf ${PWD}/$lobj ${OBJ_DIR}/$lobj
    ln -sf ${PWD}/.libs/$obj ${OBJ_DIR}/.libs/$obj
done
EOF

Make the script executable:

chmod a+x war

Non-Multilib

Caution.png

Note

Either create a BUILD variable similar to the multiarch BUILD32, BUILDN32, and BUILD64 with compiler options or replace ${BUILD} in the configure flags below with your compiler options directly.
Caution.png

Note

Replace the <BITS> in the configure command below with 32 or 64 as appropriate for your non-multilib architecture.

Compile the package:

../configure --cc=gcc --cflags="${BUILD}" --prefix=/usr --incdir=/usr/include/atlas \
-C ac gcc -F ac "${BUILD}" -C if gfortran -F if "${BUILD}" -Ss pmake "\make -j3" \
-Si cputhrchk 0 -b <BITS> &&
make &&
export RPATH=/usr/lib/blas/atlas &&
make LIBDIR=/usr/lib RPATH="${RPATH}" shared

Timing tests are critical for optimizing the performance of the libraries for your machine. Do not skip the tests.

for i in F77 C; do
   cd interfaces/blas/${i}/testing
   make sanity_test
   if [[ -d CBLFS/libptf77blas.a ]]; then
     make ptsanity_test
   fi
done
cd ../../../../
make time

Install the package:

mkdir -pv ${RPATH} &&
cd ./CBLFS/libs &&
cp -vP libatlas* ${RPATH} &&
cp -vP *blas* ${RPATH} &&
mkdir -pv /usr/include/atlas &&
install -v ../../../include/cblas.h /usr/include/atlas &&
install -v ../../../include/atlas_misc.h /usr/include/atlas &&
install -v ../../../include/atlas_enum.h /usr/include/atlas &&
install -v ../../include/*.h /usr/include/atlas

Multilib

32Bit

Compile the package:

../configure --cc=gcc --cflags="${BUILD32}" --prefix=/usr --libdir=/usr/lib64 --incdir=/usr/include/atlas \
-C ac gcc -F ac "${BUILD32}" -C if gfortran -F if "${BUILD32}" -Ss pmake "\make -j3" -Si cputhrchk 0 -b 32 &&
make &&
export RPATH=/usr/lib/blas/atlas &&
make LIBDIR=/usr/lib RPATH="${RPATH}" shared

Timing tests are critical for optimizing the performance of the libraries for your machine. Do not skip the tests.

for i in F77 C; do
   cd interfaces/blas/${i}/testing
   make sanity_test
   if [[ -d CBLFS/libptf77blas.a ]]; then
     make ptsanity_test
   fi
done
cd ../../../../
make time

Install the package:

mkdir -pv ${RPATH} &&
cd ./CBLFS/libs &&
cp -vP libatlas* ${RPATH} &&
cp -vP *blas* ${RPATH} &&
mkdir -pv /usr/include/atlas &&
install -v ../../../include/cblas.h /usr/include/atlas &&
install -v ../../../include/atlas_misc.h /usr/include/atlas &&
install -v ../../../include/atlas_enum.h /usr/include/atlas &&
install -v ../../include/*.h /usr/include/atlas

N32

Compile the package:

../configure --cc=gcc --cflags="${BUILDN32}" --prefix=/usr --libdir=/usr/lib64 --incdir=/usr/include/atlas \
-C ac gcc -F ac "${BUILDN32}" -C if gfortran -F if "${BUILDN32}" -Ss pmake "\make -j3" -Si cputhrchk 0 -b 32 &&
make &&
export RPATH=/usr/lib32/blas/atlas &&
make LIBDIR=/usr/lib32 RPATH="${RPATH}" shared

Timing tests are critical for optimizing the performance of the libraries for your machine. Do not skip the tests.

for i in F77 C; do
   cd interfaces/blas/${i}/testing
   make sanity_test
   if [[ -d CBLFS/libptf77blas.a ]]; then
     make ptsanity_test
   fi
done
cd ../../../../
make time

Install the package:

mkdir -pv ${RPATH} &&
cd ./CBLFS/libs &&
cp -vP libatlas* ${RPATH} &&
cp -vP *blas* ${RPATH} &&
mkdir -pv /usr/include/atlas &&
install -v ../../../include/cblas.h /usr/include/atlas &&
install -v ../../../include/atlas_misc.h /usr/include/atlas &&
install -v ../../../include/atlas_enum.h /usr/include/atlas &&
install -v ../../include/*.h /usr/include/atlas

64Bit

Compile the package:

../configure --cc=gcc --cflags="${BUILD64}" --prefix=/usr --libdir=/usr/lib64 --incdir=/usr/include/atlas \
-C ac gcc -F ac "${BUILD64}" -C if gfortran -F if "${BUILD64}" -Ss pmake "\make -j3" -Si cputhrchk 0 -b 64 &&
make &&
export RPATH=/usr/lib64/blas/atlas &&
make LIBDIR=/usr/lib64 RPATH="${RPATH}" shared

Timing tests are critical for optimizing the performance of the libraries for your machine. Do not skip the tests.

for i in F77 C; do
   cd interfaces/blas/${i}/testing
   make sanity_test
   if [[ -d CBLFS/libptf77blas.a ]]; then
     make ptsanity_test
   fi
done
cd ../../../../
make time

Install the package:

mkdir -pv ${RPATH} &&
cd ./CBLFS/libs &&
cp -vP libatlas* ${RPATH} &&
 cp -vP *blas* ${RPATH} &&
mkdir -pv /usr/include/atlas &&
install -v ../../../include/cblas.h /usr/include/atlas &&
install -v ../../../include/atlas_misc.h /usr/include/atlas &&
install -v ../../../include/atlas_enum.h /usr/include/atlas &&
install -v ../../include/*.h /usr/include/atlas

Configuration Information

Create and install pkgconfig metadata files:

cat > blas.pc.in << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/<LIB>/blas/atlas
includedir=${prefix}/include

Name: blas
Description: Automatically Tuned Linear Algebra Software F77 BLAS implementation
Version: 3.8.0
URL: http://math-atlas.sourceforge.net/
Libs: -L${libdir} -lblas -latlas
Libs.private: -lm -lgfortran
EOF

cat > cblas.pc.in << "EOF"
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/<LIB>/blas/atlas
includedir=${prefix}/include

Name: cblas
Description: Automatically Tuned Linear Algebra Software C BLAS implementation
Version: 3.8.0
URL: http://math-atlas.sourceforge.net/
Libs: -L${libdir} -lcblas -latlas
Libs.private: -lm -lgfortran
Cflags: -I${includedir}
EOF

Non-Multilib or 32-Bit

sed -i 's/<LIB>/lib/' blas.pc.in &&
sed -i 's/<LIB>/lib/' cblas.pc.in &&
cp -v blas.pc.in /usr/lib/pkgconfig/blas.pc &&
cp -v cblas.pc.in /usr/lib/pkgconfig/cblas.pc

N32

sed -i 's/<LIB>/lib32/' blas.pc.in &&
sed -i 's/<LIB>/lib32/' cblas.pc.in &&
cp -v blas.pc.in /usr/lib32/pkgconfig/blas.pc &&
cp -v cblas.pc.in /usr/lib32/pkgconfig/cblas.pc

64-Bit

sed -i 's/<LIB>/lib64/' blas.pc.in &&
sed -i 's/<LIB>/lib64/' cblas.pc.in &&
cp -v blas.pc.in /usr/lib64/pkgconfig/blas.pc &&
cp -v cblas.pc.in /usr/lib64/pkgconfig/cblas.pc

Contents

Installed Libraries: libatlas.{a,so}, libcblas.{a,so}, libblas{.a,so}

Short Description

libatlas is the main ATLAS library, providing low-level routines for all interface libraries.
libcblas is the C library with optimized BLAS functions.
libblas is the FORTRAN library with optimized BLAS functions.
Retrieved from "?title=ATLAS&oldid=11825"