78       DOUBLE PRECISION   ANRM, RCOND
 
   82       DOUBLE PRECISION   R( NMAX ), R1( NMAX ), R2( NMAX )
 
   83       COMPLEX*16         A( NMAX, NMAX ), AF( NMAX, NMAX ), B( NMAX ),
 
   84      $                   E( NMAX ), W( 2*NMAX ), X( NMAX )
 
  106       COMMON             / infoc / infot, nout, ok, lerr
 
  107       COMMON             / srnamc / srnamt
 
  110       INTRINSIC          dble, dcmplx
 
  115       WRITE( nout, fmt = * )
 
  122             a( i, j ) = dcmplx( 1.d0 / dble( i+j ),
 
  123      $                  -1.d0 / dble( i+j ) )
 
  124             af( i, j ) = dcmplx( 1.d0 / dble( i+j ),
 
  125      $                   -1.d0 / dble( i+j ) )
 
  138       IF( 
lsamen( 2, c2, 
'HE' ) ) 
THEN 
  148          CALL zhetrf( 
'/', 0, a, 1, ip, w, 1, info )
 
  149          CALL chkxer( 
'ZHETRF', infot, nout, lerr, ok )
 
  151          CALL zhetrf( 
'U', -1, a, 1, ip, w, 1, info )
 
  152          CALL chkxer( 
'ZHETRF', infot, nout, lerr, ok )
 
  154          CALL zhetrf( 
'U', 2, a, 1, ip, w, 4, info )
 
  155          CALL chkxer( 
'ZHETRF', infot, nout, lerr, ok )
 
  157          CALL zhetrf( 
'U', 0, a, 1, ip, w, 0, info )
 
  158          CALL chkxer( 
'ZHETRF', infot, nout, lerr, ok )
 
  160          CALL zhetrf( 
'U', 0, a, 1, ip, w, -2, info )
 
  161          CALL chkxer( 
'ZHETRF', infot, nout, lerr, ok )
 
  167          CALL zhetf2( 
'/', 0, a, 1, ip, info )
 
  168          CALL chkxer( 
'ZHETF2', infot, nout, lerr, ok )
 
  170          CALL zhetf2( 
'U', -1, a, 1, ip, info )
 
  171          CALL chkxer( 
'ZHETF2', infot, nout, lerr, ok )
 
  173          CALL zhetf2( 
'U', 2, a, 1, ip, info )
 
  174          CALL chkxer( 
'ZHETF2', infot, nout, lerr, ok )
 
  180          CALL zhetri( 
'/', 0, a, 1, ip, w, info )
 
  181          CALL chkxer( 
'ZHETRI', infot, nout, lerr, ok )
 
  183          CALL zhetri( 
'U', -1, a, 1, ip, w, info )
 
  184          CALL chkxer( 
'ZHETRI', infot, nout, lerr, ok )
 
  186          CALL zhetri( 
'U', 2, a, 1, ip, w, info )
 
  187          CALL chkxer( 
'ZHETRI', infot, nout, lerr, ok )
 
  193          CALL zhetri2( 
'/', 0, a, 1, ip, w, 1, info )
 
  194          CALL chkxer( 
'ZHETRI2', infot, nout, lerr, ok )
 
  196          CALL zhetri2( 
'U', -1, a, 1, ip, w, 1, info )
 
  197          CALL chkxer( 
'ZHETRI2', infot, nout, lerr, ok )
 
  199          CALL zhetri2( 
'U', 2, a, 1, ip, w, 1, info )
 
  200          CALL chkxer( 
'ZHETRI2', infot, nout, lerr, ok )
 
  206          CALL zhetri2x( 
'/', 0, a, 1, ip, w, 1, info )
 
  207          CALL chkxer( 
'ZHETRI2X', infot, nout, lerr, ok )
 
  209          CALL zhetri2x( 
'U', -1, a, 1, ip, w, 1, info )
 
  210          CALL chkxer( 
'ZHETRI2X', infot, nout, lerr, ok )
 
  212          CALL zhetri2x( 
'U', 2, a, 1, ip, w, 1, info )
 
  213          CALL chkxer( 
'ZHETRI2X', infot, nout, lerr, ok )
 
  219          CALL zhetrs( 
'/', 0, 0, a, 1, ip, b, 1, info )
 
  220          CALL chkxer( 
'ZHETRS', infot, nout, lerr, ok )
 
  222          CALL zhetrs( 
'U', -1, 0, a, 1, ip, b, 1, info )
 
  223          CALL chkxer( 
'ZHETRS', infot, nout, lerr, ok )
 
  225          CALL zhetrs( 
'U', 0, -1, a, 1, ip, b, 1, info )
 
  226          CALL chkxer( 
'ZHETRS', infot, nout, lerr, ok )
 
  228          CALL zhetrs( 
'U', 2, 1, a, 1, ip, b, 2, info )
 
  229          CALL chkxer( 
'ZHETRS', infot, nout, lerr, ok )
 
  231          CALL zhetrs( 
'U', 2, 1, a, 2, ip, b, 1, info )
 
  232          CALL chkxer( 
'ZHETRS', infot, nout, lerr, ok )
 
  238          CALL zherfs( 
'/', 0, 0, a, 1, af, 1, ip, b, 1, x, 1, r1, r2, w,
 
  240          CALL chkxer( 
'ZHERFS', infot, nout, lerr, ok )
 
  242          CALL zherfs( 
'U', -1, 0, a, 1, af, 1, ip, b, 1, x, 1, r1, r2,
 
  244          CALL chkxer( 
'ZHERFS', infot, nout, lerr, ok )
 
  246          CALL zherfs( 
'U', 0, -1, a, 1, af, 1, ip, b, 1, x, 1, r1, r2,
 
  248          CALL chkxer( 
'ZHERFS', infot, nout, lerr, ok )
 
  250          CALL zherfs( 
'U', 2, 1, a, 1, af, 2, ip, b, 2, x, 2, r1, r2, w,
 
  252          CALL chkxer( 
'ZHERFS', infot, nout, lerr, ok )
 
  254          CALL zherfs( 
'U', 2, 1, a, 2, af, 1, ip, b, 2, x, 2, r1, r2, w,
 
  256          CALL chkxer( 
'ZHERFS', infot, nout, lerr, ok )
 
  258          CALL zherfs( 
'U', 2, 1, a, 2, af, 2, ip, b, 1, x, 2, r1, r2, w,
 
  260          CALL chkxer( 
'ZHERFS', infot, nout, lerr, ok )
 
  262          CALL zherfs( 
'U', 2, 1, a, 2, af, 2, ip, b, 2, x, 1, r1, r2, w,
 
  264          CALL chkxer( 
'ZHERFS', infot, nout, lerr, ok )
 
  270          CALL zhecon( 
'/', 0, a, 1, ip, anrm, rcond, w, info )
 
  271          CALL chkxer( 
'ZHECON', infot, nout, lerr, ok )
 
  273          CALL zhecon( 
'U', -1, a, 1, ip, anrm, rcond, w, info )
 
  274          CALL chkxer( 
'ZHECON', infot, nout, lerr, ok )
 
  276          CALL zhecon( 
'U', 2, a, 1, ip, anrm, rcond, w, info )
 
  277          CALL chkxer( 
'ZHECON', infot, nout, lerr, ok )
 
  279          CALL zhecon( 
'U', 1, a, 1, ip, -anrm, rcond, w, info )
 
  280          CALL chkxer( 
'ZHECON', infot, nout, lerr, ok )
 
  282       ELSE IF( 
lsamen( 2, c2, 
'HR' ) ) 
THEN 
  290          srnamt = 
'ZHETRF_ROOK' 
  293          CALL chkxer( 
'ZHETRF_ROOK', infot, nout, lerr, ok )
 
  296          CALL chkxer( 
'ZHETRF_ROOK', infot, nout, lerr, ok )
 
  299          CALL chkxer( 
'ZHETRF_ROOK', infot, nout, lerr, ok )
 
  302          CALL chkxer( 
'ZHETRF_ROOK', infot, nout, lerr, ok )
 
  305          CALL chkxer( 
'ZHETRF_ROOK', infot, nout, lerr, ok )
 
  309          srnamt = 
'ZHETF2_ROOK' 
  312          CALL chkxer( 
'ZHETF2_ROOK', infot, nout, lerr, ok )
 
  315          CALL chkxer( 
'ZHETF2_ROOK', infot, nout, lerr, ok )
 
  318          CALL chkxer( 
'ZHETF2_ROOK', infot, nout, lerr, ok )
 
  322          srnamt = 
'ZHETRI_ROOK' 
  325          CALL chkxer( 
'ZHETRI_ROOK', infot, nout, lerr, ok )
 
  328          CALL chkxer( 
'ZHETRI_ROOK', infot, nout, lerr, ok )
 
  331          CALL chkxer( 
'ZHETRI_ROOK', infot, nout, lerr, ok )
 
  335          srnamt = 
'ZHETRS_ROOK' 
  337          CALL zhetrs_rook( 
'/', 0, 0, a, 1, ip, b, 1, info )
 
  338          CALL chkxer( 
'ZHETRS_ROOK', infot, nout, lerr, ok )
 
  340          CALL zhetrs_rook( 
'U', -1, 0, a, 1, ip, b, 1, info )
 
  341          CALL chkxer( 
'ZHETRS_ROOK', infot, nout, lerr, ok )
 
  343          CALL zhetrs_rook( 
'U', 0, -1, a, 1, ip, b, 1, info )
 
  344          CALL chkxer( 
'ZHETRS_ROOK', infot, nout, lerr, ok )
 
  346          CALL zhetrs_rook( 
'U', 2, 1, a, 1, ip, b, 2, info )
 
  347          CALL chkxer( 
'ZHETRS_ROOK', infot, nout, lerr, ok )
 
  349          CALL zhetrs_rook( 
'U', 2, 1, a, 2, ip, b, 1, info )
 
  350          CALL chkxer( 
'ZHETRS_ROOK', infot, nout, lerr, ok )
 
  354          srnamt = 
'ZHECON_ROOK' 
  356          CALL zhecon_rook( 
'/', 0, a, 1, ip, anrm, rcond, w, info )
 
  357          CALL chkxer( 
'ZHECON_ROOK', infot, nout, lerr, ok )
 
  359          CALL zhecon_rook( 
'U', -1, a, 1, ip, anrm, rcond, w, info )
 
  360          CALL chkxer( 
'ZHECON_ROOK', infot, nout, lerr, ok )
 
  362          CALL zhecon_rook( 
'U', 2, a, 1, ip, anrm, rcond, w, info )
 
  363          CALL chkxer( 
'ZHECON_ROOK', infot, nout, lerr, ok )
 
  365          CALL zhecon_rook( 
'U', 1, a, 1, ip, -anrm, rcond, w, info )
 
  366          CALL chkxer( 
'ZHECON_ROOK', infot, nout, lerr, ok )
 
  368       ELSE IF( 
lsamen( 2, c2, 
'HK' ) ) 
THEN 
  382          CALL zhetrf_rk( 
'/', 0, a, 1, e, ip, w, 1, info )
 
  383          CALL chkxer( 
'ZHETRF_RK', infot, nout, lerr, ok )
 
  385          CALL zhetrf_rk( 
'U', -1, a, 1, e, ip, w, 1, info )
 
  386          CALL chkxer( 
'ZHETRF_RK', infot, nout, lerr, ok )
 
  388          CALL zhetrf_rk( 
'U', 2, a, 1, e, ip, w, 4, info )
 
  389          CALL chkxer( 
'ZHETRF_RK', infot, nout, lerr, ok )
 
  391          CALL zhetrf_rk( 
'U', 0, a, 1, e, ip, w, 0, info )
 
  392          CALL chkxer( 
'ZHETRF_RK', infot, nout, lerr, ok )
 
  394          CALL zhetrf_rk( 
'U', 0, a, 1, e, ip, w, -2, info )
 
  395          CALL chkxer( 
'ZHETRF_RK', infot, nout, lerr, ok )
 
  401          CALL zhetf2_rk( 
'/', 0, a, 1, e, ip, info )
 
  402          CALL chkxer( 
'ZHETF2_RK', infot, nout, lerr, ok )
 
  404          CALL zhetf2_rk( 
'U', -1, a, 1, e, ip, info )
 
  405          CALL chkxer( 
'ZHETF2_RK', infot, nout, lerr, ok )
 
  407          CALL zhetf2_rk( 
'U', 2, a, 1, e, ip, info )
 
  408          CALL chkxer( 
'ZHETF2_RK', infot, nout, lerr, ok )
 
  414          CALL zhetri_3( 
'/', 0, a, 1, e, ip, w, 1, info )
 
  415          CALL chkxer( 
'ZHETRI_3', infot, nout, lerr, ok )
 
  417          CALL zhetri_3( 
'U', -1, a, 1, e, ip, w, 1, info )
 
  418          CALL chkxer( 
'ZHETRI_3', infot, nout, lerr, ok )
 
  420          CALL zhetri_3( 
'U', 2, a, 1, e, ip, w, 1, info )
 
  421          CALL chkxer( 
'ZHETRI_3', infot, nout, lerr, ok )
 
  423          CALL zhetri_3( 
'U', 0, a, 1, e, ip, w, 0, info )
 
  424          CALL chkxer( 
'ZHETRI_3', infot, nout, lerr, ok )
 
  426          CALL zhetri_3( 
'U', 0, a, 1, e, ip, w, -2, info )
 
  427          CALL chkxer( 
'ZHETRI_3', infot, nout, lerr, ok )
 
  433          CALL zhetri_3x( 
'/', 0, a, 1, e, ip, w, 1, info )
 
  434          CALL chkxer( 
'ZHETRI_3X', infot, nout, lerr, ok )
 
  436          CALL zhetri_3x( 
'U', -1, a, 1, e, ip, w, 1, info )
 
  437          CALL chkxer( 
'ZHETRI_3X', infot, nout, lerr, ok )
 
  439          CALL zhetri_3x( 
'U', 2, a, 1, e, ip, w, 1, info )
 
  440          CALL chkxer( 
'ZHETRI_3X', infot, nout, lerr, ok )
 
  446          CALL zhetrs_3( 
'/', 0, 0, a, 1, e, ip, b, 1, info )
 
  447          CALL chkxer( 
'ZHETRS_3', infot, nout, lerr, ok )
 
  449          CALL zhetrs_3( 
'U', -1, 0, a, 1, e, ip, b, 1, info )
 
  450          CALL chkxer( 
'ZHETRS_3', infot, nout, lerr, ok )
 
  452          CALL zhetrs_3( 
'U', 0, -1, a, 1, e, ip, b, 1, info )
 
  453          CALL chkxer( 
'ZHETRS_3', infot, nout, lerr, ok )
 
  455          CALL zhetrs_3( 
'U', 2, 1, a, 1, e, ip, b, 2, info )
 
  456          CALL chkxer( 
'ZHETRS_3', infot, nout, lerr, ok )
 
  458          CALL zhetrs_3( 
'U', 2, 1, a, 2, e, ip, b, 1, info )
 
  459          CALL chkxer( 
'ZHETRS_3', infot, nout, lerr, ok )
 
  465          CALL zhecon_3( 
'/', 0, a, 1,  e, ip, anrm, rcond, w, info )
 
  466          CALL chkxer( 
'ZHECON_3', infot, nout, lerr, ok )
 
  468          CALL zhecon_3( 
'U', -1, a, 1, e, ip, anrm, rcond, w, info )
 
  469          CALL chkxer( 
'ZHECON_3', infot, nout, lerr, ok )
 
  471          CALL zhecon_3( 
'U', 2, a, 1, e, ip, anrm, rcond, w, info )
 
  472          CALL chkxer( 
'ZHECON_3', infot, nout, lerr, ok )
 
  474          CALL zhecon_3( 
'U', 1, a, 1, e, ip, -1.0d0, rcond, w, info)
 
  475          CALL chkxer( 
'ZHECON_3', infot, nout, lerr, ok )
 
  480       ELSE IF( 
lsamen( 2, c2, 
'HA' ) ) 
THEN 
  486          CALL zhetrf_aa( 
'/', 0, a, 1, ip, w, 1, info )
 
  487          CALL chkxer( 
'ZHETRF_AA', infot, nout, lerr, ok )
 
  489          CALL zhetrf_aa( 
'U', -1, a, 1, ip, w, 1, info )
 
  490          CALL chkxer( 
'ZHETRF_AA', infot, nout, lerr, ok )
 
  492          CALL zhetrf_aa( 
'U', 2, a, 1, ip, w, 4, info )
 
  493          CALL chkxer( 
'ZHETRF_AA', infot, nout, lerr, ok )
 
  495          CALL zhetrf_aa( 
'U', 0, a, 1, ip, w, 0, info )
 
  496          CALL chkxer( 
'ZHETRF_AA', infot, nout, lerr, ok )
 
  498          CALL zhetrf_aa( 
'U', 0, a, 1, ip, w, -2, info )
 
  499          CALL chkxer( 
'ZHETRF_AA', infot, nout, lerr, ok )
 
  505          CALL zhetrs_aa( 
'/', 0, 0, a, 1, ip, b, 1, w, 1, info )
 
  506          CALL chkxer( 
'ZHETRS_AA', infot, nout, lerr, ok )
 
  508          CALL zhetrs_aa( 
'U', -1, 0, a, 1, ip, b, 1, w, 1, info )
 
  509          CALL chkxer( 
'ZHETRS_AA', infot, nout, lerr, ok )
 
  511          CALL zhetrs_aa( 
'U', 0, -1, a, 1, ip, b, 1, w, 1, info )
 
  512          CALL chkxer( 
'ZHETRS_AA', infot, nout, lerr, ok )
 
  514          CALL zhetrs_aa( 
'U', 2, 1, a, 1, ip, b, 2, w, 1, info )
 
  515          CALL chkxer( 
'ZHETRS_AA', infot, nout, lerr, ok )
 
  517          CALL zhetrs_aa( 
'U', 2, 1, a, 2, ip, b, 1, w, 1, info )
 
  518          CALL chkxer( 
'ZHETRS_AA', infot, nout, lerr, ok )
 
  520          CALL zhetrs_aa( 
'U', 0, 1, a, 1, ip, b, 1, w, 0, info )
 
  521          CALL chkxer( 
'ZHETRS_AA', infot, nout, lerr, ok )
 
  523          CALL zhetrs_aa( 
'U', 0, 1, a, 1, ip, b, 1, w, -2, info )
 
  524          CALL chkxer( 
'ZHETRS_AA', infot, nout, lerr, ok )
 
  526       ELSE IF( 
lsamen( 2, c2, 
'S2' ) ) 
THEN 
  533          srnamt = 
'ZHETRF_AA_2STAGE' 
  535          CALL zhetrf_aa_2stage( 
'/', 0, a, 1, a, 1, ip, ip, w, 1,
 
  537          CALL chkxer( 
'ZHETRF_AA_2STAGE', infot, nout, lerr, ok )
 
  539          CALL zhetrf_aa_2stage( 
'U', -1, a, 1, a, 1, ip, ip, w, 1,
 
  541          CALL chkxer( 
'ZHETRF_AA_2STAGE', infot, nout, lerr, ok )
 
  543          CALL zhetrf_aa_2stage( 
'U', 2, a, 1, a, 2, ip, ip, w, 1,
 
  545          CALL chkxer( 
'ZHETRF_AA_2STAGE', infot, nout, lerr, ok )
 
  547          CALL zhetrf_aa_2stage( 
'U', 2, a, 2, a, 1, ip, ip, w, 1,
 
  549          CALL chkxer( 
'ZHETRF_AA_2STAGE', infot, nout, lerr, ok )
 
  551          CALL zhetrf_aa_2stage( 
'U', 2, a, 2, a, 8, ip, ip, w, 0,
 
  553          CALL chkxer( 
'ZHETRF_AA_2STAGE', infot, nout, lerr, ok )
 
  557          srnamt = 
'ZHETRS_AA_2STAGE' 
  561          CALL chkxer( 
'ZHETRS_AA_2STAGE', infot, nout, lerr, ok )
 
  565          CALL chkxer( 
'ZHETRS_AA_2STAGE', infot, nout, lerr, ok )
 
  569          CALL chkxer( 
'ZHETRS_AA_2STAGE', infot, nout, lerr, ok )
 
  573          CALL chkxer( 
'ZHETRS_AA_2STAGE', infot, nout, lerr, ok )
 
  577          CALL chkxer( 
'ZHETRS_AA_2STAGE', infot, nout, lerr, ok )
 
  581          CALL chkxer( 
'ZHETRS_AA_STAGE', infot, nout, lerr, ok )
 
  583       ELSE IF( 
lsamen( 2, c2, 
'HP' ) ) 
THEN 
  593          CALL zhptrf( 
'/', 0, a, ip, info )
 
  594          CALL chkxer( 
'ZHPTRF', infot, nout, lerr, ok )
 
  596          CALL zhptrf( 
'U', -1, a, ip, info )
 
  597          CALL chkxer( 
'ZHPTRF', infot, nout, lerr, ok )
 
  603          CALL zhptri( 
'/', 0, a, ip, w, info )
 
  604          CALL chkxer( 
'ZHPTRI', infot, nout, lerr, ok )
 
  606          CALL zhptri( 
'U', -1, a, ip, w, info )
 
  607          CALL chkxer( 
'ZHPTRI', infot, nout, lerr, ok )
 
  613          CALL zhptrs( 
'/', 0, 0, a, ip, b, 1, info )
 
  614          CALL chkxer( 
'ZHPTRS', infot, nout, lerr, ok )
 
  616          CALL zhptrs( 
'U', -1, 0, a, ip, b, 1, info )
 
  617          CALL chkxer( 
'ZHPTRS', infot, nout, lerr, ok )
 
  619          CALL zhptrs( 
'U', 0, -1, a, ip, b, 1, info )
 
  620          CALL chkxer( 
'ZHPTRS', infot, nout, lerr, ok )
 
  622          CALL zhptrs( 
'U', 2, 1, a, ip, b, 1, info )
 
  623          CALL chkxer( 
'ZHPTRS', infot, nout, lerr, ok )
 
  629          CALL zhprfs( 
'/', 0, 0, a, af, ip, b, 1, x, 1, r1, r2, w, r,
 
  631          CALL chkxer( 
'ZHPRFS', infot, nout, lerr, ok )
 
  633          CALL zhprfs( 
'U', -1, 0, a, af, ip, b, 1, x, 1, r1, r2, w, r,
 
  635          CALL chkxer( 
'ZHPRFS', infot, nout, lerr, ok )
 
  637          CALL zhprfs( 
'U', 0, -1, a, af, ip, b, 1, x, 1, r1, r2, w, r,
 
  639          CALL chkxer( 
'ZHPRFS', infot, nout, lerr, ok )
 
  641          CALL zhprfs( 
'U', 2, 1, a, af, ip, b, 1, x, 2, r1, r2, w, r,
 
  643          CALL chkxer( 
'ZHPRFS', infot, nout, lerr, ok )
 
  645          CALL zhprfs( 
'U', 2, 1, a, af, ip, b, 2, x, 1, r1, r2, w, r,
 
  647          CALL chkxer( 
'ZHPRFS', infot, nout, lerr, ok )
 
  653          CALL zhpcon( 
'/', 0, a, ip, anrm, rcond, w, info )
 
  654          CALL chkxer( 
'ZHPCON', infot, nout, lerr, ok )
 
  656          CALL zhpcon( 
'U', -1, a, ip, anrm, rcond, w, info )
 
  657          CALL chkxer( 
'ZHPCON', infot, nout, lerr, ok )
 
  659          CALL zhpcon( 
'U', 1, a, ip, -anrm, rcond, w, info )
 
  660          CALL chkxer( 
'ZHPCON', infot, nout, lerr, ok )
 
  665       CALL alaesm( path, ok, nout )