Visible to Intel only — GUID: GUID-9FF0E16D-9CD1-44BB-9A51-B1A4A0349600
Visible to Intel only — GUID: GUID-9FF0E16D-9CD1-44BB-9A51-B1A4A0349600
p?getri
Computes the inverse of a LU-factored distributed matrix.
void psgetri (MKL_INT *n , float *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , MKL_INT *ipiv , float *work , MKL_INT *lwork , MKL_INT *iwork , MKL_INT *liwork , MKL_INT *info );
void pdgetri (MKL_INT *n , double *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , MKL_INT *ipiv , double *work , MKL_INT *lwork , MKL_INT *iwork , MKL_INT *liwork , MKL_INT *info );
void pcgetri (MKL_INT *n , MKL_Complex8 *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , MKL_INT *ipiv , MKL_Complex8 *work , MKL_INT *lwork , MKL_INT *iwork , MKL_INT *liwork , MKL_INT *info );
void pzgetri (MKL_INT *n , MKL_Complex16 *a , MKL_INT *ia , MKL_INT *ja , MKL_INT *desca , MKL_INT *ipiv , MKL_Complex16 *work , MKL_INT *lwork , MKL_INT *iwork , MKL_INT *liwork , MKL_INT *info );
- mkl_scalapack.h
The p?getrifunction computes the inverse of a general distributed matrix sub(A) = A(ia:ia+n-1, ja:ja+n-1) using the LU factorization computed by p?getrf. This method inverts U and then computes the inverse of sub(A) by solving the system
inv(sub(A))*L = inv(U)
for inv(sub(A)).
- n
-
(global) The number of rows and columns to be operated on, that is, the order of the distributed matrix sub(A) (n≥0).
- a
-
(local)
Pointer into the local memory to an array of local size lld_a*LOCc(ja+n-1).
On entry, the array a contains the local pieces of the L and U obtained by the factorization sub(A) = P*L*U computed by p?getrf.
- ia, ja
-
(global) The row and column indices in the global matrix A indicating the first row and the first column of the matrix sub(A), respectively.
- desca
-
(global and local) array of size dlen_. The array descriptor for the distributed matrix A.
- work
-
(local)
The array work of size lwork is a workspace array.
- lwork
-
(local) The size of the array work. lwork must be at least
lwork≥LOCr(n+mod(ia-1,mb_a))*nb_a.
NOTE:mod(x,y) is the integer remainder of x/y.
The array work is used to keep at most an entire column block of sub(A).
- iwork
-
(local) Workspace array used for physically transposing the pivots, size liwork.
- liwork
-
(local or global) The size of the array iwork.
The minimal value liwork of is determined by the following code:
if NPROW == NPCOL then
liwork = LOCc(n_a + mod(ja-1,nb_a))+ nb_a
else
liwork = LOCc(n_a + mod(ja-1,nb_a)) +
max(ceil(ceil(LOCr(m_a)/mb_a)/(lcm/NPROW)),nb_a)
end if
where lcm is the least common multiple of process rows and columns (NPROW and NPCOL).
- ipiv
-
(local)
Array of size LOCr(m_a)+ mb_a.
This array contains the pivoting information.
If ipiv[i]=j, then the local row i+1 was swapped with the global row jwhere i=0, ... , LOCr(m_a) + mb_a- 1.
This array is tied to the distributed matrix A.
- work[0]
-
On exit, work[0] contains the minimum value of lwork required for optimum performance.
- iwork[0]
-
On exit, iwork[0] contains the minimum value of liwork required for optimum performance.
- info
-
(global) If info=0, the execution is successful.
info < 0:
If the i-th argument is an array and the j-th entry, indexed j - 1, had an illegal value, then info = -(i*100+j); if the i-th argument is a scalar and had an illegal value, then info = -i.
info> 0:
If info = i, the matrix element U(i,i) is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.