Contents

# p?getri

Computes the inverse of a
LU
-factored distributed matrix.

## Syntax

Include Files
• mkl_scalapack.h
Description
The
p?getri
function
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
)).
Input Parameters
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
.
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
).
Output Parameters
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
j
where
i
=0, ... ,
LOCr
(
m_a
) +
mb_a
- 1
.
This array is tied to the distributed matrix
A
.
work

On exit,
work

contains the minimum value of
lwork
required for optimum performance.
iwork

On exit,
iwork

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,
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.

#### Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804