Interfacing GSL with LAPACK

Lukas Dobrek dobrek@itp.uni-hannover.de
Wed Apr 9 07:08:00 GMT 2003


On Tue, Apr 08, 2003 at 04:59:25PM +0100, Mark Hymers wrote:
> Hi,
> 
> I'm currently working on some neural network software using GSL and need
> to do matrix inverses and eigenvalues.  I'm using ATLAS as my BLAS
> library for speed.
> 
> The code I'm writing is in C++ (just to provide a nice interface to the
> neural networks which it creates).
> 
> I have written the following code to wrap calls to invert a matrix:
> 	int *info = new int();
> 	int index[size];
> 	double work[size*size];

> The strange thing is, according to the ASM the SegFault seems to occur
> *before* the actual call to the routine.

Allocate it on heap not on stack. i.e.  using malloc or new.

Take Care
ld

-- 
"The United States, as the world knows, will never start a war. . . .
we shall also do our part to build a world of peace where the weak 
are safe and the strong are just."
									- John F. Kennedy
£ukasz Dobrek



More information about the Gsl-discuss mailing list