Re: MATLISP using other LAPACK libraries

Raymond Toy <[email protected]> Tue, 01 Mar 2005 12:27:08 -0500
Newsgroups gmane.lisp.matlisp.devel
Message-ID <[email protected]>
[snip]

    Lynn>  The Intel Math Kernel Library contains the lapack and blas functions.
    Lynn>  The appropriate library is installed in
    Lynn>  /opt/intel/mkl72/lib/32/libmkl.so.
 
    Lynn>  Various attempts to modify load-blas-&-lapack-libraries result
    Lynn>  in various errors.  For example:
 
    Lynn>  (defun load-blas-&-lapack-libraries ()
    Lynn>    (ext::load-foreign "matlisp:lib;lazy-loader.o"
    Lynn>  		     :libraries `("-R/opt/intel/mkl72/lib/32"
    Lynn>  				  "-L/opt/intel/mkl72/lib/32"
    Lynn>  				  "-L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2"
    Lynn>  				  "-L/usr/lib"
    Lynn>  				  "-lmkl"
    Lynn>  				  "-lfrtbegin"
    Lynn>  				  "-lg2c"
    Lynn>  				  "-lm"
    Lynn>  				  "-lgcc_s")))
 
I think you've done everything right.  Is this the list of libraries
that configure generates and you've just replaced the standard
lapack/blas with the Intel math kernel library?

    Lynn>  I can sucessfully do:
 
    Lynn>  (ext::load-foreign "/m/opt/intel/mkl72/lib/32/libmkl.so")
 
    Lynn>  And sucessfully do
  
    Lynn>  (def-fortran-routine dgemm :void
    Lynn>    (transa :string :input)
    Lynn>    (transb :string :input)
    Lynn>    (m :integer )
    Lynn>    (n :integer )
    Lynn>    (k :integer )
    Lynn>    (alpha :double-float )
    Lynn>    (a (* :double-float) )
    Lynn>    (lda :integer )
    Lynn>    (b (* :double-float) )
    Lynn>    (ldb :integer )
    Lynn>    (beta :double-float )
    Lynn>    (c (* :double-float) :output)
    Lynn>    (ldc :integer )
    Lynn>  )
 
    Lynn>  But CMUCL crashes when I call dgemm.
 
This is not good.  Perhaps the calling conventions are different.

Ray
 




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click