---
name: "cdrvrfp.f"
section: "3"
platform: "linux"
package: "lapack-doc"
version: "3.12.1-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/cdrvrfp.f"
---

# cdrvrfp.f(3)

## NAME

TESTING/LIN/cdrvrfp.f

## SYNOPSIS

### Functions/Subroutines

subroutine **cdrvrfp** (nout, nn, nval, nns, nsval, nnt, ntval, thresh, a, asav, afac, ainv, b, bsav, xact, x, arf, arfinv, c\_work\_clatms, c\_work\_cpot02, c\_work\_cpot03, s\_work\_clatms, s\_work\_clanhe, s\_work\_cpot01, s\_work\_cpot02, s\_work\_cpot03)\
 **CDRVRFP**

## Function/Subroutine Documentation

### subroutine cdrvrfp (integer nout, integer nn, integer, dimension( nn ) nval, integer nns, integer, dimension( nns ) nsval, integer nnt, integer, dimension( nnt ) ntval, real thresh, complex, dimension( \* ) a, complex, dimension( \* ) asav, complex, dimension( \* ) afac, complex, dimension( \* ) ainv, complex, dimension( \* ) b, complex, dimension( \* ) bsav, complex, dimension( \* ) xact, complex, dimension( \* ) x, complex, dimension( \* ) arf, complex, dimension( \* ) arfinv, complex, dimension( \* ) c\_work\_clatms, complex, dimension( \* ) c\_work\_cpot02, complex, dimension( \* ) c\_work\_cpot03, real, dimension( \* ) s\_work\_clatms, real, dimension( \* ) s\_work\_clanhe, real, dimension( \* ) s\_work\_cpot01, real, dimension( \* ) s\_work\_cpot02, real, dimension( \* ) s\_work\_cpot03)

**CDRVRFP**

**Purpose:**

```
!>
!> CDRVRFP tests the LAPACK RFP routines:
!>     CPFTRF, CPFTRS, and CPFTRI.
!>
!> This testing routine follow the same tests as CDRVPO (test for the full
!> format Symmetric Positive Definite solver).
!>
!> The tests are performed in Full Format, conversion back and forth from
!> full format to RFP format are performed using the routines CTRTTF and
!> CTFTTR.
!>
!> First, a specific matrix A of size N is created. There is nine types of
!> different matrixes possible.
!>  1. Diagonal                        6. Random, CNDNUM = sqrt(0.1/EPS)
!>  2. Random, CNDNUM = 2              7. Random, CNDNUM = 0.1/EPS
!> *3. First row and column zero       8. Scaled near underflow
!> *4. Last row and column zero        9. Scaled near overflow
!> *5. Middle row and column zero
!> (* - tests error exits from CPFTRF, no test ratios are computed)
!> A solution XACT of size N-by-NRHS is created and the associated right
!> hand side B as well. Then CPFTRF is called to compute L (or U), the
!> Cholesky factor of A. Then L (or U) is used to solve the linear system
!> of equations AX = B. This gives X. Then L (or U) is used to compute the
!> inverse of A, AINV. The following four tests are then performed:
!> (1) norm( L*L' - A ) / ( N * norm(A) * EPS ) or
!>     norm( U'*U - A ) / ( N * norm(A) * EPS ),
!> (2) norm(B - A*X) / ( norm(A) * norm(X) * EPS ),
!> (3) norm( I - A*AINV ) / ( N * norm(A) * norm(AINV) * EPS ),
!> (4) ( norm(X-XACT) * RCOND ) / ( norm(XACT) * EPS ),
!> where EPS is the machine precision, RCOND the condition number of A, and
!> norm( . ) the 1-norm for (1,2,3) and the inf-norm for (4).
!> Errors occur when INFO parameter is not as expected. Failures occur when
!> a test ratios is greater than THRES.
!>
```

**Parameters**

*NOUT*

```
!>          NOUT is INTEGER
!>                The unit number for output.
!>
```

*NN*

```
!>          NN is INTEGER
!>                The number of values of N contained in the vector NVAL.
!>
```

*NVAL*

```
!>          NVAL is INTEGER array, dimension (NN)
!>                The values of the matrix dimension N.
!>
```

*NNS*

```
!>          NNS is INTEGER
!>                The number of values of NRHS contained in the vector NSVAL.
!>
```

*NSVAL*

```
!>          NSVAL is INTEGER array, dimension (NNS)
!>                The values of the number of right-hand sides NRHS.
!>
```

*NNT*

```
!>          NNT is INTEGER
!>                The number of values of MATRIX TYPE contained in the vector NTVAL.
!>
```

*NTVAL*

```
!>          NTVAL is INTEGER array, dimension (NNT)
!>                The values of matrix type (between 0 and 9 for PO/PP/PF matrices).
!>
```

*THRESH*

```
!>          THRESH is REAL
!>                The threshold value for the test ratios.  A result is
!>                included in the output file if RESULT >= THRESH.  To have
!>                every test ratio printed, use THRESH = 0.
!>
```

*A*

```
!>          A is COMPLEX array, dimension (NMAX*NMAX)
!>
```

*ASAV*

```
!>          ASAV is COMPLEX array, dimension (NMAX*NMAX)
!>
```

*AFAC*

```
!>          AFAC is COMPLEX array, dimension (NMAX*NMAX)
!>
```

*AINV*

```
!>          AINV is COMPLEX array, dimension (NMAX*NMAX)
!>
```

*B*

```
!>          B is COMPLEX array, dimension (NMAX*MAXRHS)
!>
```

*BSAV*

```
!>          BSAV is COMPLEX array, dimension (NMAX*MAXRHS)
!>
```

*XACT*

```
!>          XACT is COMPLEX array, dimension (NMAX*MAXRHS)
!>
```

*X*

```
!>          X is COMPLEX array, dimension (NMAX*MAXRHS)
!>
```

*ARF*

```
!>          ARF is COMPLEX array, dimension ((NMAX*(NMAX+1))/2)
!>
```

*ARFINV*

```
!>          ARFINV is COMPLEX array, dimension ((NMAX*(NMAX+1))/2)
!>
```

*C\_WORK\_CLATMS*

```
!>          C_WORK_CLATMS is COMPLEX array, dimension ( 3*NMAX )
!>
```

*C\_WORK\_CPOT02*

```
!>          C_WORK_CPOT02 is COMPLEX array, dimension ( NMAX*MAXRHS )
!>
```

*C\_WORK\_CPOT03*

```
!>          C_WORK_CPOT03 is COMPLEX array, dimension ( NMAX*NMAX )
!>
```

*S\_WORK\_CLATMS*

```
!>          S_WORK_CLATMS is REAL array, dimension ( NMAX )
!>
```

*S\_WORK\_CLANHE*

```
!>          S_WORK_CLANHE is REAL array, dimension ( NMAX )
!>
```

*S\_WORK\_CPOT01*

```
!>          S_WORK_CPOT01 is REAL array, dimension ( NMAX )
!>
```

*S\_WORK\_CPOT02*

```
!>          S_WORK_CPOT02 is REAL array, dimension ( NMAX )
!>
```

*S\_WORK\_CPOT03*

```
!>          S_WORK_CPOT03 is REAL array, dimension ( NMAX )
!>
```

**Author**

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line **238** of file **cdrvrfp.f**.

## Author

Generated automatically by Doxygen for LAPACK from the source code.
