5
6
7
8
9
10
11
12 INTEGER INFO, MEMSIZE, NIN, NNOCHECK, NOUT, NPASSED,
13 $ NSKIPPED, NTESTS
14
15
16 INTEGER ISEED( 4 )
17 DOUBLE PRECISION MEM( MEMSIZE )
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75 INTEGER BLOCK_CYCLIC_2D, DLEN_, DTYPE_, CTXT_, M_, N_,
76 $ MB_, NB_, RSRC_, CSRC_, LLD_
77 parameter( block_cyclic_2d = 1, dlen_ = 9, dtype_ = 1,
78 $ ctxt_ = 2, m_ = 3, n_ = 4, mb_ = 5, nb_ = 6,
79 $ rsrc_ = 7, csrc_ = 8, lld_ = 9 )
80 DOUBLE PRECISION FIVE
81 parameter( five = 5.0d+0 )
82 INTEGER DBLESZ, INTGSZ
83 parameter( dblesz = 8, intgsz = 4 )
84 INTEGER MAXSETSIZE
85 parameter( maxsetsize = 50 )
86
87
88 CHARACTER SUBTESTS
89 INTEGER CONTEXT, IAM, IBTYPE, IMIDPAD, INITCON,
90 $ IPOSTPAD, IPREPAD, ISIZESUBTST, ISIZESYEVX,
91 $ ISIZETST, LDA, LLWORK, MATSIZE, MATTYPE, MYCOL,
92 $ MYROW, N, NB, NIBTYPES, NMATSIZES, NMATTYPES,
93 $ NNODES, NP, NPCOL, NPCONFIGS, NPROW, NQ,
94 $ NUPLOS, ORDER, PCONFIG, PTRA, PTRB, PTRCOPYA,
95 $ PTRCOPYB, PTRGAP, PTRICLUS, PTRIFAIL, PTRIWRK,
96 $ PTRW, PTRW2, PTRWORK, PTRZ, RES, SIZECHK,
97 $ SIZEMQRLEFT, SIZEMQRRIGHT, SIZEQRF, SIZEQTQ,
98 $ SIZESUBTST, SIZESYEVX, SIZETMS, SIZETST, UPLO
99 DOUBLE PRECISION ABSTOL, THRESH
100
101
102 CHARACTER UPLOS( 2 )
103 INTEGER DESCA( DLEN_ ), MATSIZES( MAXSETSIZE ),
104 $ MATTYPES( MAXSETSIZE ), NBS( MAXSETSIZE ),
105 $ NPCOLS( MAXSETSIZE ), NPROWS( MAXSETSIZE )
106
107
108 LOGICAL LSAME
109 INTEGER ICEIL, NUMROC
111
112
113 EXTERNAL blacs_abort, blacs_get, blacs_gridexit,
114 $ blacs_gridinfo, blacs_gridinit, blacs_pinfo,
116
117
119
120
121
122 IF( block_cyclic_2d*csrc_*ctxt_*dlen_*dtype_*lld_*mb_*m_*nb_*n_*
123 $ rsrc_.LT.0 )RETURN
124
125 CALL blacs_pinfo( iam, nnodes )
126 CALL blacs_get( -1, 0, initcon )
127 CALL blacs_gridinit( initcon, 'R', 1, nnodes )
128
129 CALL pdsepinfo( initcon, iam, nin, nout, maxsetsize, nmatsizes,
130 $ matsizes, nuplos, uplos, npconfigs, nprows,
131 $ npcols, nbs, nmattypes, mattypes, 22, subtests,
132 $ thresh, order, abstol, info )
133
134 CALL blacs_gridexit( initcon )
135
136 IF( info.EQ.0 ) THEN
137
138
139
140 thresh = thresh*five
141
142 DO 50 matsize = 1, nmatsizes
143
144 DO 40 pconfig = 1, npconfigs
145
146 DO 30 mattype = 1, nmattypes
147
148 DO 20 uplo = 1, nuplos
149 IF(
lsame( subtests,
'Y' ) )
THEN
150 nibtypes = 3
151 ELSE
152 nibtypes = 1
153 END IF
154 DO 10 ibtype = 1, nibtypes
155
156 n = matsizes( matsize )
157 order = n
158
159 nprow = nprows( pconfig )
160 npcol = npcols( pconfig )
161 nb = nbs( pconfig )
162
163 np =
numroc( n, nb, 0, 0, nprow )
164 nq =
numroc( n, nb, 0, 0, npcol )
165 iprepad =
max( nb, np )
166 imidpad = nb
167 ipostpad =
max( nb, nq )
168
169 lda =
max( np, 1 ) + imidpad
170
171 CALL blacs_get( -1, 0, context )
172 CALL blacs_gridinit( context, 'R', nprow,
173 $ npcol )
174 CALL blacs_gridinfo( context, nprow, npcol,
175 $ myrow, mycol )
176 IF( myrow.GE.0 ) THEN
177 CALL descinit( desca, n, n, nb, nb, 0, 0,
178 $ context, lda, info )
180 $ sizemqrleft, sizemqrright,
181 $ sizeqrf, sizetms, sizeqtq,
182 $ sizechk, sizesyevx,
183 $ isizesyevx, sizesubtst,
184 $ isizesubtst, sizetst,
185 $ isizetst )
186
187 ptra = 1
188 ptrz = ptra + lda*nq + iprepad + ipostpad
189 ptrcopyb = ptrz + lda*nq + iprepad + ipostpad
190 ptrb = ptrcopyb + lda*nq + iprepad + ipostpad
191 ptrcopya = ptrb + lda*nq + iprepad + ipostpad
192 ptrw = ptrcopya + lda*nq + iprepad + ipostpad
193 ptrw2 = ptrw +
max( n, 1 ) + iprepad +
194 $ ipostpad
195 ptrgap = ptrw2 +
max( n, 1 ) + iprepad +
196 $ ipostpad
197 ptrifail = ptrgap + nprow*npcol + iprepad +
198 $ ipostpad
199 ptriclus = ptrifail +
200 $
iceil( n+iprepad+ipostpad,
201 $ dblesz / intgsz )
202 ptriwrk = ptriclus +
iceil( 2*nprow*npcol+
203 $ iprepad+ipostpad, dblesz / intgsz )
204 ptrwork = ptriwrk +
iceil( isizetst+iprepad+
205 $ ipostpad, dblesz / intgsz )
206 llwork = memsize - ptrwork - ipostpad -
207 $ iprepad + 1
208 ntests = ntests + 1
209 IF( llwork.LT.sizetst ) THEN
210 nskipped = nskipped + 1
211 ELSE
213 $ mattypes( mattype ),
214 $ ibtype, subtests, thresh,
215 $ n, abstol, iseed,
216 $ mem( ptra ),
217 $ mem( ptrcopya ),
218 $ mem( ptrb ),
219 $ mem( ptrcopyb ),
220 $ mem( ptrz ), lda,
221 $ mem( ptrw ), mem( ptrw2 ),
222 $ mem( ptrifail ),
223 $ mem( ptriclus ),
224 $ mem( ptrgap ), iprepad,
225 $ ipostpad, mem( ptrwork ),
226 $ llwork, mem( ptriwrk ),
227 $ isizetst, nout, res )
228
229 IF( res.EQ.0 ) THEN
230 npassed = npassed + 1
231 ELSE IF( res.EQ.2 ) THEN
232 nnocheck = nnocheck + 1
233 ELSE IF( res.EQ.3 ) THEN
234 nskipped = nskipped + 1
235 WRITE( nout, fmt = * )
236 $ ' pDGSEPREQ failed'
237 CALL blacs_abort( context, -1 )
238 END IF
239 CALL blacs_gridexit( context )
240 END IF
241 END IF
242 10 CONTINUE
243 20 CONTINUE
244 30 CONTINUE
245 40 CONTINUE
246 50 CONTINUE
247 END IF
248
249
250 RETURN
251
252
253
subroutine descinit(desc, m, n, mb, nb, irsrc, icsrc, ictxt, lld, info)
integer function iceil(inum, idenom)
integer function numroc(n, nb, iproc, isrcproc, nprocs)
subroutine pdgseptst(desca, uplo, n, mattype, ibtype, subtests, thresh, order, abstol, iseed, a, copya, b, copyb, z, lda, win, wnew, ifail, iclustr, gap, iprepad, ipostpad, work, lwork, iwork, liwork, nout, info)
subroutine pdlasizegsep(desca, iprepad, ipostpad, sizemqrleft, sizemqrright, sizeqrf, sizetms, sizeqtq, sizechk, sizesyevx, isizesyevx, sizesubtst, isizesubtst, sizetst, isizetst)
subroutine pdsepinfo(context, iam, nin, nout, maxsetsize, nmatsizes, matsizes, nuplos, uplos, npconfigs, nprows, npcols, nbs, nmattypes, mattypes, maxtype, subtests, thresh, order, abstol, info)