151 REAL function
cqrt17( trans, iresid, m, n, nrhs, a,
152 $ lda, x, ldx, b, ldb, c, work, lwork )
160 INTEGER iresid, lda, ldb, ldx, lwork, m, n, nrhs
163 COMPLEX a( lda, * ), b( ldb, * ), c( ldb, * ),
164 $ work( lwork ), ( ldx, * )
171 parameter( zero = 0.0e0, one = 1.0e0 )
174 INTEGER info, , ncols,
175 REAL err, norma, , normrs, smlnum
195 IF(
lsame( trans,
'N' ) )
THEN
198 ELSE IF(
lsame( trans, 'c
' ) ) THEN
202 CALL XERBLA( 'cqrt17', 1 )
206.LT.
IF( LWORKNCOLS*NRHS ) THEN
207 CALL XERBLA( 'cqrt17', 13 )
211.LE..OR..LE..OR..LE.
IF( M0 N0 NRHS0 )
214 NORMA = CLANGE( 'one-
norm', M, N, A, LDA, RWORK )
215 SMLNUM = SLAMCH( 'safe minimum
' ) / SLAMCH( 'precision
' )
220 CALL CLACPY( 'all
', NROWS, NRHS, B, LDB, C, LDB )
221 CALL CGEMM( TRANS, 'no transpose
', NROWS, NRHS, NCOLS,
222 $ CMPLX( -ONE ), A, LDA, X, LDX, CMPLX( ONE ), C, LDB )
223 NORMRS = CLANGE( 'max', NROWS, NRHS, C, LDB, RWORK )
224.GT.
IF( NORMRSSMLNUM ) THEN
226 CALL CLASCL( 'general
', 0, 0, NORMRS, ONE, NROWS, NRHS, C, LDB,
232 CALL CGEMM( 'conjugate transpose
', TRANS, NRHS, NCOLS, NROWS,
233 $ CMPLX( ONE ), C, LDB, A, LDA, CMPLX( ZERO ), WORK,
238 ERR = CLANGE( 'one-
norm', NRHS, NCOLS, WORK, NRHS, RWORK )
245.EQ.
IF( IRESID1 ) THEN
246 NORMB = CLANGE( 'one-
norm', NROWS, NRHS, B, LDB, RWORK )
254 CQRT17 = ERR / ( SLAMCH( 'epsilon
' )*REAL( MAX( M, N, NRHS ) ) )
norm(diag(diag(diag(inv(mat))) -id.SOL), 2) % destroy mumps instance id.JOB
subroutine xerbla(srname, info)
XERBLA
logical function lsame(ca, cb)
LSAME
real function clange(norm, m, n, a, lda, work)
CLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
subroutine clascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
CLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine cgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CGEMM
real function cqrt17(trans, iresid, m, n, nrhs, a, lda, x, ldx, b, ldb, c, work, lwork)
CQRT17
real function slamch(cmach)
SLAMCH