Wolfram Library Archive

Courseware Demos MathSource Technical Notes
All Collections Articles Books Conference Proceedings
Title Downloads

MathLink + Netlib = MathLib

Oliver Rübenkönig
Organization: Wolfram Research, inc.
Department: Kernel Technology
E. B. Rudnyi
Organization: Albert Ludwig University
Department: IMTEK–Institute for Microsystem Technology
J. G. Korvink
Organization: University of Freiburg
Department: Department of Microsystems Engineering Lab of Simulation

2003 Mathematica Developer Conference

Mathematica is an advanced environment perfectly suited to rapid prototyping in scientific computing. One can easily combine symbolic and numerical computations and, in the latter case, check the influence of rounding errors merely by increasing precision to arbitrary levels. The range of available linear algebra functions is large and convenient, so that a developer can focus on the problem at hand, for example, the development of sophisticated discretization schemes for partial differential equations.

However, when one extends the developed prototype application to large numerical computations, important for practice, Mathematica happens to be restrictively slow. A danger exists in that the development effort is lost, since translation of a Mathematica package to a compiled language cannot, in general, be automated, so that one may have to start from scratch. Also from this point of view it is most desirable to remain within the Mathematica environment.

Consider a simple example based on an algorithm found at the heart of many scientific computational engines. Mathematica's LUDecomposition function, which is a basic linear algebra block, is much more flexible but unfortunately much slower than for example the analogous functions available in Lapack [2]. The reason is straightforward and will be explained below.

In the present work, we discuss how we use MathLink to directly call precompiled Netlib [1] numerical libraries in order to combine Mathematica's flexibility and the efficiency of mature numerical algorithms. We package the libraries in notebooks that render their use completely transparent to the typical user. Two cases described below are considered in this paper.

*Mathematics > Algebra > Linear Algebra
*Wolfram Technology > Linking Technology > MathLink

MathLink, Netlib, MathLib, Lapack, Quadpack, BLAS

Downloads Download Wolfram CDF Player

MathDevConf2003_Slides.nb (1.5 MB) - Mathematica Notebook
MathLib.tgz (600.1 KB) - TAR/GZIP archive