-
Notifications
You must be signed in to change notification settings - Fork 0
SmallapackPrerequisites
Smallapack is an interface to the LAPACK/BLAS libraries. Therefore, these libraries are a pre-requisite.
Various Smalltalk dialects can call some external procedures via these two main mechanisms:
- by augmenting the Smalltalk virtual machine with user defined primitives
- by dynamically linking a library containing the procedure and using Foreign Function Interface (FFI)
Smallapack has been developed with the second technology because it is thought to be more agile (easier and faster to develop and extend), and also because the feature is available on various Smalltalk dialects without too much differences.
The drawback is that BLAS and LAPACK must be available as a Dynamic Link Library (Windows .DLL, Mac .dylib) or shared library (linux .so). The libraries are build as static by default, but http://www.netlib.org/lapack contains instructions for creating a dynamic version.
Netlib provides a default implementation of the BLAS library. But this default implementation is not specifically optimized for you hardware. It is better to obtain an optimized BLAS, either from a vendor, or from the ATLAS project (See http://math-atlas.sourceforge.net/ ). Once more, it will be necessary to obtain or build a DLL.
Note that Mac OSX provides an optimized BLAS/LAPACK in the veclib framework, and this should be installed along with XCode.
Blas executes the function xerbla when it detects an error in function parameters.
The default implementation for xerbla is to stop the program, which is not suitable for Smalltalk read/eval/print style.
Thus Smallapack will try to load a replacement library (xerbla.dll or libxerbla.so or libxerbla.dylib) containing an alternative xerbla function.
This is a pre-requisite for Smallapack that you need to build before testing Smallapack.
An example of implementation for the function can be found in the sources (see xerbla), as well as example Xcode for compiling on Mac OSX.