CVApp Forum@View topic - CLPACK and ATLAS

CLPACK and ATLAS

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

CLPACK and ATLAS

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

http://www.ifp.illinois.edu/~nakazato/tips/cygwin_atlas.html

What is CLAPACK?
The CLAPACK library was built using a Fortran to C conversion utility called f2c.
The entire Fortran 77 LAPACK library is run through f2c to obtain C code,
and then modified to improve readability.
CLAPACK's goal is to provide LAPACK for someone who does not have access to a Fortran compiler.
Android does not have fortran compiler???
So CLAPACK may be suitable for android??

LAPACKE
LAPACKE the Standard C language APIs for LAPACK
is an attempt (started by Intel IIRC) to define a formal C language interface for Fortran LAPACK libraries.

How to use CLAPACK and ATLAS on Cygwin
by Munehiro Nakazato
RedPin Downloading CLAPACK and ATLAS

CLAPACK is available from here
Automatically Truned Linear Algebra Software (ATLAS) is optional, but it improves the performance of CLAPACK. ATLAS is avalable from here

RedPin Compiling ATLAS

From ATLAS/ directory, simply type

$ make config

You can answer YES to most questions. Then, type

$ make

Copy library files into /usr/local/lib
RedPin Compiling CLAPACK

Unarchive and modify make.inc as follows,

$ tar xzfv clapack.tgz
$ cd CLAPACK
$ cp INSTALL/make.inc.LINUX ./make.inc

In make.inc:

...
PLAT = _CYGWIN
BLASLIB = ../../libcblaswr.a -L/usr/local/lib -lcblas -latlas
..

This ensures CLAPACK uses ATLAS. See README.install for further instruction.

Then compile,

$ make f2clib
$ make cblaswrap
$ cd SRC; make
$ cd TESTING/MATGEN; make
$ cd TESTING; make

After CLAPACK is compiled successfully, copy the files into /usr/local/. Don't forget to copy files under CLAPACK/F2CLIB/ (libF77.a, libI77.a and f2c.h) as well.

Now, you should have the following files in /usr/local/

/usr/local/include:
cblas.h clapack.h f2c.h

/usr/local/lib:
lapack_CYGWIN.a libI77.a libcblas.a libf77blas.a libtstatlas.a
libF77.a libatlas.a libcblaswr.a liblapack.a tmglib_CYGWIN.a

RedPin Compiling Your C/C++ Programs with ATLAS and CLAPACK

Finally, you can compile your CBLAS/CLAPACK program as follows:

$ gcc -mno-cygwin -I/usr/local/include -O3 -o myfile myfile.c \
/usr/local/lapack_CYGWIN.a \
-L/usr/local/lib -lcblaswr -lcblas -latlas -lg2c \
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