This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
LU_decomp segfault
- From: "Matthew J. Doller" <mdoller at wpi dot edu>
- To: gsl-discuss <gsl-discuss at sources dot redhat dot com>
- Date: 17 Jan 2002 14:28:50 -0500
- Subject: LU_decomp segfault
i realize that this list isn't a "How do i do this?" list, but i keep
getting segfaults when performing a gsl_linalg_LU_decomp, and i can't
figure out why.
can someone help me out if they have a sec?
the offending code looks like this:
...
int error;
gsl_matrix * return_matrix;
gsl_permutation * perm;
int * interchange;
return_matrix = gsl_matrix_alloc ( m->size1 , m->size2 );
gsl_matrix_set_zero ( return_matrix );
perm = gsl_permutation_alloc ( m->size1 );
gsl_permutation_init ( perm );
error = gsl_linalg_LU_decomp ( m , perm , interchange);
// ^^^^ segfault occurs here. following printf is never reached.
printf( "\nLU_decomp error=%d\n", error );
gsl_permutation_free ( perm );
...
m is a valid matrix (i've checked it multiple times)
thanks for any help anyone can offer
matt
--
Matthew J. Doller
mdoller@wpi.edu
http://www.wpi.edu/~mdoller