PDPOTRF uses Cholesky factorization to factor a positive definite real symmetric matrix A into one of the following forms:
PZPOTRF uses Cholesky factorization to factor a positive definite complex Hermitian matrix A into one of the following forms:
In the formulas above:
To solve the system of equations with any number of right-hand sides, follow the call to these subroutines with one or more calls to PDPOTRS or PZPOTRS, respectively.
If n = 0, no computation is performed and the subroutine
returns after doing some parameter checking. See references [16], [18], [22], [36],
and [37].
A | Subroutine |
Long-precision real | PDPOTRF |
Long-precision complex | PZPOTRF |
Fortran | CALL PDPOTRF | PZPOTRF (uplo, n, a, ia, ja, desc_a, info) |
C and C++ | pdpotrf | pzpotrf (uplo, n, a, ia, ja, desc_a, 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; n >= 0.
Scope: local
Specified as: an LLD_A by (at least) LOCq(N_A) array, containing numbers of the data type indicated in Table 66. Details about the square block-cyclic data distribution of global matrix A are stored in desc_a.
Scope: global
Specified as: a fullword integer; 1 <= ia <= M_A and ia+n-1 <= M_A.
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=1 | 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 |
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 | Global |
7 | RSRC_A | The process row of the p × q grid over which the first row of the global matrix is distributed | 0 <= RSRC_A < p | Global |
8 | CSRC_A | The process column of the p × q grid over which the first column of the global matrix is distributed | 0 <= CSRC_A < q | Global |
9 | LLD_A | The leading dimension of the local array | LLD_A >= max(1,LOCp(M_A)) | Local |
Specified as: an array of (at least) length 9, containing fullword integers.
Scope: local
Returned as: an LLD_A by (at least) LOCq(N_A) array, containing numbers of the data type indicated in Table 66.
If info = 0, global real symmetric or complex Hermitian submatrix A is positive definite, and the factorization completed normally.
If info > 0, the leading minor of order k of the global real symmetric or complex Hermitian submatrix A is not positive definite. info is set equal to k, where the leading minor was encountered at Aia+k-1, ja+k-1. The factorization is not completed. A is overwritten with the partial factors.
Scope: global
Returned as: a fullword integer; info >= 0.
Matrix A is not positive definite. For details, see the description of the info argument.
Unable to allocate work space
If n <> 0:
In all cases:
Each of the following global input arguments are checked to determine whether its value differs from the value specified on process P00:
This example factors a 9 × 9 positive definite real symmetric matrix using a 2 × 2 process grid.
ORDER = 'R' NPROW = 2 NPCOL = 2 CALL BLACS_GET (0, 0, ICONTXT) CALL BLACS_GRIDINIT(ICONTXT, ORDER, NPROW, NPCOL) CALL BLACS_GRIDINFO(ICONTXT, NPROW, NPCOL, MYROW, MYCOL) UPLO N A IA JA DESC_A INFO | | | | | | | CALL PDPOTRF( 'L' , 9 , A , 1 , 1 , DESC_A , INFO )
| Desc_A |
---|---|
DTYPE_ | 1 |
CTXT_ | icontxt(IOBG38) |
M_ | 9 |
N_ | 9 |
MB_ | 3 |
NB_ | 3 |
RSRC_ | 0 |
CSRC_ | 0 |
LLD_ | See below(EPSSL38) |
Notes: |
Global real symmetric matrix A of order 9 with block size 3 × 3:
B,D 0 1 2 * * | 1.0 . . | . . . | . . . | 0 | 1.0 2.0 . | . . . | . . . | | 1.0 2.0 3.0 | . . . | . . . | | ----------------|------------------|---------------- | | 1.0 2.0 3.0 | 4.0 . . | . . . | 1 | 1.0 2.0 3.0 | 4.0 5.0 . | . . . | | 1.0 2.0 3.0 | 4.0 5.0 6.0 | . . . | | ----------------|------------------|---------------- | | 1.0 2.0 3.0 | 4.0 5.0 6.0 | 7.0 . . | 2 | 1.0 2.0 3.0 | 4.0 5.0 6.0 | 7.0 8.0 . | | 1.0 2.0 3.0 | 4.0 5.0 6.0 | 7.0 8.0 9.0 | * *
The following is the 2 × 2 process grid:
B,D | 0 2 | 1 -----| ------- |----- 0 | P00 | P01 2 | | -----| ------- |----- 1 | P10 | P11
Local arrays for A:
p,q | 0 | 1 -----|--------------------------------|----------------- | 1.0 . . . . . | . . . | 1.0 2.0 . . . . | . . . | 1.0 2.0 3.0 . . . | . . . 0 | 1.0 2.0 3.0 7.0 . . | 4.0 5.0 6.0 | 1.0 2.0 3.0 7.0 8.0 . | 4.0 5.0 6.0 | 1.0 2.0 3.0 7.0 8.0 9.0 | 4.0 5.0 6.0 -----|--------------------------------|----------------- | 1.0 2.0 3.0 . . . | 4.0 . . 1 | 1.0 2.0 3.0 . . . | 4.0 5.0 . | 1.0 2.0 3.0 . . . | 4.0 5.0 6.0
Output:
Global real symmetric matrix A of order 9 with block size 3 × 3:
B,D 0 1 2 * * | 1.0 . . | . . . | . . . | 0 | 1.0 1.0 . | . . . | . . . | | 1.0 1.0 1.0 | . . . | . . . | | ----------------|------------------|---------------- | | 1.0 1.0 1.0 | 1.0 . . | . . . | 1 | 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 . . | 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 | * *
The following is the 2 × 2 process grid:
B,D | 0 2 | 1 -----| ------- |----- 0 | P00 | P01 2 | | -----| ------- |----- 1 | P10 | P11
Local arrays for A:
p,q | 0 | 1 -----|--------------------------------|----------------- | 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 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 | 1.0 1.0 1.0 . . . | 1.0 1.0 . | 1.0 1.0 1.0 . . . | 1.0 1.0 1.0
The value of info is 0 on all processes.
This example factors a 9 × 9 positive definite complex Hermitian matrix using a 2 × 2 process grid.
ORDER = 'R' NPROW = 2 NPCOL = 2 CALL BLACS_GET (0, 0, ICONTXT) CALL BLACS_GRIDINIT(ICONTXT, ORDER, NPROW, NPCOL) CALL BLACS_GRIDINFO(ICONTXT, NPROW, NPCOL, MYROW, MYCOL) UPLO N A IA JA DESC_A INFO | | | | | | | CALL PZPOTRF( 'L' , 9 , A , 1 , 1 , DESC_A , INFO )
| Desc_A |
---|---|
DTYPE_ | 1 |
CTXT_ | icontxt(IOBG39) |
M_ | 9 |
N_ | 9 |
MB_ | 3 |
NB_ | 3 |
RSRC_ | 0 |
CSRC_ | 0 |
LLD_ | See below(EPSSL39) |
Notes: |
Global complex Hermitian matrix A of order 9 with block size 3 × 3:
B,D 0 1 2 * * | (18.0, 0.0) . . | . . . | . . . | 0 | (1.0, 1.0) (18.0, 0.0) . | . . . | . . . | | (1.0, 1.0) (3.0, 1.0) (18.0, 0.0) | . . . | . . . | | --------------------------------------|----------------------------------------|-------------------------------------- | | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) | (18.0, 0.0) . . | . . . | 1 | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) | (7.0, 1.0) (18.0, 0.0) . | . . . | | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) | (7.0, 1.0) (9.0, 1.0) (18.0, 0.0) | . . . | | --------------------------------------|----------------------------------------|-------------------------------------- | | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) | (7.0, 1.0) (9.0, 1.0) (11.0, 1.0) | (18.0, 0.0) . . | 2 | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) | (7.0, 1.0) (9.0, 1.0) (11.0, 1.0) | (13.0, 1.0) (18.0, 0.0) . | | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) | (7.0, 1.0) (9.0, 1.0) (11.0, 1.0) | (13.0, 1.0) (15.0, 1.0) (18.0, 0.0) | * *
The following is the 2 × 2 process grid:
B,D | 0 2 | 1 -----| ------- |----- 0 | P00 | P01 2 | | -----| ------- |----- 1 | P10 | P11
Local arrays for A:
p,q | 0 | 1 -----|--------------------------------------------------------------------------------|----------------------------------------- | (18.0, . ) . . . . . | . . . | (1.0, 1.0) (18.0, . ) . . . . | . . . | (1.0, 1.0) (3.0, 1.0) (18.0, . ) . . . | . . . 0 | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) (18.0, . ) . . | (7.0, 1.0) (9.0, 1.0) (11.0, 1.0) | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) (13.0, 1.0) (18.0, . ) . | (7.0, 1.0) (9.0, 1.0) (11.0, 1.0) | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) (13.0, 1.0) (15.0, 1.0) (18.0, . ) | (7.0, 1.0) (9.0, 1.0) (11.0, 1.0) -----|--------------------------------------------------------------------------------|----------------------------------------- | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) . . . | (18.0, . ) . . 1 | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) . . . | (7.0, 1.0) (18.0, . ) . | (1.0, 1.0) (3.0, 1.0) (5.0, 1.0) . . . | (7.0, 1.0) (9.0, 1.0) (18.0, . )
Output:
Global complex Hermitian matrix A of order 9 with block size 3 × 3:
B,D 0 1 2 * * | (4.2, 0.0) . . | . . . | . . . | 0 | (0.24, 0.24) (4.2, 0.0) . | . . . | . . . | | (0.24, 0.24) (0.68, 0.24) (4.2, 0.0) | . . . | . . . | | -----------------------------------------|----------------------------------------|----------------------------------- | | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) | (4.0, 0.0) . . | . . . | 1 | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) | (1.3, 0.25) (3.8, 0.0) . | . . . | | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) | (1.3, 0.25) (1.4, 0.26) (3.5, 0.0) | . . . | | -----------------------------------------|----------------------------------------|----------------------------------- | | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) | (1.3, 0.25) (1.4, 0.26) (1.5, 0.28) | (3.2, 0.0) . . | 2 | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) | (1.3, 0.25) (1.4, 0.26) (1.5, 0.28) | (1.6, 0.32) (2.7, 0.0) . | | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) | (1.3, 0.25) (1.4, 0.26) (1.5, 0.28) | (1.6, 0.32) (1.6, 0.37) (2.2, 0.0) | * *
The following is the 2 × 2 process grid:
B,D | 0 2 | 1 -----| ------- |----- 0 | P00 | P01 2 | | -----| ------- |----- 1 | P10 | P11
Local arrays for A:
p,q | 0 | 1 -----|---------------------------------------------------------------------------------|------------------------------------------ | (4.2, 0.0) . . . . . | . . . | (0.24, 0.24) (4.2, 0.0) . . . . | . . . | (0.24, 0.24) (0.68, 0.24) (4.2, 0.0) . . . | . . . 0 | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) (3.2, 0,0) . . | (1.3, 0.25) (1.4, 0.26) (1.5, 0.28) | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) (1.6, 0.32) (2.7, 0.0) . | (1.3, 0.25) (1.4, 0.26) (1.5, 0.28) | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) (1.6, 0.32) (1.6, 0.37) (2.2, 0.0) | (1.3, 0.25) (1.4, 0.26) (1.5, 0.28) -----|---------------------------------------------------------------------------------|------------------------------------------ | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) . . . | (4.0, 0.0) . . 1 | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) . . . | (1.3, 0.25) (3.8, 0.0 . | (0.24, 0.24) (0.68, 0.24) (1.1, 0.24) . . . | (1.3, 0.25) (1.4, 0.26) (3.5, 0.0)
The value of info is 0 on all processes.