Contents

# p?getrs

Solves a system of distributed linear equations with a general square matrix, using the
LU
factorization computed by
p?getrf
.

## Syntax

Include Files
• mkl_scalapack.h
Description
The
p?getrs
function
solves a system of distributed linear equations with a general
n
-by-
n
distributed matrix sub(
A
) =
A
(
ia
:
ia
+
n
-1,
ja
:
ja
+
n
-1) using the
LU
factorization computed by
p?getrf
.
The system has one of the following forms specified by
trans
:
sub(
A
)*
X
= sub(
B
) (no transpose),
sub(
A
)
T
*
X
= sub(
B
) (transpose),
sub(
A
)
H
*
X
= sub(
B
) (conjugate transpose),
where sub(
B
) =
B
(
ib
:
ib
+
n
-1,
jb
:
jb
+
nrhs
-1).
Before calling this
function
,you must call
p?getrf
to compute the
LU
factorization of sub(
A
).
Input Parameters
trans
(global) Must be
'N'
or
'T'
or
'C'
.
Indicates the form of the equations:
If
trans
=
'N'
, then sub(
A
)*
X
= sub(
B
) is solved for
X
.
If
trans
=
'T'
, then sub(
A
)
T
*
X
= sub(
B
) is solved for
X
.
If
trans
=
'C'
, then sub(
A
)
H
*
X
= sub(
B
) is solved for
X
.
n
(global) The number of linear equations; the order of the matrix sub(
A
) (
n
0).
nrhs
(global) The number of right hand sides; the number of columns of the distributed matrix sub(
B
) (
nrhs
0).
a
,
b
(local)
Pointers into the local memory to arrays of local sizes
lld_a
*
LOCc
(
ja
+
n
-1)
and
lld_b
*
LOCc
(
jb
+
nrhs
-1)
, respectively.
On entry, the array
a
contains the local pieces of the factors
L
and
U
from the factorization sub(
A
) =
P*L*U
; the unit diagonal elements of
L
are not stored. On entry, the array
b
contains the right hand sides sub(
B
).
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
.
ipiv
(local) Array of size of
LOCr
(
m_a
) +
mb_a
. Contains the pivoting information: local row
i
of the matrix was interchanged with the global row
ipiv
[
i
-1]
.
This array is tied to the distributed matrix
A
.
ib
,
jb
(global) The row and column indices in the global matrix
B
indicating the first row and the first column of the matrix sub(
B
), respectively.
descb
(global and local) array of size
dlen_
. The array descriptor for the distributed matrix
B
.
Output Parameters
b
On exit, overwritten by the solution distributed matrix
X
.
info
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
.

#### Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.