The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]

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/"
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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.