# p?potri

Computes the inverse of a symmetric/Hermitian positive definite distributed matrix.

## Syntax

call pspotri(uplo, n, a, ia, ja, desca, info)

call pdpotri(uplo, n, a, ia, ja, desca, info)

call pcpotri(uplo, n, a, ia, ja, desca, info)

call pzpotri(uplo, n, a, ia, ja, desca, info)

## Description

This routine computes the inverse of a real symmetric or complex Hermitian positive definite distributed matrix `sub(A) = A(ia:ia+n-1, ja:ja+n-1)` using the Cholesky factorization `sub(A) = UH*U` or `sub(A) = L*LH` computed by p?potrf.

## Input Parameters

uplo

  (global) CHARACTER*1. Must be 'U' or 'L'.

  Specifies whether the upper or lower triangular part of the symmetric/Hermitian matrix sub(A) is stored.

  If `uplo = 'U'`, upper triangle of sub(A) is stored. If `uplo = 'L'`, lower triangle of sub(A) is stored.

n

  (global) INTEGER. The number of rows and columns to be operated on, that is, the order of the distributed submatrix sub(A) `(n≥0)`.

a

  (local)

  REAL for pspotri

  DOUBLE PRECISION for pdpotri

  COMPLEX for pcpotri

  DOUBLE COMPLEX for pzpotri.

  Pointer into the local memory to an array of local dimension `a(lld_a,LOCc(ja+n-1))`.

  On entry, the array a contains the local pieces of the triangular factor U or L from the Cholesky factorization `sub(A) = UH*U,` or `sub(A) = L*LH`, as computed by p?potrf.

ia, ja

  (global) INTEGER. The row and column indices in the global array A indicating the first row and the first column of the submatrix sub(A), respectively.

desca

  (global and local) INTEGER array, dimension (dlen_). The array descriptor for the distributed matrix A.

## Output Parameters

a

  On exit, overwritten by the local pieces of the upper or lower triangle of the (symmetric/Hermitian) inverse of sub(A).

info

  (global) INTEGER. If `info=0`, the execution is successful.

  info < 0:

  If the i-th argument is an array and the j-th entry 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`.

  `info > 0`:

  If info = i, the (i, i) element of the factor U or L is zero, and the inverse could not be computed.

Parent topic: Routines for Matrix Inversion