1 INTEGER FUNCTION pilaenvx( ICTXT, ISPEC, NAME, OPTS, N1, N2, N3,
15 CHARACTER*( * ) name, opts
16 INTEGER ictxt, ispec, n1, n2, n3, n4
135 INTEGER i, ic, iz, nb, nbmin, nx, nprow, npcol, myrow,
138 CHARACTER c1*1, c2*2, c4*2, c3*3, subnam*6
141 INTRINSIC char, ichar, int,
min, real
149 IF( ispec.GT.23 )
GO TO 990
150 GO TO ( 10, 10, 10, 80, 90, 100, 110, 120,
151 $ 130, 140, 150, 160, 160, 160, 160, 160,
152 $ 170, 180, 190, 200, 210, 220, 230, 160)ispec
165 ic = ichar( subnam( 1: 1 ) )
167 IF( iz.EQ.90 .OR. iz.EQ.122 )
THEN
171 IF( ic.GE.97 .AND. ic.LE.122 )
THEN
172 subnam( 1: 1 ) = char( ic-32 )
174 ic = ichar( subnam( i: i ) )
175 IF( ic.GE.97 .AND. ic.LE.122 )
176 $ subnam( i: i ) = char( ic-32 )
180 ELSE IF( iz.EQ.233 .OR. iz.EQ.169 )
THEN
184 IF( ( ic.GE.129 .AND. ic.LE.137 ) .OR.
185 $ ( ic.GE.145 .AND. ic.LE.153 ) .OR.
186 $ ( ic.GE.162 .AND. ic.LE.169 ) )
THEN
187 subnam( 1: 1 ) = char( ic+64 )
189 ic = ichar( subnam( i: i ) )
190 IF( ( ic.GE.129 .AND. ic.LE.137 ) .OR.
191 $ ( ic.GE.145 .AND. ic.LE.153 ) .OR.
192 $ ( ic.GE.162 .AND. ic.LE.169 ) )subnam( i:
193 $ i ) = char( ic+64 )
197 ELSE IF( iz.EQ.218 .OR. iz.EQ.250 )
THEN
201 IF( ic.GE.225 .AND. ic.LE.250 )
THEN
202 subnam( 1: 1 ) = char( ic-32 )
204 ic = ichar( subnam( i: i ) )
205 IF( ic.GE.225 .AND. ic.LE.250 )
206 $ subnam( i: i ) = char( ic-32 )
212 sname = c1.EQ.
'S' .OR. c1.EQ.
'D'
213 cname = c1.EQ.
'C' .OR. c1.EQ.
'Z'
214 IF( .NOT.( cname .OR. sname ) )
220 GO TO ( 50, 60, 70 )ispec
232 IF( c2.EQ.
'GE' )
THEN
233 IF( c3.EQ.
'TRF' )
THEN
239 ELSE IF( c3.EQ.
'QRF' .OR. c3.EQ.
'RQF' .OR. c3.EQ.
'LQF' .OR.
246 ELSE IF( c3.EQ.
'HRD' )
THEN
252 ELSE IF( c3.EQ.
'BRD' )
THEN
258 ELSE IF( c3.EQ.
'TRI' )
THEN
265 ELSE IF( c2.EQ.
'PO' )
THEN
266 IF( c3.EQ.
'TRF' )
THEN
273 ELSE IF( c2.EQ.
'SY' )
THEN
274 IF( c3.EQ.
'TRF' )
THEN
280 ELSE IF( sname .AND. c3.EQ.
'TRD' )
THEN
282 ELSE IF( sname .AND. c3.EQ.
'GST' )
THEN
285 ELSE IF( cname .AND. c2.EQ.
'HE' )
THEN
286 IF( c3.EQ.
'TRF' )
THEN
288 ELSE IF( c3.EQ.
'TRD' )
THEN
290 ELSE IF( c3.EQ.
'GST' )
THEN
293 ELSE IF( sname .AND. c2.EQ.
'OR' )
THEN
294 IF( c3( 1: 1 ).EQ.
'G' )
THEN
295 IF( c4.EQ.
'QR' .OR. c4.EQ.
'RQ' .OR. c4.EQ.
'LQ' .OR. c4.EQ.
296 $
'QL' .OR. c4.EQ.
'HR' .OR. c4.EQ.
'TR' .OR. c4.EQ.
'BR' )
300 ELSE IF( c3( 1: 1 ).EQ.
'M' )
THEN
301 IF( c4.EQ.
'QR' .OR. c4.EQ.
'RQ' .OR. c4.EQ.
'LQ' .OR. c4.EQ.
302 $
'QL' .OR. c4.EQ.
'HR' .OR. c4.EQ.
'TR' .OR. c4.EQ.
'BR' )
307 ELSE IF( cname .AND. c2.EQ.
'UN' )
THEN
308 IF( c3( 1: 1 ).EQ.
'G' )
THEN
309 IF( c4.EQ.
'QR' .OR. c4.EQ.
'RQ' .OR. c4.EQ.
'LQ' .OR. c4.EQ.
310 $
'QL' .OR. c4.EQ.
'HR' .OR. c4.EQ.
'TR' .OR. c4.EQ.
'BR' )
314 ELSE IF( c3( 1: 1 ).EQ.
'M' )
THEN
315 IF( c4.EQ.
'QR' .OR. c4.EQ.
'RQ' .OR. c4.EQ.
'LQ' .OR. c4.EQ.
316 $
'QL' .OR. c4.EQ.
'HR' .OR. c4.EQ.
'TR' .OR. c4.EQ.
'BR' )
321 ELSE IF( c2.EQ.
'GB' )
THEN
322 IF( c3.EQ.
'TRF' )
THEN
337 ELSE IF( c2.EQ.
'PB' )
THEN
338 IF( c3.EQ.
'TRF' )
THEN
353 ELSE IF( c2.EQ.
'TR' )
THEN
354 IF( c3.EQ.
'TRI' )
THEN
361 ELSE IF( c2.EQ.
'LA' )
THEN
362 IF( c3.EQ.
'UUM' )
THEN
369 ELSE IF( sname .AND. c2.EQ.
'ST' )
THEN
370 IF( c3.EQ.
'EBZ' )
THEN
382 IF( c2.EQ.
'GE' )
THEN
383 IF( c3.EQ.
'QRF' .OR. c3.EQ.
'RQF' .OR. c3.EQ.
'LQF' .OR. c3.EQ.
390 ELSE IF( c3.EQ.
'HRD' )
THEN
396 ELSE IF( c3.EQ.
'BRD' )
THEN
402 ELSE IF( c3.EQ.
'TRI' )
THEN
409 ELSE IF( c2.EQ.
'SY' )
THEN
410 IF( c3.EQ.
'TRF' )
THEN
416 ELSE IF( sname .AND. c3.EQ.
'TRD' )
THEN
419 ELSE IF( cname .AND. c2.EQ.
'HE' )
THEN
420 IF( c3.EQ.
'TRD' )
THEN
423 ELSE IF( sname .AND. c2.EQ.
'OR' )
THEN
424 IF( c3( 1: 1 ).EQ.
'G' )
THEN
425 IF( c4.EQ.
'QR' .OR. c4.EQ.
'RQ' .OR. c4.EQ.
'LQ' .OR. c4.EQ.
426 $
'QL' .OR. c4.EQ.
'HR' .OR. c4.EQ.
'TR' .OR. c4.EQ.
'BR' )
430 ELSE IF( c3( 1: 1 ).EQ.
'M' )
THEN
431 IF( c4.EQ.
'QR' .OR. c4.EQ.
'RQ' .OR. c4.EQ.
'LQ' .OR. c4.EQ.
432 $
'QL' .OR. c4.EQ.
'HR' .OR. c4.EQ.
'TR' .OR. c4.EQ.
'BR' )
437 ELSE IF( cname .AND. c2.EQ.
'UN' )
THEN
438 IF( c3( 1: 1 ).EQ.
'G' )
THEN
439 IF( c4.EQ.
'QR' .OR. c4.EQ.
'RQ' .OR. c4.EQ.
'LQ' .OR. c4.EQ.
440 $
'QL' .OR. c4.EQ.
'HR' .OR. c4.EQ.
'TR' .OR. c4.EQ.
'BR' )
444 ELSE IF( c3( 1: 1 ).EQ.
'M' )
THEN
445 IF( c4.EQ.
'QR' .OR. c4.EQ.
'RQ' .OR. c4.EQ.
'LQ' .OR. c4.EQ.
446 $
'QL' .OR. c4.EQ.
'HR' .OR. c4.EQ.
'TR' .OR. c4.EQ.
'BR' )
460 IF( c2.EQ.
'GE' )
THEN
461 IF( c3.EQ.
'QRF' .OR. c3.EQ.
'RQF' .OR. c3.EQ.
'LQF' .OR. c3.EQ.
468 ELSE IF( c3.EQ.
'HRD' )
THEN
474 ELSE IF( c3.EQ.
'BRD' )
THEN
481 ELSE IF( c2.EQ.
'SY' )
THEN
482 IF( sname .AND. c3.EQ.
'TRD' )
THEN
485 ELSE IF( cname .AND. c2.EQ.
'HE' )
THEN
486 IF( c3.EQ.
'TRD' )
THEN
489 ELSE IF( sname .AND. c2.EQ.
'OR' )
THEN
490 IF( c3( 1: 1 ).EQ.
'G' )
THEN
491 IF( c4.EQ.
'QR' .OR. c4.EQ.
'RQ' .OR. c4.EQ.
'LQ' .OR. c4.EQ.
492 $
'QL' .OR. c4.EQ.
'HR' .OR. c4.EQ.
'TR' .OR. c4.EQ.
'BR' )
497 ELSE IF( cname .AND. c2.EQ.
'UN' )
THEN
498 IF( c3( 1: 1 ).EQ.
'G' )
THEN
499 IF( c4.EQ.
'QR' .OR. c4.EQ.
'RQ' .OR. c4.EQ.
'LQ' .OR. c4.EQ.
500 $
'QL' .OR. c4.EQ.
'HR' .OR. c4.EQ.
'TR' .OR. c4.EQ.
'BR' )
586 CALL blacs_gridinfo( ictxt, nprow, npcol, myrow, mycol )