162
163
164
165
166
167
168 CHARACTER*( * ) NAME, OPTS
169 INTEGER ISPEC, N1, N2, N3, N4
170
171
172
173
174
175 INTEGER I, IC, IZ, NB, NBMIN, NX
176 LOGICAL CNAME, SNAME, TWOSTAGE
177 CHARACTER C1*1, C2*2, C4*2, C3*3, SUBNAM*16
178
179
180 INTRINSIC char, ichar, int, min, real
181
182
183 INTEGER IEEECK, IPARMQ, IPARAM2STAGE
185
186
187
188 GO TO ( 10, 10, 10, 80, 90, 100, 110, 120,
189 $ 130, 140, 150, 160, 160, 160, 160, 160, 160)ispec
190
191
192
194 RETURN
195
196 10 CONTINUE
197
198
199
201 subnam = name
202 ic = ichar( subnam( 1: 1 ) )
203 iz = ichar( 'Z' )
204 IF( iz.EQ.90 .OR. iz.EQ.122 ) THEN
205
206
207
208 IF( ic.GE.97 .AND. ic.LE.122 ) THEN
209 subnam( 1: 1 ) = char( ic-32 )
210 DO 20 i = 2, 6
211 ic = ichar( subnam( i: i ) )
212 IF( ic.GE.97 .AND. ic.LE.122 )
213 $ subnam( i: i ) = char( ic-32 )
214 20 CONTINUE
215 END IF
216
217 ELSE IF( iz.EQ.233 .OR. iz.EQ.169 ) THEN
218
219
220
221 IF( ( ic.GE.129 .AND. ic.LE.137 ) .OR.
222 $ ( ic.GE.145 .AND. ic.LE.153 ) .OR.
223 $ ( ic.GE.162 .AND. ic.LE.169 ) ) THEN
224 subnam( 1: 1 ) = char( ic+64 )
225 DO 30 i = 2, 6
226 ic = ichar( subnam( i: i ) )
227 IF( ( ic.GE.129 .AND. ic.LE.137 ) .OR.
228 $ ( ic.GE.145 .AND. ic.LE.153 ) .OR.
229 $ ( ic.GE.162 .AND. ic.LE.169 ) )subnam( i:
230 $ i ) = char( ic+64 )
231 30 CONTINUE
232 END IF
233
234 ELSE IF( iz.EQ.218 .OR. iz.EQ.250 ) THEN
235
236
237
238 IF( ic.GE.225 .AND. ic.LE.250 ) THEN
239 subnam( 1: 1 ) = char( ic-32 )
240 DO 40 i = 2, 6
241 ic = ichar( subnam( i: i ) )
242 IF( ic.GE.225 .AND. ic.LE.250 )
243 $ subnam( i: i ) = char( ic-32 )
244 40 CONTINUE
245 END IF
246 END IF
247
248 c1 = subnam( 1: 1 )
249 sname = c1.EQ.'S' .OR. c1.EQ.'D'
250 cname = c1.EQ.'C' .OR. c1.EQ.'Z'
251 IF( .NOT.( cname .OR. sname ) )
252 $ RETURN
253 c2 = subnam( 2: 3 )
254 c3 = subnam( 4: 6 )
255 c4 = c3( 2: 3 )
256 twostage = len( subnam ).GE.11
257 $ .AND. subnam( 11: 11 ).EQ.'2'
258
259 GO TO ( 50, 60, 70 )ispec
260
261 50 CONTINUE
262
263
264
265
266
267
268
269 nb = 1
270
271 IF( subnam(2:6).EQ.'LAORH' ) THEN
272
273
274
275 IF( sname ) THEN
276 nb = 32
277 ELSE
278 nb = 32
279 END IF
280 ELSE IF( c2.EQ.'GE' ) THEN
281 IF( c3.EQ.'TRF' ) THEN
282 IF( sname ) THEN
283 nb = 64
284 ELSE
285 nb = 64
286 END IF
287 ELSE IF( c3.EQ.'QRF' .OR. c3.EQ.'RQF' .OR. c3.EQ.'LQF' .OR.
288 $ c3.EQ.'QLF' ) THEN
289 IF( sname ) THEN
290 nb = 32
291 ELSE
292 nb = 32
293 END IF
294 ELSE IF( c3.EQ.'QR ') THEN
295 IF( n3 .EQ. 1) THEN
296 IF( sname ) THEN
297
298 IF ((n1*n2.LE.131072).OR.(n1.LE.8192)) THEN
299 nb = n1
300 ELSE
301 nb = 32768/n2
302 END IF
303 ELSE
304 IF ((n1*n2.LE.131072).OR.(n1.LE.8192)) THEN
305 nb = n1
306 ELSE
307 nb = 32768/n2
308 END IF
309 END IF
310 ELSE
311 IF( sname ) THEN
312 nb = 1
313 ELSE
314 nb = 1
315 END IF
316 END IF
317 ELSE IF( c3.EQ.'LQ ') THEN
318 IF( n3 .EQ. 2) THEN
319 IF( sname ) THEN
320
321 IF ((n1*n2.LE.131072).OR.(n1.LE.8192)) THEN
322 nb = n1
323 ELSE
324 nb = 32768/n2
325 END IF
326 ELSE
327 IF ((n1*n2.LE.131072).OR.(n1.LE.8192)) THEN
328 nb = n1
329 ELSE
330 nb = 32768/n2
331 END IF
332 END IF
333 ELSE
334 IF( sname ) THEN
335 nb = 1
336 ELSE
337 nb = 1
338 END IF
339 END IF
340 ELSE IF( c3.EQ.'HRD' ) THEN
341 IF( sname ) THEN
342 nb = 32
343 ELSE
344 nb = 32
345 END IF
346 ELSE IF( c3.EQ.'BRD' ) THEN
347 IF( sname ) THEN
348 nb = 32
349 ELSE
350 nb = 32
351 END IF
352 ELSE IF( c3.EQ.'TRI' ) THEN
353 IF( sname ) THEN
354 nb = 64
355 ELSE
356 nb = 64
357 END IF
358 ELSE IF( subnam( 4: 7 ).EQ.'QP3RK' ) THEN
359 IF( sname ) THEN
360 nb = 32
361 ELSE
362 nb = 32
363 END IF
364 END IF
365 ELSE IF( c2.EQ.'PO' ) THEN
366 IF( c3.EQ.'TRF' ) THEN
367 IF( sname ) THEN
368 nb = 64
369 ELSE
370 nb = 64
371 END IF
372 END IF
373 ELSE IF( c2.EQ.'SY' ) THEN
374 IF( c3.EQ.'TRF' ) THEN
375 IF( sname ) THEN
376 IF( twostage ) THEN
377 nb = 192
378 ELSE
379 nb = 64
380 END IF
381 ELSE
382 IF( twostage ) THEN
383 nb = 192
384 ELSE
385 nb = 64
386 END IF
387 END IF
388 ELSE IF( sname .AND. c3.EQ.'TRD' ) THEN
389 nb = 32
390 ELSE IF( sname .AND. c3.EQ.'GST' ) THEN
391 nb = 64
392 END IF
393 ELSE IF( cname .AND. c2.EQ.'HE' ) THEN
394 IF( c3.EQ.'TRF' ) THEN
395 IF( twostage ) THEN
396 nb = 192
397 ELSE
398 nb = 64
399 END IF
400 ELSE IF( c3.EQ.'TRD' ) THEN
401 nb = 32
402 ELSE IF( c3.EQ.'GST' ) THEN
403 nb = 64
404 END IF
405 ELSE IF( sname .AND. c2.EQ.'OR' ) THEN
406 IF( c3( 1: 1 ).EQ.'G' ) THEN
407 IF( c4.EQ.'QR' .OR. c4.EQ.'RQ' .OR. c4.EQ.'LQ' .OR. c4.EQ.
408 $ 'QL' .OR. c4.EQ.'HR' .OR. c4.EQ.'TR' .OR. c4.EQ.'BR' )
409 $ THEN
410 nb = 32
411 END IF
412 ELSE IF( c3( 1: 1 ).EQ.'M' ) THEN
413 IF( c4.EQ.'QR' .OR. c4.EQ.'RQ' .OR. c4.EQ.'LQ' .OR. c4.EQ.
414 $ 'QL' .OR. c4.EQ.'HR' .OR. c4.EQ.'TR' .OR. c4.EQ.'BR' )
415 $ THEN
416 nb = 32
417 END IF
418 END IF
419 ELSE IF( cname .AND. c2.EQ.'UN' ) THEN
420 IF( c3( 1: 1 ).EQ.'G' ) THEN
421 IF( c4.EQ.'QR' .OR. c4.EQ.'RQ' .OR. c4.EQ.'LQ' .OR. c4.EQ.
422 $ 'QL' .OR. c4.EQ.'HR' .OR. c4.EQ.'TR' .OR. c4.EQ.'BR' )
423 $ THEN
424 nb = 32
425 END IF
426 ELSE IF( c3( 1: 1 ).EQ.'M' ) THEN
427 IF( c4.EQ.'QR' .OR. c4.EQ.'RQ' .OR. c4.EQ.'LQ' .OR. c4.EQ.
428 $ 'QL' .OR. c4.EQ.'HR' .OR. c4.EQ.'TR' .OR. c4.EQ.'BR' )
429 $ THEN
430 nb = 32
431 END IF
432 END IF
433 ELSE IF( c2.EQ.'GB' ) THEN
434 IF( c3.EQ.'TRF' ) THEN
435 IF( sname ) THEN
436 IF( n4.LE.64 ) THEN
437 nb = 1
438 ELSE
439 nb = 32
440 END IF
441 ELSE
442 IF( n4.LE.64 ) THEN
443 nb = 1
444 ELSE
445 nb = 32
446 END IF
447 END IF
448 END IF
449 ELSE IF( c2.EQ.'PB' ) THEN
450 IF( c3.EQ.'TRF' ) THEN
451 IF( sname ) THEN
452 IF( n2.LE.64 ) THEN
453 nb = 1
454 ELSE
455 nb = 32
456 END IF
457 ELSE
458 IF( n2.LE.64 ) THEN
459 nb = 1
460 ELSE
461 nb = 32
462 END IF
463 END IF
464 END IF
465 ELSE IF( c2.EQ.'TR' ) THEN
466 IF( c3.EQ.'TRI' ) THEN
467 IF( sname ) THEN
468 nb = 64
469 ELSE
470 nb = 64
471 END IF
472 ELSE IF ( c3.EQ.'EVC' ) THEN
473 IF( sname ) THEN
474 nb = 64
475 ELSE
476 nb = 64
477 END IF
478 ELSE IF( c3.EQ.'SYL' ) THEN
479
480 IF( sname ) THEN
481 nb = min( max( 48, int( ( min( n1, n2 ) * 16 ) / 100) ),
482 $ 240 )
483 ELSE
484 nb = min( max( 24, int( ( min( n1, n2 ) * 8 ) / 100) ),
485 $ 80 )
486 END IF
487 END IF
488 ELSE IF( c2.EQ.'LA' ) THEN
489 IF( c3.EQ.'UUM' ) THEN
490 IF( sname ) THEN
491 nb = 64
492 ELSE
493 nb = 64
494 END IF
495 ELSE IF( c3.EQ.'TRS' ) THEN
496 IF( sname ) THEN
497 nb = 32
498 ELSE
499 nb = 32
500 END IF
501 END IF
502 ELSE IF( sname .AND. c2.EQ.'ST' ) THEN
503 IF( c3.EQ.'EBZ' ) THEN
504 nb = 1
505 END IF
506 ELSE IF( c2.EQ.'GG' ) THEN
507 nb = 32
508 IF( c3.EQ.'HD3' ) THEN
509 IF( sname ) THEN
510 nb = 32
511 ELSE
512 nb = 32
513 END IF
514 END IF
515 END IF
517 RETURN
518
519 60 CONTINUE
520
521
522
523 nbmin = 2
524 IF( c2.EQ.'GE' ) THEN
525 IF( c3.EQ.'QRF' .OR. c3.EQ.'RQF' .OR. c3.EQ.'LQF' .OR. c3.EQ.
526 $ 'QLF' ) THEN
527 IF( sname ) THEN
528 nbmin = 2
529 ELSE
530 nbmin = 2
531 END IF
532 ELSE IF( c3.EQ.'HRD' ) THEN
533 IF( sname ) THEN
534 nbmin = 2
535 ELSE
536 nbmin = 2
537 END IF
538 ELSE IF( c3.EQ.'BRD' ) THEN
539 IF( sname ) THEN
540 nbmin = 2
541 ELSE
542 nbmin = 2
543 END IF
544 ELSE IF( c3.EQ.'TRI' ) THEN
545 IF( sname ) THEN
546 nbmin = 2
547 ELSE
548 nbmin = 2
549 END IF
550 ELSE IF( subnam( 4: 7 ).EQ.'QP3RK' ) THEN
551 IF( sname ) THEN
552 nbmin = 2
553 ELSE
554 nbmin = 2
555 END IF
556 END IF
557
558 ELSE IF( c2.EQ.'SY' ) THEN
559 IF( c3.EQ.'TRF' ) THEN
560 IF( sname ) THEN
561 nbmin = 8
562 ELSE
563 nbmin = 8
564 END IF
565 ELSE IF( sname .AND. c3.EQ.'TRD' ) THEN
566 nbmin = 2
567 END IF
568 ELSE IF( cname .AND. c2.EQ.'HE' ) THEN
569 IF( c3.EQ.'TRD' ) THEN
570 nbmin = 2
571 END IF
572 ELSE IF( sname .AND. c2.EQ.'OR' ) THEN
573 IF( c3( 1: 1 ).EQ.'G' ) THEN
574 IF( c4.EQ.'QR' .OR. c4.EQ.'RQ' .OR. c4.EQ.'LQ' .OR. c4.EQ.
575 $ 'QL' .OR. c4.EQ.'HR' .OR. c4.EQ.'TR' .OR. c4.EQ.'BR' )
576 $ THEN
577 nbmin = 2
578 END IF
579 ELSE IF( c3( 1: 1 ).EQ.'M' ) THEN
580 IF( c4.EQ.'QR' .OR. c4.EQ.'RQ' .OR. c4.EQ.'LQ' .OR. c4.EQ.
581 $ 'QL' .OR. c4.EQ.'HR' .OR. c4.EQ.'TR' .OR. c4.EQ.'BR' )
582 $ THEN
583 nbmin = 2
584 END IF
585 END IF
586 ELSE IF( cname .AND. c2.EQ.'UN' ) THEN
587 IF( c3( 1: 1 ).EQ.'G' ) THEN
588 IF( c4.EQ.'QR' .OR. c4.EQ.'RQ' .OR. c4.EQ.'LQ' .OR. c4.EQ.
589 $ 'QL' .OR. c4.EQ.'HR' .OR. c4.EQ.'TR' .OR. c4.EQ.'BR' )
590 $ THEN
591 nbmin = 2
592 END IF
593 ELSE IF( c3( 1: 1 ).EQ.'M' ) THEN
594 IF( c4.EQ.'QR' .OR. c4.EQ.'RQ' .OR. c4.EQ.'LQ' .OR. c4.EQ.
595 $ 'QL' .OR. c4.EQ.'HR' .OR. c4.EQ.'TR' .OR. c4.EQ.'BR' )
596 $ THEN
597 nbmin = 2
598 END IF
599 END IF
600 ELSE IF( c2.EQ.'GG' ) THEN
601 nbmin = 2
602 IF( c3.EQ.'HD3' ) THEN
603 nbmin = 2
604 END IF
605 END IF
607 RETURN
608
609 70 CONTINUE
610
611
612
613 nx = 0
614 IF( c2.EQ.'GE' ) THEN
615 IF( c3.EQ.'QRF' .OR. c3.EQ.'RQF' .OR. c3.EQ.'LQF' .OR. c3.EQ.
616 $ 'QLF' ) THEN
617 IF( sname ) THEN
618 nx = 128
619 ELSE
620 nx = 128
621 END IF
622 ELSE IF( c3.EQ.'HRD' ) THEN
623 IF( sname ) THEN
624 nx = 128
625 ELSE
626 nx = 128
627 END IF
628 ELSE IF( c3.EQ.'BRD' ) THEN
629 IF( sname ) THEN
630 nx = 128
631 ELSE
632 nx = 128
633 END IF
634 ELSE IF( subnam( 4: 7 ).EQ.'QP3RK' ) THEN
635 IF( sname ) THEN
636 nx = 128
637 ELSE
638 nx = 128
639 END IF
640 END IF
641 ELSE IF( c2.EQ.'SY' ) THEN
642 IF( sname .AND. c3.EQ.'TRD' ) THEN
643 nx = 32
644 END IF
645 ELSE IF( cname .AND. c2.EQ.'HE' ) THEN
646 IF( c3.EQ.'TRD' ) THEN
647 nx = 32
648 END IF
649 ELSE IF( sname .AND. c2.EQ.'OR' ) THEN
650 IF( c3( 1: 1 ).EQ.'G' ) THEN
651 IF( c4.EQ.'QR' .OR. c4.EQ.'RQ' .OR. c4.EQ.'LQ' .OR. c4.EQ.
652 $ 'QL' .OR. c4.EQ.'HR' .OR. c4.EQ.'TR' .OR. c4.EQ.'BR' )
653 $ THEN
654 nx = 128
655 END IF
656 END IF
657 ELSE IF( cname .AND. c2.EQ.'UN' ) THEN
658 IF( c3( 1: 1 ).EQ.'G' ) THEN
659 IF( c4.EQ.'QR' .OR. c4.EQ.'RQ' .OR. c4.EQ.'LQ' .OR. c4.EQ.
660 $ 'QL' .OR. c4.EQ.'HR' .OR. c4.EQ.'TR' .OR. c4.EQ.'BR' )
661 $ THEN
662 nx = 128
663 END IF
664 END IF
665 ELSE IF( c2.EQ.'GG' ) THEN
666 nx = 128
667 IF( c3.EQ.'HD3' ) THEN
668 nx = 128
669 END IF
670 END IF
672 RETURN
673
674 80 CONTINUE
675
676
677
679 RETURN
680
681 90 CONTINUE
682
683
684
686 RETURN
687
688 100 CONTINUE
689
690
691
692 ilaenv = int( real( min( n1, n2 ) )*1.6e0 )
693 RETURN
694
695 110 CONTINUE
696
697
698
700 RETURN
701
702 120 CONTINUE
703
704
705
707 RETURN
708
709 130 CONTINUE
710
711
712
713
714
716 RETURN
717
718 140 CONTINUE
719
720
721
722
726 END IF
727 RETURN
728
729 150 CONTINUE
730
731
732
733
737 END IF
738 RETURN
739
740 160 CONTINUE
741
742
743
745 RETURN
746
747
748
integer function ieeeck(ispec, zero, one)
IEEECK
integer function ilaenv(ispec, name, opts, n1, n2, n3, n4)
ILAENV
integer function iparam2stage(ispec, name, opts, ni, nbi, ibi, nxi)
IPARAM2STAGE
integer function iparmq(ispec, name, opts, n, ilo, ihi, lwork)
IPARMQ