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 COMPLEX 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 INTEGER CPLXSZ, INTGSZ
81 parameter( cplxsz = 8, intgsz = 4 )
82 INTEGER REALSZ
83 parameter( realsz = 4 )
84 INTEGER MAXSETSIZE
85 parameter( maxsetsize = 50 )
86
87
88 CHARACTER SUBTESTS
89 INTEGER CONTEXT, IAM, IMIDPAD, INITCON, IPOSTPAD,
90 $ IPREPAD, ISIZEHEEVX, ISIZESUBTST, ISIZETST,
91 $ LDA, LLRWORK, MATSIZE, MATTYPE, MYCOL, MYROW,
92 $ N, NB, NMATSIZES, NMATTYPES, NNODES, NP, NPCOL,
93 $ NPCONFIGS, NPROW, NQ, NUPLOS, ORDER, PCONFIG,
94 $ PTRA, PTRCOPYA, PTRGAP, PTRICLUS, PTRIFAIL,
95 $ PTRIWRK, PTRRWORK, PTRW, PTRW2, PTRWORK, PTRZ,
96 $ RES, RSIZECHK, RSIZEHEEVX, RSIZEQTQ,
97 $ RSIZESUBTST, RSIZETST, SIZEHEEVX, SIZEMQRLEFT,
98 $ SIZEMQRRIGHT, SIZEQRF, SIZESUBTST, SIZETMS,
99 $ SIZETST, UPLO,SIZEHEEVD, RSIZEHEEVD, ISIZEHEEVD
100 REAL ABSTOL, THRESH
101
102
103 CHARACTER UPLOS( 2 )
104 INTEGER DESCA( DLEN_ ), MATSIZES( MAXSETSIZE ),
105 $ MATTYPES( MAXSETSIZE ), NBS( MAXSETSIZE ),
106 $ NPCOLS( MAXSETSIZE ), NPROWS( MAXSETSIZE )
107
108
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 pssepinfo( 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 DO 40 matsize = 1, nmatsizes
140
141 DO 30 pconfig = 1, npconfigs
142
143 DO 20 mattype = 1, nmattypes
144
145 DO 10 uplo = 1, nuplos
146
147 n = matsizes( matsize )
148 order = n
149
150 nprow = nprows( pconfig )
151 npcol = npcols( pconfig )
152 nb = nbs( pconfig )
153
154 np =
numroc( n, nb, 0, 0, nprow )
155 nq =
numroc( n, nb, 0, 0, npcol )
156 iprepad =
max( nb, np )
157 imidpad = nb
158 ipostpad =
max( nb, nq )
159
160 lda =
max( np, 1 ) + imidpad
161
162 CALL blacs_get( -1, 0, context )
163 CALL blacs_gridinit( context, 'R', nprow, npcol )
164 CALL blacs_gridinfo( context, nprow, npcol, myrow,
165 $ mycol )
166 IF( myrow.GE.0 ) THEN
167 CALL descinit( desca, n, n, nb, nb, 0, 0,
168 $ context, lda, info )
170 $ sizemqrleft, sizemqrright,
171 $ sizeqrf, sizetms, rsizeqtq,
172 $ rsizechk, sizeheevx,
173 $ rsizeheevx, isizeheevx,
174 $ sizeheevd, rsizeheevd, isizeheevd,
175 $ sizesubtst, rsizesubtst,
176 $ isizesubtst, sizetst,
177 $ rsizetst, isizetst )
178
179 ptra = 1
180 ptrz = ptra + lda*nq + iprepad + ipostpad
181 ptrcopya = ptrz + lda*nq + iprepad + ipostpad
182 ptrw = ptrcopya + lda*nq + iprepad + ipostpad
183 ptrw2 = ptrw +
iceil(
max( n, 1 )+iprepad+
184 $ ipostpad, cplxsz / realsz )
185 ptrwork = ptrw2 +
iceil(
max( n, 1 )+iprepad+
186 $ ipostpad, cplxsz / realsz )
187 ptrgap = ptrwork + sizetst + iprepad + ipostpad
188 ptrifail = ptrgap +
iceil( nprow*npcol+iprepad+
189 $ ipostpad, cplxsz / realsz )
190 ptriclus = ptrifail +
iceil( n+iprepad+ipostpad,
191 $ cplxsz / intgsz )
192 ptriwrk = ptriclus +
iceil( 2*nprow*npcol+
193 $ iprepad+ipostpad, cplxsz / intgsz )
194 ptrrwork = ptriwrk +
iceil( isizetst+iprepad+
195 $ ipostpad, cplxsz / intgsz )
196 llrwork = ( memsize-ptrrwork+1 )*cplxsz / realsz
197
198
199 ntests = ntests + 1
200 IF( llrwork.LT.rsizetst ) THEN
201 nskipped = nskipped + 1
202 ELSE
203 CALL pcseptst( desca, uplos( uplo ), n,
204 $ mattypes( mattype ), subtests,
205 $ thresh, n, abstol, iseed,
206 $ mem( ptra ), mem( ptrcopya ),
207 $ mem( ptrz ), lda, mem( ptrw ),
208 $ mem( ptrw2 ), mem( ptrifail ),
209 $ mem( ptriclus ),
210 $ mem( ptrgap ), iprepad,
211 $ ipostpad, mem( ptrwork ),
212 $ sizetst, mem( ptrrwork ),
213 $ llrwork, mem( ptriwrk ),
214 $ isizetst, nout, res )
215
216 IF( res.EQ.0 ) THEN
217 npassed = npassed + 1
218 ELSE IF( res.EQ.2 ) THEN
219 nnocheck = nnocheck + 1
220 ELSE IF( res.EQ.3 ) THEN
221 nskipped = nskipped + 1
222 WRITE( nout, fmt=*)'pCSEPREQ failed'
223 CALL blacs_abort( context, -1 )
224 END IF
225 END IF
226 CALL blacs_gridexit( context )
227 END IF
228 10 CONTINUE
229 20 CONTINUE
230 30 CONTINUE
231 40 CONTINUE
232 END IF
233
234
235 RETURN
236
237
238
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 pclasizesep(desca, iprepad, ipostpad, sizemqrleft, sizemqrright, sizeqrf, sizetms, rsizeqtq, rsizechk, sizeheevx, rsizeheevx, isizeheevx, sizeheevd, rsizeheevd, isizeheevd, sizesubtst, rsizesubtst, isizesubtst, sizetst, rsizetst, isizetst)
subroutine pcseptst(desca, uplo, n, mattype, subtests, thresh, order, abstol, iseed, a, copya, z, lda, win, wnew, ifail, iclustr, gap, iprepad, ipostpad, work, lwork, rwork, lrwork, iwork, liwork, nout, info)
subroutine pssepinfo(context, iam, nin, nout, maxsetsize, nmatsizes, matsizes, nuplos, uplos, npconfigs, nprows, npcols, nbs, nmattypes, mattypes, maxtype, subtests, thresh, order, abstol, info)