Nasser M. Abbasi, updated July 30, 2012
nma at 12000.org
this page in PDF
and made some minor improvments to the bindings.
This page describes the minor changes made and instructions how to use these bindings from Ada in order call LAPACK and BLAS Fortran functions.
A new tar file for LAPACK and for BLAS with all the changes can be downloaded from the link below.
The changes made to LAPACK binding involve streamlining the source tree
structure, writing new Makefiles, simplify the binding to use one package
lapack and also adding the documentation shown below.
Changes for the BLAS binding were minimal. It involved changes to the source tree structure and writing Makefiles and adding the documentation shown below.
The native lapack and blas libraries need to be first installed on the
system (on Linux, these libraries will normally be found
To use LAPACK from Ada, one needs to install both the native LAPACK and BLAS libraries since LAPACK depends on BLAS.
The Ada binding is a thin binding, meaning there is 1-1 mapping between the call to the Ada routine and the corresponding Fortran routine using the same function name in the Fortran libraries.
The following diagram illustrates the use of the LAPACK binding with
gnatmake command to compile and link the client Ada program.
And a similar diagram for the BLAS binding interface
The source tree structure for LAPACK is described in this diagram
The full content of the LAPACK tree is listed here lapack_tree_listing.txt
The source tree structure for the BLAS binding is described in this diagram
common.mkwhere a Makefile variable is set to point to the directory that contains the native LAPACK and BLAS libraries. This is currently defined to point to
/usr/lib. Edit this line to change this location only if the location is different in your system.
makefrom the top of each tree. Make will build the whole tree, including the bindings packages and the test programs.
make testingfrom the top of tree for LAPACK and for BLAS.
tests/directory of each tree.
binding/directory in each tree. This is the directory that you need to set the
-Ioption to point to when using
gnatmakeas shown in the diagrams above.