CVApp Forum@View topic - ATLAS : C Code BLAS

ATLAS : C Code BLAS

Eigen,
Scilab,
Maxima(Mathematica-like)
R,Octave(matlib-like)
and all open source tools for mathematic and scientific fields.

ATLAS : C Code BLAS

Postby thomas » 2015年 Feb 11日, 20:30

Automatically Tuned Linear Algebra Software : ATLAS
ATLAS for ARM and anrdoid
http://www.vesperix.com/arm/
http://en.wikipedia.org/wiki/Automatically_Tuned_Linear_Algebra_Software
ATLAS provides a mature open source implementation of BLAS APIs for C and Fortran77.

ATLAS is often recommended as a way to automatically generate an optimized BLAS library.
While its performance often trails that of specialized libraries written for one specific hardware platform,
it is often the first or even only optimized BLAS implementation available on new systems and is a large improvement over the generic BLAS available at Netlib.
For this reason, ATLAS is sometimes used as a performance baseline for comparison with other products.
It is released under a BSD-style license without advertising clause,
and many well-known mathematics applications including MATLAB, Mathematica, Scilab, Sage, and some builds of GNU Octave may use it.


Quick Reference Guide to the BLAS
http://www.netlib.org/lapack/lug/node145.html
BLAS-LEVELS.png


LAPACK
When integrating the ATLAS BLAS with LAPACK an important consideration is the choice of blocking factor for LAPACK.
If the ATLAS blocking factor is small enough the blocking factor of LAPACK could be set to match that of ATLAS.
To take advantage of recursive factorization, ATLAS provides replacement routines for some LAPACK routines.
These simply overwrite the corresponding LAPACK routines from Netlib.
thomas
 
Posts: 534
Joined: 2013年 May 4日, 09:52

Re: ATLAS : C Code BLAS

Postby thomas » 2015年 Feb 24日, 12:19

ATLAS NEEDS GCC 4.7 and GFORTRAN 4.7 (or above) to build.
If cpu is intel corei3,5,7 with intel x86 AVX2, tool chain version may need higher.
http://math-atlas.sourceforge.net/atlas_install/node14.html
thomas
 
Posts: 534
Joined: 2013年 May 4日, 09:52

Re: ATLAS : C Code BLAS

Postby thomas » 2015年 Feb 24日, 17:34

Getting started with ATLAS, BLAS and LAPACK
http://www.lindonslog.com/programming/atlas-blas-lapack-linear-algebra-libraries/

With cblas.h
Code: Select all
#include <stdio.h>
#include <cblas.h>
 
int
main ()
{
  int i;
  double x[] = { 1, 1, 1 };
 
 
  cblas_dscal(3, 4.323, x, 1);
 
  for (i = 0; i < 3; ++i)
    printf ("%f\n", x[i]);
 
  return 0;
}


To compile
Code: Select all
   
$ gcc testblasc.c -o testblasc -I ../include/ -L ../build/lib -lcblas -latlas
$ ./testblas
4.323000
4.323000
4.323000
thomas
 
Posts: 534
Joined: 2013年 May 4日, 09:52

Re: ATLAS : C Code BLAS

Postby thomas » 2015年 Feb 26日, 10:14

Installing ATLAS with full LAPACK on 64 bit Linux
https://mbudisic.wordpress.com/2010/08/12/installing-atlas-with-full-lapack-on-64-bit-linux/
1. build lapack
And then goto ATLAS
2. go to the master directory decompress ATLAS, and create a build directory for it IN THE MASTER, not in ATLAS, e.g., BUILD
go to BUILD directory and run the ../ATLAS/configure script with following options set:

--with-netlib-lapack should point to the lapackXXX.a file that was compiled in LAPACK directory, so something like ../lapack/lapack_LINUX.a
–prefix set to wherever the install target is. Note that ATLAS’s configure ignores $PREFIX/share/config.site file, so you’ll have to set those up manually
bittage -b 64
flags for ALL compilers -Fa alg '-fPIC -m64 -fPIC'

This will generate a Make.inc that will most likely need to be edited.

ICC, SMC, GOODGCC and other compilers have to have correct fPIC and m64 flags
F77 should be gfortran and F77SYSLIB need to be set to correct position where libgfortran library is
FLAPACK lib needs to point at the recently generated LAPACK .a library
thomas
 
Posts: 534
Joined: 2013年 May 4日, 09:52


Return to Mathematic, Engineering and Science tools

Who is online

Users browsing this forum: No registered users and 1 guest

cron