Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Error in blas/lapack when linking to external library using mex
Replies: 4   Last Post: May 22, 2013 4:43 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Vincent

Posts: 6
Registered: 8/12/11
Error in blas/lapack when linking to external library using mex
Posted: May 21, 2013 4:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi all,


I'm currently building a connection between an external library package and matlab using mex files. Previously, I assembled the matrices in matlab and subsequently exported/imported them using .mat files. Using a mex file linking to the library, I want to be able to directly call some functions to work on the matrices. The mex file is the working, unchanged C-file plus some changes to exchange inputs and outputs (a routine to transfer sparse matrices).

It compiles fine(both with the -lmwlapack -lmblas or with -llapack -lblas), but when running the mexfile, I get an error stating:
in "(BLAS) invert" at "src/blas/Algebra.cc:268"
Error: invalid argument (argument 4 LAPACK::getrf)

The interesting thing is that it runs just fine in the cpp-file, but it returns this error when running in the matlab environment.

Any suggestions on what might cause this error? Does matlab link to a proprietary blas/lapack library?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.