Interfacing GSL with LAPACK

Mark Hymers mark.hymers@ncl.ac.uk
Fri Apr 11 13:05:00 GMT 2003


On Wed, 09, Apr, 2003 at 10:41:06AM -0400, Jeff Spirko spoke thus..
> 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.

Thanks.  There were so many mistakes in that code it's unbelievable :-)

Anyways, I've sorted it all now - thanks all for your help.

Mark

-- 
Mark Hymers, University of Newcastle Medical School
Intercalating Medical Student (BMedSci)



More information about the Gsl-discuss mailing list