The LAPACK forum has moved to https://github.com/Reference-LAPACK/lapack/discussions.

a test case for convergence in zggev

Post here if you want to report a bug to the LAPACK team

a test case for convergence in zggev

Postby csliwa » Wed Nov 25, 2015 8:06 pm

In the following example, zggev fails with info = 81. Other software (Matlab, Mathematica) handles this generalized eigenproblem just fine. The test data is attached to this message as a gzip-compressed text file.


test program:

Code: Select all
program tst_zggev

implicit none

integer, parameter :: n = 120
double precision, dimension(n, n) :: aare, aaim, bbre, bbim
double complex, dimension(n, n) :: a, b

double complex, dimension(n) :: alpha, beta

double complex, dimension(n, n) :: vl, vr

integer lwork, info, i, j
double complex, allocatable, dimension(:) :: work
double precision, dimension(8*n) :: rwork

open(12, file='test_data_zggev.dat', status='old')

do i = 1, n
     read(12,*) (aare(i, j), j = 1, n)
end do
do i = 1, n
     read(12,*) (aaim(i, j), j = 1, n)
end do
do i = 1, n
     read(12,*) (bbre(i, j), j = 1, n)
end do
do i = 1, n
     read(12,*) (bbim(i, j), j = 1, n)
end do

close(12)

a = dcmplx(aare, aaim)
b = dcmplx(bbre, bbim)

allocate(work(1))
lwork = -1
call zggev('N', 'N', n, a, n, b, n, &
  alpha, beta, vl, n, vr, n, work, lwork, rwork, info)

lwork = work(1)
deallocate(work)
allocate(work(lwork))

call zggev('N', 'N', n, a, n, b, n, &
  alpha, beta, vl, n, vr, n, work, lwork, rwork, info)

deallocate(work)

do i = 1, n
   write(*,*) i, alpha(i), beta(i)
end do

if(info /= 0) then
  write(*,*) ' *** zggev returned info = ', info, ' ***'
  stop
end if

end



On x86_64-linux with gfortran I get this output (it contains NaNs and many values close to the underflow threshold):

Code: Select all
           1 (  0.0000000000000000     ,  1.2822120985183036E-312) (  0.0000000000000000     ,  0.0000000000000000     )
           2 (  1.2822228410963356E-312,  6.9533366450171176E-310) (  0.0000000000000000     ,  0.0000000000000000     )
           3 (  6.9533366450175128E-310,  6.9533366450182539E-310) (  0.0000000000000000     ,  0.0000000000000000     )
           4 (  1.2822120592005595E-312,  6.9258966919163613E-310) (  0.0000000000000000     ,  0.0000000000000000     )
           5 (  6.9533366450206748E-310,  1.2822120693091426E-312) (  0.0000000000000000     ,  0.0000000000000000     )
           6 (  6.9258968581255780E-310,  6.9258966921641846E-310) (  0.0000000000000000     ,  0.0000000000000000     )
           7 (  0.0000000000000000     ,  0.0000000000000000     ) (  0.0000000000000000     ,  0.0000000000000000     )
           8 (  6.9533366449550629E-310,  1.2823983533716167E-312) (  0.0000000000000000     ,  0.0000000000000000     )
           9 (  6.9258966920412610E-310,                      NaN) (  0.0000000000000000     ,  0.0000000000000000     )
          10 (  2.2116910495407551E-306,  1.8466197578962431E-319) (  0.0000000000000000     ,  0.0000000000000000     )
          11 (  1.0361307573072619E-317,  1.2731974746779765E-313) (  0.0000000000000000     ,  0.0000000000000000     )
          12 (  8.0482898455022389E-318,  6.9533366450151413E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          13 (  6.9533366450206748E-310,  0.0000000000000000     ) (  0.0000000000000000     ,  0.0000000000000000     )
          14 (  6.9533366449669205E-310,  1.2822533288349806E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          15 (  6.9258968581255780E-310,  1.2822120594475923E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          16 (  0.0000000000000000     ,  1.2822120985183036E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          17 (  1.2822228410963356E-312,  6.9533366450171176E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          18 (  6.9533366450175128E-310,  6.9533366450182539E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          19 (  1.2822120592005595E-312,  1.2824091132518276E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          20 (  6.9533366450206748E-310,  1.2822120693091426E-312) (  0.0000000000000000     ,  1.2822121149114017E-312)
          21 (  6.9258966921641846E-310,  0.0000000000000000     ) (  0.0000000000000000     ,  1.2822329761811307E-312)
          22 (                      NaN,  0.0000000000000000     ) (  6.9258966921641846E-310,  1.2822119772350688E-312)
          23 (  6.9533366449669205E-310,  1.2822533288349806E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          24 (  6.9258968581255780E-310,                      NaN) (  0.0000000000000000     ,  0.0000000000000000     )
          25 (  2.2116910495407551E-306,  1.3564664329756421E-313) (  0.0000000000000000     ,  0.0000000000000000     )
          26 (  0.0000000000000000     ,  0.0000000000000000     ) (  2.1219957909652723E-314,  0.0000000000000000     )
          27 (  0.0000000000000000     ,  6.9533366450151413E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          28 (  6.9533366450206748E-310,  1.4821969375237396E-323) (  0.0000000000000000     ,  0.0000000000000000     )
          29 (  6.9533366449787781E-310,  6.9258966960117208E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          30 (  6.9258968580639187E-310,  1.2822120594475923E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          31 (  0.0000000000000000     ,  1.2822120985183036E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          32 (  1.2822228410963356E-312,  6.9533366450171176E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          33 (  6.9533366450175128E-310,  6.9533366450182539E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          34 (  1.2822120592005595E-312,  1.2822662691504030E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          35 (  6.9533366450206748E-310,  1.2822120693091426E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          36 (  6.9258966921641846E-310,  0.0000000000000000     ) (  0.0000000000000000     ,  0.0000000000000000     )
          37 (                      NaN,  1.4821969375237396E-323) (  0.0000000000000000     ,  1.2822121149114017E-312)
          38 (  6.9533366449787781E-310,  6.9258966960117208E-310) (  0.0000000000000000     ,  6.9258965767539082E-310)
          39 (  6.9258968580639187E-310,                      NaN) (  6.9258966921025252E-310,  1.2822119772350688E-312)
          40 (  2.2116910495407551E-306,  3.0719294232940823E+039) (  0.0000000000000000     ,  0.0000000000000000     )
          41 (  4.7876630961956200E-299, -176.12825614410400     ) (  0.0000000000000000     ,  0.0000000000000000     )
          42 (  2.3335862621619412E-302,  2.0462379042451438E-115) (  0.0000000000000000     ,  6.9258965767544022E-310)
          43 (  1.5762006812111764E+116, -8.3448812607626921E-309) (  2.1219957909652723E-314,  0.0000000000000000     )
          44 (  2.8926829357462405E-306,  2.2601341443883833E-308) (  0.0000000000000000     ,  0.0000000000000000     )
          45 (  2.7374883038632585E-231,  6.9533366450475520E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          46 (  6.9258966921629988E-310,  0.0000000000000000     ) (  0.0000000000000000     ,  0.0000000000000000     )
          47 (  0.0000000000000000     ,  6.9533366450151413E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          48 (  6.9533366450206748E-310,  1.2822119983613159E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          49 (  0.0000000000000000     ,  6.9533366449858926E-310) (  0.0000000000000000     ,  1.2822119675760855E-312)
          50 (  6.9258966922258440E-310,  6.9533366449858926E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          51 (  3.4584595208887258E-323,  6.9258965762880043E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          52 (  1.0327289962658242E-314,  1.2822120101200782E-312) (  0.0000000000000000     ,  1.2822121149114017E-312)
          53 (  0.0000000000000000     ,  1.6136390512615074E-316) (  0.0000000000000000     ,  1.2823983533716167E-312)
          54 (  1.2731974746137480E-312,  1.2822326107701790E-312) (  6.9258966920412610E-310,  1.2822119772350688E-312)
          55 (  0.0000000000000000     ,  6.9533366450048647E-310) (  1.2822405049510683E-312,  1.2822405049510683E-312)
          56 (  1.2822326110270932E-312,  1.2822328663206937E-312) (  0.0000000000000000     ,  2.4703282292062327E-323)
          57 (                      NaN,  0.0000000000000000     ) (  1.2822508694404241E-312,  6.9258965767544022E-310)
          58 (  0.0000000000000000     ,  2.0733647632016872E-317) (  3.0273451070214357E-314,  9.0535884164181520E-315)
          59 (  1.2822228432306991E-312,                      NaN) (  7.9733499683410386E-318,  1.4821969375237396E-323)
          60 (  1.2822228331912852E-312,  0.0000000000000000     ) (  0.0000000000000000     ,  0.0000000000000000     )
          61 (  6.9258965763820744E-310,  6.9258966921641846E-310) (  0.0000000000000000     ,  1.2822119617164669E-312)
          62 (  1.2822118213178323E-312,  1.2822328678621785E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          63 (  1.2822118173060193E-312,  2.1219957909652723E-314) (  0.0000000000000000     ,  0.0000000000000000     )
          64 (  2.1219968546886078E-314,  1.2822119983613159E-312) (  0.0000000000000000     ,  0.0000000000000000     )
          65 (  1.2822228432306991E-312,  6.9533366449985407E-310) (  0.0000000000000000     ,  0.0000000000000000     )
          66 (  6.9533366450088172E-310,  6.9533366449985407E-310) (  1.2822532573980289E-312,  1.2822559084357087E-312)
          67 (  3.4584595208887258E-323,  6.9258965762880043E-310) (  1.2822558969338605E-312,  1.2822121149114017E-312)
          68 (  1.4560404209163784E-314,  1.2822119983613159E-312) (  0.0000000000000000     ,  1.2822533288349806E-312)
          69 (  0.0000000000000000     ,  6.9533366450017027E-310) (  6.9258968581255780E-310,  1.2822119772350688E-312)
          70 (  3.0138004396316039E-322,  6.9533366450017027E-310) (  1.2822662702768727E-312,  1.2822662706523625E-312)
          71 (  3.4584595208887258E-323,  6.9258965762880043E-310) (  2.6308007509754696E-318,  1.4821969375237396E-323)
          72 (  1.0327289962658242E-314,  1.2822120101200782E-312) (  0.0000000000000000     ,  6.9258965767544022E-310)
          73 (  3.4584595208887258E-323,  1.6136390512615074E-316) (  2.1221137402450353E-314,  1.2682961054304032E-314)
          74 (  3.4584595208887258E-323,  1.2822326107701790E-312) (  2.3221085354538588E-322,  1.2822120356682128E-312)
          75 (  0.0000000000000000     ,  6.9533366450206748E-310) (  1.1535049446584751E-317,  6.9258966922203104E-310)
          76 (  1.2822326110270932E-312,  1.2822328663206937E-312) (  8.3991159793011913E-323,  4.9406564584124654E-324)
          77 (  0.0000000000000000     ,  6.9533366450222558E-310) (  1.1737418735121326E-318,  0.0000000000000000     )
          78 (  1.2822326110270932E-312,  1.2822326570344861E-312) (  6.9533366449258142E-310,  1.2822120309449452E-312)
          79 (  6.9258966927550871E-310,  6.9258966938115971E-310) (  1.2822228432306991E-312,  6.9258966921641846E-310)
          80 (  6.9258968580639187E-310,  0.0000000000000000     ) (  6.9533366449258142E-310,  1.2822119664496158E-312)
          81 (  6.9258965763168577E-310,  6.9258966921641846E-310) (  6.9533366449281857E-310,  1.2822120309449452E-312)
          82 (-0.36679913600257846     , 0.95151555557447420     ) (  0.0000000000000000     ,  0.0000000000000000     )
          83 (  5.3635620347798856     , -2.6887180896169856     ) (  0.0000000000000000     ,  0.0000000000000000     )
          84 ( -5.2255764218260916     ,  2.5115522049509349     ) (  0.0000000000000000     ,  0.0000000000000000     )
          85 (-0.69554074933385701     ,  1.1292790107379436     ) (  0.0000000000000000     ,  0.0000000000000000     )
          86 ( -1.2499170188351152     ,-0.42496967210413966     ) (  0.0000000000000000     ,  0.0000000000000000     )
          87 ( 0.23156013739676259     , -1.2525985968519968     ) (  0.0000000000000000     ,  0.0000000000000000     )
          88 ( 0.53634178641097907     , 0.95476166343579560     ) (  0.0000000000000000     ,  0.0000000000000000     )
          89 (  2.4891616197472461     , -4.4411584997282683     ) (  0.0000000000000000     ,  0.0000000000000000     )
          90 ( -1.2508213078049948     ,-0.40553243496976221     ) (  0.0000000000000000     ,  0.0000000000000000     )
          91 ( 0.86291778150073994     , 0.99936131757572344     ) (  0.0000000000000000     ,  0.0000000000000000     )
          92 (-0.33538106594192163     ,  1.2290283679718581     ) (  0.0000000000000000     ,  0.0000000000000000     )
          93 (-0.14870479312814827     , -1.0144219494846529     ) (  0.0000000000000000     ,  0.0000000000000000     )
          94 ( -7.8417190068618341     , -1.2659867243148919     ) (  0.0000000000000000     ,  0.0000000000000000     )
          95 ( 0.52938014381295251     , -1.0595618077493925     ) (  0.0000000000000000     ,  0.0000000000000000     )
          96 (  1.0941553600997516     ,-0.43626314395168408     ) (  0.0000000000000000     ,  0.0000000000000000     )
          97 ( 0.91478867263213481     , 0.20021230326468334     ) (  0.0000000000000000     ,  0.0000000000000000     )
          98 ( 0.74897615800607109     , 0.12599112793863432     ) (  0.0000000000000000     ,  0.0000000000000000     )
          99 ( -4.0649053379292202     ,  7.1842613766782639     ) (  0.0000000000000000     ,  0.0000000000000000     )
         100 ( 0.31646479314242848     ,  1.1440625683824515     ) (  0.0000000000000000     ,  0.0000000000000000     )
         101 ( 0.16031109991091516     , 0.90548968075267544     ) (  0.0000000000000000     ,  0.0000000000000000     )
         102 ( -1.6553224400484461     ,  1.0227397584948714     ) (  0.0000000000000000     ,  0.0000000000000000     )
         103 (-0.94000767188207779     , 0.48277028805813177     ) (  0.0000000000000000     ,  0.0000000000000000     )
         104 ( 0.40434539605425557     ,  1.2988052889752448     ) (  0.0000000000000000     ,  0.0000000000000000     )
         105 (-0.76999155283312037     ,-0.71365322273882348     ) (  0.0000000000000000     ,  0.0000000000000000     )
         106 ( -5.1819493968129606     ,  1.3938501489127719     ) (  0.0000000000000000     ,  0.0000000000000000     )
         107 ( -4.0325672675945965     ,  3.4888404820870260     ) (  0.0000000000000000     ,  0.0000000000000000     )
         108 ( -2.2437331683559298     ,  6.3988892235115076     ) (  0.0000000000000000     ,  0.0000000000000000     )
         109 ( -1.2187588807874610     , 0.45884545633036056     ) (  0.0000000000000000     ,  0.0000000000000000     )
         110 ( -1.2751620241273796     , 0.39561921039002085     ) (  0.0000000000000000     ,  0.0000000000000000     )
         111 ( 0.13965045926558806     ,  1.1434905976007943     ) (  0.0000000000000000     ,  0.0000000000000000     )
         112 ( 0.52659800060091566     , -1.9592584222957330     ) (  0.0000000000000000     ,  0.0000000000000000     )
         113 ( -7.7187025844308768E-002,  1.2046866167592181     ) (  0.0000000000000000     ,  0.0000000000000000     )
         114 ( 0.79229804496137435     , -1.0061820724762072     ) (  0.0000000000000000     ,  0.0000000000000000     )
         115 ( -1.1963873857610794     ,-0.59553112036224654     ) (  0.0000000000000000     ,  0.0000000000000000     )
         116 (-0.27598865834838887     ,  1.3051422058799957     ) (  0.0000000000000000     ,  0.0000000000000000     )
         117 (-0.10383638219484229     , -1.2831629430057523     ) (  0.0000000000000000     ,  0.0000000000000000     )
         118 (-0.71200476744137153     , 0.71028382981532512     ) (  0.0000000000000000     ,  0.0000000000000000     )
         119 (-0.18859059882486992     ,  1.0006073946284444     ) (  0.0000000000000000     ,  0.0000000000000000     )
         120 (-0.20004708695730916     , 0.98352724212867049     ) (  0.0000000000000000     ,  0.0000000000000000     )
  *** zggev returned info =           81  ***



It would be nice if someone could help me investigate this problem, as LAPACK is my preferred linear algebra package.

Cezary Sliwa
Attachments
test_data_zggev.txt.gz
(5.7 KiB) Downloaded 404 times
csliwa
 
Posts: 1
Joined: Wed Nov 25, 2015 7:21 pm

Return to Bug report

Who is online

Users browsing this forum: No registered users and 1 guest