This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: Interfacing GSL with LAPACK
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)