This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]