This subroutine solves the following system of equations for multiple right-hand sides:
where, in the formula above:
This subroutine uses the results of the factorization of matrix A, produced by a preceding call to PDPBTRF. The output from PDPBTRF should be used only as input to this solve subroutine.
If n = 0 or nrhs = 0, no computation is
performed and the subroutine returns after doing some parameter
checking. See references [2], [23], [39],
and [40].
A, B, af, work | Subroutine |
Long-precision real | PDPBTRS |
Fortran | CALL PDPBTRS (uplo, n, k, nrhs, a, ja, desc_a, b, ib, desc_b, af, laf, work, lwork, info) |
C and C++ | pdpbtrs (uplo, n, k, nrhs, a, ja, desc_a, b, ib, desc_b, af, laf, work, lwork, info); |
If uplo = 'U', the upper triangular part is referenced.
If uplo = 'L', the lower triangular part is referenced.
Scope: global
Specified as: a single character; uplo = 'U' or 'L'.
Scope: global
Specified as: a fullword integer; 0 <= n <= (NB_A)p-mod(ja-1,NB_A).
Scope: global
Specified as: a fullword integer, where:
These limits for k are extensions of the ScaLAPACK standard.
Scope: global
Specified as: a fullword integer; nrhs >= 0.
Scope: local
Specified as: an LLD_A by (at least) LOCp(ja+n-1) array, containing numbers of the data type indicated in Table 70. Details about the block-cyclic data distribution of global matrix A are stored in desc_a.
On output, array A is overwritten; that is, original input is not preserved.
Scope: global
Specified as: a fullword integer; 1 <= ja <= N_A and ja+n-1 <= N_A.
desc_a | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_A | Descriptor Type | DTYPE_A = 501 for 1 × p or
p × 1
where p is the number of processes in a process grid. | Global |
2 | CTXT_A | BLACS context | Valid value, as returned by BLACS_GRIDINIT or BLACS_GRIDMAP | Global |
3 | N_A | Number of columns in the global matrix |
If n = 0: N_A >= 0 Otherwise: N_A >= 1 | Global |
4 | NB_A | Column block size | NB_A >= 1 and 0 <= n <= (NB_A)p-mod(ja-1,NB_A) | Global |
5 | CSRC_A | The process column over which the first column of the global matrix is distributed | 0 <= CSRC_A < p | Global |
6 | LLD_A | Leading dimension | LLD_A >= k+1 | Local |
7 | -- | Reserved | -- | -- |
Specified as: an array of (at least) length 7, containing fullword
integers.
desc_a | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_A | Descriptor type | DTYPE_A = 1 for 1 × p
where p is the number of processes in a process grid. | Global |
2 | CTXT_A | BLACS context | Valid value, as returned by BLACS_GRIDINIT or BLACS_GRIDMAP | Global |
3 | M_A | Number of rows in the global matrix | M_A > k | Global |
4 | N_A | Number of columns in the global matrix |
If n = 0: N_A >= 0 Otherwise: N_A >= 1 | Global |
5 | MB_A | Row block size | MB_A >= 1 | Global |
6 | NB_A | Column block size | NB_A >= 1 and 0 <= n <= (NB_A)p-mod(ja-1,NB_A) | Global |
7 | RSRC_A | The process row over which the first row of the global matrix is distributed | RSRC_A=0 | Global |
8 | CSRC_A | The process column over which the first column of the global matrix is distributed | 0 <= CSRC_A < p | Global |
9 | LLD_A | The leading dimension of the local array | LLD_A >= k+1 | Local |
Specified as: an array of (at least) length 9, containing fullword integers.
Scope: local
Specified as: an LLD_B by (at least) nrhs array, containing numbers of the data type indicated in Table 70. Details about the block-cyclic data distribution of global matrix B are stored in desc_b.
Scope: global
Specified as: a fullword integer; 1 <= ib <= M_B.
desc_b | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_B | Descriptor type | DTYPE_B = 502 for p × 1 or
1 × p
where p is the number of processes in a process grid. | Global |
2 | CTXT_B | BLACS context | Valid value, as returned by BLACS_GRIDINIT or BLACS_GRIDMAP | Global |
3 | M_B | Number of rows in the global matrix |
If n = 0: M_B >= 0 Otherwise: M_B >= 1 | Global |
4 | MB_B | Row block size | MB_B >= 1 and 0 <= n <= (MB_B)p-mod(ib-1,MB_B) | Global |
5 | RSRC_B | The process row over which the first row of the global matrix is distributed | 0 <= RSRC_B < p | Global |
6 | LLD_B | Leading dimension | LLD_B >= max(1, LOCp(M_B)) | Local |
7 | -- | Reserved | -- | -- |
Specified as: an array of (at least) length 7, containing fullword
integers.
desc_b | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_B | Descriptor type | DTYPE_B = 1 for p × 1
where p is the number of processes in a process grid. | Global |
2 | CTXT_B | BLACS context | Valid value, as returned by BLACS_GRIDINIT or BLACS_GRIDMAP | Global |
3 | M_B | Number of rows in the global matrix |
If n = 0: M_B >= 0 Otherwise: M_B >= 1 | Global |
4 | N_B | Number of columns in the global matrix | N_B >= nrhs | Global |
5 | MB_B | Row block size | MB_B >= 1 and 0 <= n <= (MB_B)p-mod(ib-1,MB_B) | Global |
6 | NB_B | Column block size | NB_B >= 1 | Global |
7 | RSRC_B | The process row over which the first row of the global matrix is distributed | 0 <= RSRC_B < p | Global |
8 | CSRC_B | The process column over which the first column of the global matrix is distributed | CSRC_B=0 | Global |
9 | LLD_B | Leading dimension | LLD_B >= max(1, LOCp(M_B)) | Local |
Specified as: an array of (at least) length 9, containing fullword integers.
Scope: local
Specified as: for migration purposes, you should specify a one-dimensional, long-precision array of (at least) length laf.
The laf argument must be specified; however, this subroutine currently ignores its value. For migration purposes, you should specify laf using the formula below.
Scope: local
Specified as: a fullword integer, laf >= (NB_A+2k)(k).
If lwork = 0, work is ignored.
If lwork <> 0, work is the work area used by this subroutine, where:
Scope: local
Specified as: an area of storage containing numbers of data type indicated in Table 70.
Scope:
Specified as: a fullword integer; where:
lwork >= (nrhs)(k)
Scope: local
Returned as: an LLD_B by (at least) nrhs array, containing numbers of the data type indicated in Table 70.
If lwork <> 0 or lwork <> -1, the size of work is (at least) of length lwork.
If lwork = -1, the size of work is (at least) of length 1.
Scope: local
Returned as: an area of storage, containing numbers of the data type indicated in Table 70, where:
Except for work1, the contents of work are overwritten on return.
Scope: global
Returned as: a fullword integer; info = 0.
where p is the number of processes). For details, see references [2], [39], and [40]. Also, it is suggested that you specify uplo = 'L'.
The input arguments uplo, n, and k must be the same for both PDPBTRF and PDPBTRS.
The global matrix A and af input to PDPBTRS must be the same as the corresponding output arguments for PDPBTRF; and thus, the scalar data specified for ja, desc_a, and laf must also be the same.
DTYPE_A | DTYPE_B | Process Grid |
---|---|---|
501 | 502 | p × 1 or 1 × p |
501 | 1 | 1 × p |
1 | 502 | p × 1 |
1 | 1 | 1 × 1 |
Matrix A must be distributed over a one-dimensional process grid, using block-cyclic data distribution. For more information on using block-cyclic data distribution, see Specifying Block-Cyclically-Distributed Matrices for the Banded Linear Algebraic Equations.
None
lwork = 0 and unable to allocate workspace
Stage 5: If n > 0:
Each of the following global input arguments are checked to determine whether its value differs from the value specified on process P00:
Also:
This example solves the AX=B system, where matrix A is the same positive definite symmetric band matrix factored in Example for PDPBTRF.
Notes:
The input values for desc_a are the same values shown in Example.
ORDER = 'R' NPROW = 1 NPCOL = 3 CALL BLACS_GET (0, 0, ICONTXT) CALL BLACS_GRIDINIT(ICONTXT, ORDER, NPROW, NPCOL) CALL BLACS_GRIDINFO(ICONTXT, NPROW, NPCOL, MYROW, MYCOL) UPLO N K NRHS A JA DESC_A B IB DESC_B AF LAF | | | | | | | | | | | | CALL PDPBTRS( 'L' , 9 , 7 , 3 , A , 1 , DESC_A , B , 1 , DESC_B , AF , 119 , WORK LWORK INFO | | | WORK , 0 , INFO )
| Desc_B |
---|---|
DTYPE_ | 502 |
CTXT_ | icontxt(CGBTO10) |
M_ | 9 |
MB_ | 3 |
RSRC_ | 0 |
LLD_B | 3 |
Reserved | -- |
Notes: |
Global matrix A stored in lower-band-packed storage mode with block size of 3:
B,D 0 1 2 * * | 1.0 1.0 1.0 | 1.0 1.0 1.0 | 1.0 1.0 1.0 | | 1.0 1.0 1.0 | 1.0 1.0 1.0 | 1.0 1.0 . | | 1.0 1.0 1.0 | 1.0 1.0 1.0 | 1.0 . . | | 1.0 1.0 1.0 | 1.0 1.0 1.0 | . . . | 0 | 1.0 1.0 1.0 | 1.0 1.0 . | . . . | | 1.0 1.0 1.0 | 1.0 . . | . . . | | 1.0 1.0 1.0 | . . . | . . . | | 1.0 1.0 . | . . . | . . . | * *
The following is the 1 × 3 process grid:
B,D | 0 | 1 | 2 -----| ------- | ------- |------- 0 | P00 | P01 | P02
Local array A with block size of 3:
p,q | 0 | 1 | 2 -----|-----------------|------------------|----------------- | 1.0 1.0 1.0 | 1.0 1.0 1.0 | 1.0 1.0 1.0 | 1.0 1.0 1.0 | 1.0 1.0 1.0 | 1.0 1.0 . | 1.0 1.0 1.0 | 1.0 1.0 1.0 | 1.0 . . | 1.0 1.0 1.0 | 1.0 1.0 1.0 | . . . 0 | 1.0 1.0 1.0 | 1.0 1.0 . | . . . | 1.0 1.0 1.0 | 1.0 . . | . . . | 1.0 1.0 1.0 | . . . | . . . | 1.0 1.0 . | . . . | . . .
Global matrix B with block size of 3:
B,D 0 * * | 8.0 36.0 44.0 | 0 | 16.0 80.0 80.0 | | 23.0 122.0 108.0 | | ----------------- | | 29.0 161.0 129.0 | 1 | 34.0 196.0 144.0 | | 38.0 226.0 154.0 | | ----------------- | | 41.0 250.0 160.0 | 2 | 43.0 267.0 163.0 | | 36.0 240.0 120.0 | * *
The following is the 1 × 3 process grid:
B,D | 0 | 1 | 2 -----| ------- | ------- |------- 0 | P00 | P01 | P02
Local array B with block size of 3:
p,q | 0 | 1 | 2 -----|--------------------|---------------------|-------------------- | 8.0 36.0 44.0 | 29.0 161.0 129.0 | 41.0 250.0 160.0 0 | 16.0 80.0 80.0 | 34.0 196.0 144.0 | 43.0 267.0 163.0 | 23.0 122.0 108.0 | 38.0 226.0 154.0 | 36.0 240.0 120.0
Output:
Global matrix B with block size of 3:
B,D 0 * * | 1.0 1.0 9.0 | 0 | 1.0 2.0 8.0 | | 1.0 3.0 7.0 | | -------------- | | 1.0 4.0 6.0 | 1 | 1.0 5.0 5.0 | | 1.0 6.0 4.0 | | -------------- | | 1.0 7.0 3.0 | 2 | 1.0 8.0 2.0 | | 1.0 9.0 1.0 | * *
The following is the 1 × 3 process grid:
B,D | 0 | 1 | 2 -----| ------- | ------- |------- 0 | P00 | P01 | P02
Local array B with block size of 3:
p,q | 0 | 1 | 2 -----|-----------------|------------------|----------------- | 1.0 1.0 9.0 | 1.0 4.0 6.0 | 1.0 7.0 3.0 0 | 1.0 2.0 8.0 | 1.0 5.0 5.0 | 1.0 8.0 2.0 | 1.0 3.0 7.0 | 1.0 6.0 4.0 | 1.0 9.0 1.0
The value of info is 0 on all processes.