Community
cancel
Showing results for
Did you mean:
Beginner
62 Views

## Ippm: LU Decomposition fails for regular matrix

Hi,

currently I have to solve numerous systems of linear equations. I'm using the LU decomposition and backward substitution algorithms provided by IPPM.
Sometimes my programm does not provide a solution. First I thought that the particular
systems are not solveable (e.g. involving a singular matrices), but by coincidence I recalculated some of these systems with Matlab, which calculated a solution as well as a valid LU decomposition.
My question is, what am I doing wrong? IMHO my routines should be right, because they create correct results in most cases. So maybe it is smth with ipp?

Here is an example where Ippm does not find the LU decomposition, but Matlab does.

```[cpp]void forumQuestion()
{
int const N = 3;

// source matrix
Ipp32f pMatrix[N*N] =
{
-0.965694,   -0.92694, -1,         // 1st row
0.259682, 0.00108966, 0.00105857, // 2nd row
0       ,   0.375207, 10          // 3rd row
};

int elementStride = sizeof(Ipp32f);
int rowStride = N * sizeof(Ipp32f);

Ipp32f pDecomposedMatrix[N*N];
int pivotIndices;

IppStatus status = ippmLUDecomp_m_32f((const Ipp32f*)pMatrix, rowStride, elementStride,
pivotIndices,
pDecomposedMatrix, rowStride, elementStride, N);

if(status != ippStsNoErr)
{
printf("LU decomposition failed! (error %d)n",status);
}
else
{
printf_m_Ipp32f("LUDecomp result:", pDecomposedMatrix, N, N, status);
}
}
[/cpp]```

The status is -195 (Matrix is singular), which is not true.

Thanks, John

BTW: I'm using Ipp 5.0
3 Replies
Employee
62 Views

Hello,

Could you please try the latest version which is IPP 6.1 update ? The version IPP 5.0 is several years old. Several issues in IPP were solved since that time.

Regards,
Beginner
62 Views