<- previous    index    next ->

Lecture 14, LAPACK

Creating a numerical algorithm can take years.
Finding and adapting a numerical algorithm is practical.

The 10 top programming languages:
most used
2019 chart
learn a programming language

Some history and dates of programming languages:
http://en.wikipedia.org/wiki/History_of_programming_languages

LAPACK is a good starting place to find high quality numerical code.
Yes, much is in Fortran 77, some in Fortran 95, and yes much of the code
is a very mature 30 years old. The good news is that the code produces
correct numeric results with known accuracy. A download typically
includes test drivers and timing programs.

LAPACK is used in Maple, Matlab, and libraries are available for
C, Python, Ruby, Java, Ada, and many other languages.

see www.netlib.org/lapack

ACM Transactions on Mathematical Software, TOMS is another
source. see www.netlib.org/toms

LAPACK includes prior LINPACK and EISPACK and uses the BLAS,
Basic Linear Algebra Subroutines, for low level operations.

Almost every LAPACK routine is available in four types:
  Single precision floating point  prefix "s"
  Double precision floating point  prefix "d"
  Complex single precision         prefix "c"
  Complex double precision         prefix "z"


LAPACK is available on Internet:

LAPACK FAQ
naming conventions
single
double
complex
complex16

LAPACK Users Guide

lapcak.index information

The Fortran source code for the Linear Algebra Package, LAPACK
are under the LAPACK directory with subdirectories
   SRC  BLAS  TESTING  TIMING  INSTALL
On CSEE Help WEB pages:  www.csee.umbc.edu/help/fortran
And, for g95 users, the Fortran95 interface 
UMBC CSEE help, then fortran
then BLAS
libblas.a
liblapack.a

Or, on Debian or Ubuntu  sudo apt-get install gfortran
and compile and link LAPACK and all my examples.


lapack.tar big, about 35MB
LAPACK installation guide (postscript)
LAPACK quick reference (PostScript) 
Raw LAPACK directory use lapack.a and blas.a on Linux on Intel
Raw LAPACK/SRC directory 
Raw LAPACK/BLAS directory 
Raw LAPACK/TESTING directory 
Raw LAPACK/TIMING directory 
Raw LAPACK/INSTALL directory 
lapcak95.tgz

g95 for Linux, tar -xvzf g95-x86-linux.tgz 
Self installing executable,g95 for MS Windows 

Much more information on Fortran, including a full manual, is at
www.csee.umbc.edu/help/fortran


For Java users:
Java Numerics WEB Site
includes an early version of LAPACK translated to Java plus many other
numeric routines.


For Python users: Python has numpy and scipy and can call Fortran code
Python bindings


For Ada users there is an interface binding
Ada bindings


For Scala users: No LAPACK I could find, alternative
Scalala math library


There is a learning curve to using LAPACK.
I suggest finding a routine you need.
Copy the comments from the front of that routine into your program.
Create the necessary declarations needed for calling the routine.
Create a Makefile with the compilation and library commands.
You will need lapack.a and blas.a or equivalent.

An example use on our CSEE system is
Makefile_LAPACK
test_eigen2.f90
test_eigen2_f90.out
This is really old code that still works and uses
invrse.for
eigdet.for
matmul.for
evalvec.for
a02ftext.for

    <- previous    index    next ->

Other links

Go to top