Interfacing GSL with LAPACK

Jeff Spirko spirko@lehigh.edu
Wed Apr 9 14:38:00 GMT 2003


On Tue, Apr 08, 2003 at 04:59:25PM +0100, Mark Hymers wrote:
> 	double work[size*size];
> 	dgetrf_(&size,&size,&matrix[0][0],&size,index,info);

You're declaring work as a 1-dimensional array, but referencing it
as a 2-dimensional array.  matrix[0] is ok as the first element, but
matrix[0][0] tries to use that first element as a pointer, hence the
segfault.

-- 
Jeff Spirko   spirko@lehigh.edu   spirko@yahoo.com   WD3V   |=>

The study of non-linear physics is like the study of non-elephant biology.

All theoretical chemistry is really physics;
and all theoretical chemists know it. -- Richard P. Feynman 



More information about the Gsl-discuss mailing list