View Full Version : Anybody here use Lapack?
Stimpson J. Cat
21st June 2005, 01:17 PM
I have been trying to make some C++ class wrappers for various functions from the Lapack Fortran library, and I am having a problem. The sgeev() and dgeev() functions for computing eigenvalues and eigenvectors of a matrix seem to be giving incorrect results for matrices with both real and complex eigenvalues.
Anybody have any experience with Lapack?
Dr. Stupid
69dodge
21st June 2005, 05:41 PM
no experience with LAPACK. But Google found this:
http://www.netlib.org/lapack/lug/node135.html
Maybe that will help?
Also, I know that FORTRAN and C store two-dimensional arrays differently, so the routines you're calling might think of as columns what you think of as rows, and vice versa.
Stimpson J. Cat
22nd June 2005, 06:33 AM
Yeah, I checked all of those things. And the issue with C and Fortran handling 2 dimensional arrays differently isn't even an issue for me. I'm not actually using 2 dimensional arrays. Instead my Matrix class uses a 1 dimensional array which can then be indexed in either row-major or column-major format. One view simply gives the transpose of the other. And I already made sure I wasn't giving the function the transpose by mistake.
Based on some things I have found on the web, I am inclined to think that it is a bug in my Lapack library, due to it being compiled with compilor optimizations turned on. Unfortunately I don't have any way to compile the library myself.
Dr. Stupid
© 2001-2009, James Randi Educational Foundation. All Rights Reserved.
vBulletin® v3.7.5, Copyright ©2000-2010, Jelsoft Enterprises Ltd.