Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6709 Discussions

Ippm: LU Decomposition fails for regular matrix

jsmith74
Beginner
340 Views
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
0 Kudos
3 Replies
Vladimir_Dudnik
Employee
340 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,
Vladimir
0 Kudos
jsmith74
Beginner
340 Views

Hi Vladimir,

I followed your suggestion and tested my program with IPP 6.1. The problem does
not occur in this version and the results are identical to Matlab.

Thanks,
John
0 Kudos
Vladimir_Dudnik
Employee
340 Views

Great, thanks for letting us know! At least something we do better within a time:)

Regards,
Vladimir
0 Kudos
Reply