LAPACK Archives

[Lapack] a error when using ZGBSV

Dear Sir or Madam,

      I met a strange error when solving a linear equation of
banded matrix by ZGBSV. It is important for me to use it and
if you can help me to find it out, it will be so nice.

the full banded matrix is
1.0, 0.0
2.0 1.0

and stored as
0.0, 0.0
1.0, 1.0
2.0, 0.0

B matrix is
1.0, 0.0
0.0 1.0

My code:
int test_sparse()
{ int i,kl=1, ku=0, n=2, ldab=3, ldb=2, nrhs=2,m=2,*ipiv,*info=0;
ipiv = (int*)malloc(sizeof(int)*2);
  double_complex AB[3][2] = {{0,0},{1.0,1.0},{2.0, 0}};
double_complex B[2][2] = {{1.0, 0.0},{0.0,1.0}};
  zgbsv_(&n, &kl,&ku, &nrhs, AB, &ldab, ipiv, B, &ldb, info);
  return *info;

my running results: get a segment fault, if I try some other matrices,
maybe no segment error but wrong result.


<Prev in Thread] Current Thread [Next in Thread>
  • [Lapack] a error when using ZGBSV, jingzhe at <=

For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or