Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
Important Update: Community Platform Migration​. Learn more​>

problem with dgetrf, LU-decomposion

shapovalov
Beginner
1,988 Views
I want to calculate LU-decomposition of square matrix. I call function dgetrf() but returned result is uncorrect.

double A[100,100]; int Size=100; int *ipiv = new int[100]; int info;
/*...*/
dgetrf(&Size,&Size,A,&Size,ipiv,&info);

I think, matrix A beforedgetrf()must be = P*L*U after dgetrf(), where P can be obtained from ipiv. Please,check my code.

0 Kudos
2 Replies
TimP
Honored Contributor III
1,988 Views
You don't give enough context to test whether your A looks like a Fortran double subscripted array; in general, it will not. You must refer to the reference source code for the interpretation of ipiv. As you don't give anything to check, there are several other points on which you could make mistakes.
0 Kudos
Gennady_F_Intel
Moderator
1,988 Views

Oleg, there are some Lapack examples where you can find how these routines calling the right way.
Please see: exampleslapacksource ...dgeconx.f, dgerfsx.f, dgetrfx.f, dgetrix.f, dgetrsx.f
--Gennady

0 Kudos
Reply