PDGTTRS solves the tridiagonal systems of linear equations, using Gaussian elimination with partial pivoting for the general tridiagonal matrix A stored in tridiagonal storage mode.
PDDTTRS solves one of the following tridiagonal systems of linear equations, using Gaussian elimination for the diagonally dominant general tridiagonal matrix A stored in tridiagonal storage mode.
In these subroutines:
These subroutines use the results of the factorization of matrix A, produced by a preceding call to PDGTTRF or PDDTTRF, respectively. The output from the factorization subroutines, PDGTTRF and PDDTTRF, should be used only as input to these solve subroutines, respectively.
If n = 0 or nrhs = 0, no computation is
performed and the subroutine returns after doing some parameter
checking. See reference [51].
dl, d, du, du2, B, af, work | ipiv | Subroutine |
Long-precision real | Integer | PDGTTRS and PDDTTRS |
Fortran | CALL PDGTTRS (transa, n, nrhs, dl,
d, du, du2, ia, desc_a,
ipiv, b, ib, desc_b, af,
laf, work, lwork, info)
CALL PDDTTRS (transa, n, nrhs, dl, d, du, ia, desc_a, b, ib, desc_b, af, laf, work, lwork, info) |
C and C++ | pdgttrs (transa, n, nrhs, dl,
d, du, du2, ia, desc_a,
ipiv, b, ib, desc_b, af,
laf, work, lwork, info);
pddttrs (transa, n, nrhs, dl, d, du, ia, desc_a, b, ib, desc_b, af, laf, work, lwork, info); |
Scope: global
Specified as: a single character, where:
Scope: global
Specified as: a fullword integer, where:
where p is the number of processes in a process grid.
Scope: global
Specified as: a fullword integer; nrhs >= 0.
Scope: local
Specified as: a one-dimensional array of (at least) length LOCp(ia+n-1), containing numbers of the data type indicated in Table 81. Details about block-cyclic data distribution of global matrix A are stored in desc_a.
Scope: local
Specified as: a one-dimensional array of (at least) length LOCp(ia+n-1), containing numbers of the data type indicated in Table 81. Details about block-cyclic data distribution of global matrix A are stored in desc_a.
Scope: local
Specified as: a one-dimensional array of (at least) length LOCp(ia+n-1), containing numbers of the data type indicated in Table 81. Details about block-cyclic data distribution of global matrix A are stored in desc_a.
Scope: local
Specified as: a one-dimensional array of (at least) length LOCp(ia+n-1), containing numbers of the data type indicated in Table 81. Details about block-cyclic data distribution of global matrix A are stored in desc_a.
Scope: global
Specified as: a fullword integer, where:
Table 82. Type-502 Array Descriptor
desc_a | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_A | Descriptor Type | DTYPE_A=502 for p × 1 or
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 |
If n = 0: M_A >= 0 Otherwise: M_A >= 1 | Global |
4 | MB_A | Row block size | MB_A >= 1 and 0 <= n <= (MB_A)(p)-mod(ia-1,MB_A) | Global |
5 | RSRC_A | The process row over which the first row of the global matrix is distributed | 0 <= RSRC_A < p | Global |
6 | -- | Not used by these subroutines. | -- | -- |
7 | -- | Reserved | -- | -- |
Specified as: an array of (at least) length 7, containing fullword
integers.
Table 83. Type-1 Array Descriptor (p × 1 Process Grid)
desc_a | Name | Description | Limits | Scope |
---|---|---|---|---|
1 | DTYPE_A | Descriptor Type | DTYPE_A = 1 for 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 | M_A | Number of rows in the global matrix |
If n = 0: M_A >= 0 Otherwise: M_A >= 1 | Global |
4 | N_A | Number of columns in the global matrix | N_A = 1 |
|
5 | MB_A | Row block size | MB_A >= 1 and 0 <= n <= (MB_A)(p)-mod(ia-1,MB_A) | Global |
6 | NB_A | Column block size | NB_A >= 1 | Global |
7 | RSRC_A | The process row over which the first row of the global matrix is distributed | 0 <= RSRC_A < p | Global |
8 | CSRC_A | The process column over which the first column of the global matrix is distributed | CSRC_A = 0 | Global |
9 | -- | Not used by these subroutines. | -- | -- |
Specified as: an array of (at least) length 9, containing fullword
integers.
Table 84. Type-501 Array Descriptor
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(ia-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 | -- | Not used by these subroutines. | -- | -- |
7 | -- | Reserved | -- | -- |
Specified as: an array of (at least) length 7, containing fullword
integers.
Table 85. Type-1 Array Descriptor (1 × p Process Grid)
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 = 1 | 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(ia-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 | -- | Not used by these subroutines. | -- | -- |
Specified as: an array of (at least) length 9, containing fullword integers.
Scope: local
Specified as: an array of (at least) LOCp(ia+n-1), containing fullword integers. There is no array descriptor for ipiv. The details about the block-cyclic data distribution of global matrix A are stored in desc_a.
Scope: local
Specified as: an LLD_B by (at least) nrhs array, containing numbers of the data type indicated in Table 81. 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 and ib+n-1 <= 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: a one-dimensional array of (at least) length laf, containing numbers of the data type indicated in Table 81.
Scope: local
Specified as: a fullword integer, where:
If (the process grid is p × 1 and DTYPE_A = 1) or DTYPE_A = 502:
where, in the above formulas, P is the actual number of processes containing data.
If (the process grid is 1 × p and DTYPE_A = 1) or DTYPE_A = 501, you would substitute NB_A in place of MB_A in the formulas above.
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 81.
Scope:
Specified as: a fullword integer; where:
where, in the above formulas, P is the actual number of processes containing data.
Scope: local
Returned as: an LLD_B by (at least) nrhs array, containing numbers of the data type indicated in Table 81.
If lwork <> 0 and 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 data type indicated in Table 81, where:
Except for work1, the contents of work are overwritten on return.
Scope: global
Returned as: a fullword integer; info = 0.
The factored matrix A is stored in an internal format that depends on the number of processes.
The format of the output from PDDTTRF has changed. Therefore, the factorization and solve must be performed using Parallel ESSL Version 2 Release 1.2, or later.
The scalar data specified for input argument n must be the same for both PDGTTRF/PDDTTRF and PDGTTRS/PDDTTRS.
The global vectors for dl, d, du, du2, ipiv, and af input to PDGTTRS/PDDTTRS must be the same as the corresponding output arguments for PDGTTRF/PDDTTRF; and thus, the scalar data specified for ia, desc_a, and laf must also be the same.
DTYPE_A | DTYPE_B | Process Grid |
---|---|---|
501 | 502 | p × 1 or 1 × p |
502 | 502 | p × 1 or 1 × p |
501 | 1 | p × 1 |
502 | 1 | p × 1 |
1 | 502 | p × 1 or 1 × p |
1 | 1 | p × 1 |
For more information on using block-cyclic data distribution, see Specifying Block-Cyclically-Distributed Matrices for the Banded Linear Algebraic Equations.
None
Unable to allocate workspace
If (the process grid is 1 × p and DTYPE_A = 1) or DTYPE_A = 501:
If the process grid is 1 × p and DTYPE_A = 1:
If (the process grid is p × 1 and DTYPE_A = 1) or DTYPE_A = 502:
If the process grid is p × 1 and DTYPE_A = 1:
In all cases:
If DTYPE_B = 1:
In all cases:
Each of the following global input arguments are checked to determine whether its value is the same on all processes in the process grid:
If DTYPE_A = 1 on all processes:
If DTYPE_A = 501 on all processes:
If DTYPE_A = 502 on all processes:
In all cases:
If DTYPE_B = 1 on all processes:
If DTYPE_B = 502 on all processes:
Also:
This example shows how to solve the system AX=B, where matrix A is the same general tridiagonal matrix factored in Example 1 for PDGTTRF.
Notes:
ORDER = 'R' NPROW = 3 NPCOL = 1 CALL BLACS_GET (0, 0, ICONTXT) CALL BLACS_GRIDINIT(ICONTXT, ORDER, NPROW, NPCOL) CALL BLACS_GRIDINFO(ICONTXT, NPROW, NPCOL, MYROW, MYCOL) TRANSA N NRHS DL D DU DU2 IA DESC_A IPIV B IB | | | | | | | | | | | | CALL PDGTTRS( N , 12 , 3 , DL , D , DU , DU2 , 1 , DESC_A , IPIV , B , 1 , DESC_B AF LAF WORK LWORK INFO | | | | | | DESC_B , AF , 48 , WORK , 0 , INFO )
| Desc_A |
---|---|
DTYPE_ | 502 |
CTXT_ | icontxt(CGBTOO2) |
M_ | 12 |
MB_ | 4 |
RSRC_ | 0 |
Not used | -- |
Reserved | -- |
Notes: |
| Desc_B |
---|---|
DTYPE_ | 502 |
CTXT_ | icontxt(CGBTOO3) |
M_ | 12 |
MB_ | 4 |
RSRC_ | 0 |
LLD_B | 4 |
Reserved | -- |
Notes: |
Global vector dl with block size of 4:
B,D 0 * * | . | | 0.5 | 0 | 0.5 | | 0.5 | | ---- | | 1.0 | | 0.33 | 1 | 0.43 | | 0.47 | | ---- | | 1.0 | | 1.0 | 2 | 1.0 | | 1.0 | * *
Global vector d with block size of 4:
B,D 0 * * | 0.5 | | 0.5 | 0 | 0.5 | | 2.0 | | ---- | | 0.33 | | 0.43 | 1 | 0.47 | | 2.07 | | ---- | | 2.07 | | 0.47 | 2 | 0.43 | | 0.33 | * *
Global vector du with block size of 4:
B,D 0 * * | 2.0 | | 2.0 | 0 | 2.0 | | 2.0 | | ---- | | 2.0 | | 2.0 | 1 | 2.0 | | 2.0 | | ---- | | 0.93 | | 0.86 | 2 | 0.67 | | . | * *
Global vector ipiv with block size of 4:
B,D 0 * * | 0 | | 0 | 0 | 0 | | 0 | | - | | 0 | | 0 | 1 | 0 | | 0 | | - | | 0 | | 0 | 2 | 0 | | 0 | * *
The following is the 3 × 1 process grid:
B,D | 0 -----| ------- 0 | P00 -----| ------- 1 | P10 -----| ------- 2 | P20
Local array DL with block size of 4:
p,q | 0 -----|------ | . | 0.5 0 | 0.5 | 0.5 -----|------ | 1.0 | 0.33 1 | 0.43 | 0.47 -----|------ | 1.0 | 1.0 2 | 1.0 | 1.0
Local array D with block size of 4:
p,q | 0 -----|------ | 0.5 | 0.5 0 | 0.5 | 2.0 -----|------ | 0.33 | 0.43 1 | 0.47 | 2.07 -----|------ | 2.07 | 0.47 2 | 0.43 | 0.33
Local array DU with block size of 4:
p,q | 0 -----|------ | 2.0 | 2.0 0 | 2.0 | 2.0 -----|------ | 2.0 | 2.0 1 | 2.0 | 2.0 -----|------ | 0.93 | 0.86 2 | 0.67 | .
Local array IPIV with block size of 4:
p,q | 0 -----|--- | 0 | 0 0 | 0 | 0 -----|--- | 0 | 0 1 | 0 | 0 -----|--- | 0 | 0 2 | 0 | 0
Global matrix B with block size of 4:
B,D 0 * * | 46.0 6.0 4.0 | | 65.0 13.0 6.0 | 0 | 59.0 19.0 6.0 | | 53.0 25.0 6.0 | | -------------- | | 47.0 31.0 6.0 | | 41.0 37.0 6.0 | 1 | 35.0 43.0 6.0 | | 29.0 49.0 6.0 | | -------------- | | 23.0 55.0 6.0 | | 17.0 61.0 6.0 | 2 | 11.0 67.0 6.0 | | 5.0 47.0 4.0 | * *
The following is the 3 × 1 process grid:
B,D | 0 -----| ------- 0 | P00 -----| ------- 1 | P10 -----| ------- 2 | P20
Local matrix B with block size of 4:
p,q | 0 -----|---------------- | 46.0 6.0 4.0 | 65.0 13.0 6.0 0 | 59.0 19.0 6.0 | 53.0 25.0 6.0 -----|---------------- | 47.0 31.0 6.0 | 41.0 37.0 6.0 1 | 35.0 43.0 6.0 | 29.0 49.0 6.0 -----|---------------- | 23.0 55.0 6.0 | 17.0 61.0 6.0 2 | 11.0 67.0 6.0 | 5.0 47.0 4.0
Output:
Global matrix B with block size of 4:
B,D 0 * * | 12.0 1.0 1.0 | | 11.0 2.0 1.0 | 0 | 10.0 3.0 1.0 | | 9.0 4.0 1.0 | | --------------- | | 8.0 5.0 1.0 | | 7.0 6.0 1.0 | 1 | 6.0 7.0 1.0 | | 5.0 8.0 1.0 | | --------------- | | 4.0 9.0 1.0 | | 3.0 10.0 1.0 | 2 | 2.0 11.0 1.0 | | 1.0 12.0 1.0 | * *
The following is the 3 × 1 process grid:
B,D | 0 -----| ------- 0 | P00 -----| ------- 1 | P10 -----| ------- 2 | P20
Local matrix B with block size of 4:
p,q | 0 -----|----------------- | 12.0 1.0 1.0 | 11.0 2.0 1.0 0 | 10.0 3.0 1.0 | 9.0 4.0 1.0 -----|----------------- | 8.0 5.0 1.0 | 7.0 6.0 1.0 1 | 6.0 7.0 1.0 | 5.0 8.0 1.0 -----|----------------- | 4.0 9.0 1.0 | 3.0 10.0 1.0 2 | 2.0 11.0 1.0 | 1.0 12.0 1.0
The value of info is 0 on all processes.
This example shows how to solve the system AX=B, where matrix A is the same diagonally dominant general tridiagonal matrix factored in Example 2 for PDDTTRF. The input and/or output values for dl, d, du, desc_a, and info in this example are the same as shown for Example 1.
Notes:
ORDER = 'R' NPROW = 3 NPCOL = 1 CALL BLACS_GET (0, 0, ICONTXT) CALL BLACS_GRIDINIT(ICONTXT, ORDER, NPROW, NPCOL) CALL BLACS_GRIDINFO(ICONTXT, NPROW, NPCOL, MYROW, MYCOL) TRANSA N NRHS DL D DU IA DESC_A B IB DESC_B | | | | | | | | | | | CALL PDDTTRS( N , 12 , 3 , DL , D , DU , 1 , DESC_A , B , 1 , DESC_B , AF LAF WORK LWORK INFO | | | | | AF , 44 , WORK , 0 , INFO )