My matrix is symmetric and real-definite positive.
Now, when i use the method sgetrf_ and then sgetri_ then i am able to get the inverse of the matrix. As this method is for general matrices.
But since i already have the symmetric and real-definite positive matrix so i wanted to use the special function so that i can have performance boost ( since my matrix is so size 3500 * 3500).
So for this i am trying to use function spotrf_ and spotri_. But i am getting error in the first function i.e. spotrf_
My test code goes like this:-
- Code: Select all
char UPLO='L';
integer n=4;
integer LDA=4;
integer info;
int result=-1;
int v=0;
real *A=(real*)malloc(sizeof(real)*16);
A[0]=4.16; A[1]=-3.12; A[2]=0.56; A[3]=-0.10;
A[4]=-3.12; A[5]=5.03; A[6]=-0.83; A[7]=1.18;
A[8]=0.56; A[9]=-0.83; A[10]=0.76; A[11]=0.34;
A[12]=-0.10; A[13]=1.18; A[14]=0.34; A[15]=1.18;
[b]result=spotrf_(UPLO,&n,A,&LDA,&info);[/b]
It compiles, but when i execute it, it gives me following error:-
Unhandled exception at 0x0108464a in CLAPACK-EXAMPLE.exe: 0xC0000005: Access violation reading location 0x0000004c.
Help me find the error.
Thank You
miztaken

