SUBROUTINE SBDISM( TRANSA, MB, N, UNITD, DV, ALPHA, DESCRA, * VAL, BLDA, IBDIAG, NBDIAG, LB, * B, LDB, BETA, C, LDC, WORK, LWORK ) INTEGER*4 TRANSA, MB, N, UNITD, DESCRA(5), BLDA, NBDIAG, LB, * LDB, LDC, LWORK INTEGER*4 IBDIAG(NBDIAG) REAL*4 ALPHA, BETA REAL*4 DV(NDV), VAL(LB*LB*BLDA*NBDIAG), B(LDB,*), C(LDC,*), * WORK(LWORK) SUBROUTINE DBDISM( TRANSA, MB, N, UNITD, DV, ALPHA, DESCRA, * VAL, BLDA, IBDIAG, NBDIAG, LB, * B, LDB, BETA, C, LDC, WORK, LWORK) INTEGER*4 TRANSA, MB, N, UNITD, DESCRA(5), BLDA, NBDIAG, LB, * LDB, LDC, LWORK INTEGER*4 IBDIAG(NBDIAG) REAL*8 ALPHA, BETA REAL*8 DV(NDV), VAL(LB*LB*BLDA*NBDIAG), B(LDB,*), C(LDC,*), * WORK(LWORK)
C <- ALPHA inv(A) B + BETA C C <- ALPHA inv(A') B + BETA C C <- ALPHA D inv(A) B + BETA C C <- ALPHA D inv(A') B + BETA C C <- ALPHA inv(A) D B + BETA C C <- ALPHA inv(A') D B + BETA C ( ' indicates matrix transpose) where D is a scaling block diagonal matrix
TRANSA Indicates how to operate with the sparse matrix 0 : operate with matrix 1 : operate with transpose matrix MB Number of block rows in matrix A N Number of columns in matrix C UNITD Type of scaling: 1 : Identity matrix (argument DV[] is ignored) 2 : Scale on left (row scaling) 3 : Scale on right (column scaling) DV() Array of length MB*LB*LB containing the elements of the diagonal blocks of the matrix D. The size of each square block is LB*LB and each block contains matrix entries stored column-major within each dense diagonal block ALPHA Scalar parameter DESCRA() Descriptor argument. Five element integer array DESCRA(1) matrix structure 0 : General (NOT IMPLEMENTED) 1 : Symmetric (NOT IMPLEMENTED) 2 : Hermitian (NOT IMPLEMENTED) 3 : Triangular 4 : Skew(Anti)-Symmetric (NOT IMPLEMENTED) 5 : Diagonal (NOT IMPLEMENTED) DESCRA(2) upper/lower triangular indicator 1 : lower 2 : upper DESCRA(3) main diagonal type 0 : non-unit 1 : unit DESCRA(4) Array base (NOT IMPLEMENTED) 0 : C/C++ compatible 1 : Fortran compatible DESCRA(5) repeated indices? (NOT IMPLEMENTED) 0 : unknown 1 : no repeated indices VAL() Scalar array of length LB*LB*BLDA*NBDIAG containing matrix entries, stored column-major within each dense block. BLDA Leading block dimension of VAL(). Should be greater than or equal to MB. IBDIAG() Integer array of length NBDIAG consisting of the corresponding indices of the non-zero block diagonals of A in VAL(). NBDIAG The number of non-zero block diagonals in A. LB Dimension of dense blocks composing A. B() Rectangular array with first dimension LDB. LDB Leading dimension of B. BETA Scalar parameter. C() Rectangular array with first dimension LDC. LDC Leading dimension of C. WORK() Scratch array of length LWORK. LWORK should be at least MB*LB*MIN(LB,N). For good performance, LWORK should generally be larger. LWORK Length of WORK array. If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
http://math.nist.gov/mcsd/Staff/KRemington/fspblas/
No test for singularity or near-singularity is included in this routine. Such tests must be performed before calling this routine.