183 SUBROUTINE cckcsd( NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH,
184 $ mmax, x, xf, u1, u2, v1t, v2t, theta, iwork,
185 $ work, rwork, nin, nout, info )
193 INTEGER info, nin, nm, nmats, mmax, nout
197 INTEGER iseed( 4 ), iwork( * ), mval( * ), pval( * ),
199 REAL rwork( * ), theta( * )
200 COMPLEX u1( * ), u2( * ), v1t( * ), v2t( * ),
201 $ work( * ), x( * ), xf( * )
208 parameter( ntests = 9 )
210 parameter( ntypes = 3 )
211 REAL gapdigit, orth, piover2, ten
212 parameter( gapdigit = 10.0e0, orth = 1.0e-4,
213 $ piover2 = 1.57079632679489662e0,
219 INTEGER i, iinfo, im, imat, j, ldu1, ldu2, ldv1t,
220 $ ldv2t, ldx, lwork, m, nfail, nrun, nt, p, q, r
223 LOGICAL dotype( ntypes )
224 REAL result( ntests )
246 CALL
alareq( path, nmats, dotype, ntypes, nin, nout )
261 DO 20 imat = 1, ntypes
265 IF( .NOT.dotype( imat ) )
271 CALL
claror(
'L',
'I', m, m, x, ldx, iseed, work, iinfo )
272 IF( m .NE. 0 .AND. iinfo .NE. 0 )
THEN
273 WRITE( nout, fmt = 9999 ) m, iinfo
277 ELSE IF( imat.EQ.2 )
THEN
278 r = min( p, m-p, q, m-q )
280 theta(i) = piover2 *
slarnd( 1, iseed )
282 CALL
clacsg( m, p, q, theta, iseed, x, ldx, work )
285 x(i+(j-1)*ldx) = x(i+(j-1)*ldx) +
290 r = min( p, m-p, q, m-q )
292 theta(i) = ten**(-
slarnd(1,iseed)*gapdigit)
295 theta(i) = theta(i-1) + theta(i)
298 theta(i) = piover2 * theta(i) / theta(r+1)
300 CALL
clacsg( m, p, q, theta, iseed, x, ldx, work )
305 CALL
ccsdts( m, p, q, x, xf, ldx, u1, ldu1, u2, ldu2, v1t,
306 $ ldv1t, v2t, ldv2t, theta, iwork, work, lwork,
313 IF( result( i ).GE.thresh )
THEN
314 IF( nfail.EQ.0 .AND. firstt )
THEN
318 WRITE( nout, fmt = 9998 )m, p, q, imat, i,
329 CALL
alasum( path, nout, nfail, nrun, 0 )
331 9999
FORMAT(
' CLAROR in CCKCSD: M = ', i5,
', INFO = ', i15 )
332 9998
FORMAT(
' M=', i4,
' P=', i4,
', Q=', i4,
', type ', i2,
333 $
', test ', i2,
', ratio=', g13.6 )
342 SUBROUTINE clacsg( M, P, Q, THETA, ISEED, X, LDX, WORK )
348 COMPLEX work( * ), x( ldx, * )
351 parameter( one = (1.0e0,0.0e0), zero = (0.0e0,0.0e0) )
355 r = min( p, m-p, q, m-q )
357 CALL
claset(
'Full', m, m, zero, zero, x, ldx )
363 x(min(p,q)-r+i,min(p,q)-r+i) = cmplx( cos(theta(i)), 0.0e0 )
365 DO i = 1, min(p,m-q)-r
366 x(p-i+1,m-i+1) = -one
369 x(p-(min(p,m-q)-r)+1-i,m-(min(p,m-q)-r)+1-i) =
370 $ cmplx( -sin(theta(r-i+1)), 0.0e0 )
372 DO i = 1, min(m-p,q)-r
376 x(m-(min(m-p,q)-r)+1-i,q-(min(m-p,q)-r)+1-i) =
377 $ cmplx( sin(theta(r-i+1)), 0.0e0 )
379 DO i = 1, min(m-p,m-q)-r
383 x(p+(min(m-p,m-q)-r)+i,q+(min(m-p,m-q)-r)+i) =
384 $ cmplx( cos(theta(i)), 0.0e0 )
386 CALL
claror(
'Left',
'No init', p, m, x, ldx, iseed, work, info )
387 CALL
claror(
'Left',
'No init', m-p, m, x(p+1,1), ldx,
388 $ iseed, work, info )
389 CALL
claror(
'Right',
'No init', m, q, x, ldx, iseed,
391 CALL
claror(
'Right',
'No init', m, m-q,
392 $ x(1,q+1), ldx, iseed, work, info )
subroutine claset(UPLO, M, N, ALPHA, BETA, A, LDA)
CLASET
subroutine clacsg(M, P, Q, THETA, ISEED, X, LDX, WORK)
subroutine alareq(PATH, NMATS, DOTYPE, NTYPES, NIN, NOUT)
ALAREQ
subroutine alahdg(IOUNIT, PATH)
ALAHDG
subroutine alasum(TYPE, NOUT, NFAIL, NRUN, NERRS)
ALASUM
subroutine claror(SIDE, INIT, M, N, A, LDA, ISEED, X, INFO)
CLAROR
subroutine cckcsd(NM, MVAL, PVAL, QVAL, NMATS, ISEED, THRESH, MMAX, X, XF, U1, U2, V1T, V2T, THETA, IWORK, WORK, RWORK, NIN, NOUT, INFO)
CCKCSD
subroutine ccsdts(M, P, Q, X, XF, LDX, U1, LDU1, U2, LDU2, V1T, LDV1T, V2T, LDV2T, THETA, IWORK, WORK, LWORK, RWORK, RESULT)
CCSDTS
real function slarnd(IDIST, ISEED)
SLARND