[racket] performance problem in math/matrix

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Jan 22 17:13:38 EST 2013

2013/1/22 Berthold Bäuml <berthold.baeuml at dlr.de>:
> On 22.01.2013, at 06:19, Neil Toronto <neil.toronto at gmail.com> wrote:
>> On 01/21/2013 04:33 PM, Berthold Bäuml wrote:

>>>  For the latter it would be great if one could even change the used library to,
>>> e.g., redirect to a installation of the highly efficient MKL library from Intel.
>>> Looking forward to benchmark it against Numpy and Mathematica (which is
>>>  MKL based) again!

>> Is the MKL library binary-compatible with LAPACK?
>
> I did not try it myself yet, but the Intel documentation does say so:
> "If your application already relies on the BLAS or LAPACK functionality, simply
> re-link with Intel® MKL to get better performance on Intel and compatible
> architectures."

> http://software.intel.com/en-us/intel-mkl/

In that case you can try it yourself.
All you need to do, is to change the paths of BLAS and LAPACK in:

(define veclib-lib   ; CBLAS
  (ffi-lib "/System/Library/Frameworks/vecLib.framework/Versions/Current/vecLib"))

(define cblas-lib veclib-lib)

(define lapack-lib
  (ffi-lib
   (string-append
    "/System/Library/Frameworks/Accelerate.framework/"
    "Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK")))


--
Jens Axel Søgaard


Posted on the users mailing list.