Closed andreasvarga closed 1 month ago
Looks similar to https://github.com/JuliaLang/julia/issues/40260
I cannot reproduce this
julia> A, B = load("/tmp/test_ggev.jld","A","B");
julia> eigvals(A,B)
40-element Vector{ComplexF64}:
-7.894987786961872 - 3.167355369477298im
-7.894924711217828 - 3.16753555352056im
-7.8949247112013765 - 3.1675355535141883im
-7.894861512643777 - 3.1677157151376583im
....
7.894924711197777 - 3.167535553515384im
7.8949247112438705 - 3.1675355535069936im
7.894987786948488 - 3.167355369484353im
julia> versioninfo()
Julia Version 1.7.0-DEV.931
Commit 29d5158d27* (2021-04-15 20:13 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
JULIA_LOAD_PATH = .:/home/jarl/archive_synced/scripts:
This is the version on which the failure takes place:
julia> versioninfo()
Julia Version 1.6.0
Commit f9720dc2eb (2021-03-24 12:55 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Would you mind trying it also on 1.7 nightly? There were some changes in MKL / BLAS cf MKL.jl.
Unfortunately I have no possibility to test on Julia 1.7. Let's hope the error will disapear in 1.7.
Elias Jarlebring @.***> schrieb am Do., 6. Mai 2021, 18:26:
Would you mind trying it also on 1.7 nightly? There were some changes in MKL / BLAS cf MKL.jl.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/JuliaLang/julia/issues/40492#issuecomment-833661243, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALJDHECJ3HMYOJOWV5FLGCDTMK7J5ANCNFSM427DMQTQ .
I can reproduce the failure in Julia 1.6, but it works for me in Julia 1.7:
julia> eigvals(A,B)
40-element Vector{ComplexF64}:
-7.894987786963967 - 3.1673553694860406im
-7.894924711213602 - 3.1675355535031704im
-7.894924711201402 - 3.1675355535142016im
-7.8948615126459245 - 3.1677157151462993im
-2.6434612728853852 - 1.3271419108695268im
-2.643448047371438 - 1.327006694935356im
-2.6434480473702506 - 1.3270066949335426im
-2.6434346004295546 - 1.3268714487318745im
-2.104755269168861 + 0.3121674974841139im
-2.104623878784103 + 0.31205684205486894im
-2.1046238787832072 + 0.31205684205592776im
-2.1044925457954906 + 0.31194640700815734im
-0.5759667502484053 - 2.2949494777856017im
-0.5758304237483377 - 2.293954362150927im
-0.575830423748109 - 2.2939543621510876im
-0.575692391915598 - 2.2929595029807692im
-0.14914950669611507 + 1.304475457103618im
-0.14914876709856803 + 1.3044904884775734im
-0.14914876709733502 + 1.3044904884781316im
-0.14914802717631268 + 1.3045055032652189im
0.1491480271754271 + 1.30450550326327im
0.14914876709901037 + 1.3044904884778397im
0.14914876709930827 + 1.3044904884809951im
0.14914950669459048 + 1.3044754571024302im
0.5756923919155538 - 2.292959502980632im
0.5758304237482132 - 2.293954362151071im
0.5758304237482588 - 2.2939543621510494im
0.5759667502484193 - 2.2949494777856083im
2.1044925457939017 + 0.31194640700901366im
2.104623878784881 + 0.3120568420547012im
2.1046238787852563 + 0.31205684205454237im
2.1047552691676366 + 0.3121674974848107im
2.6434346004317373 - 1.3268714487313003im
2.6434480473683797 - 1.327006694935784im
2.6434480473700557 - 1.3270066949329222im
2.6434612728864564 - 1.3271419108702713im
7.8948615126366795 - 3.1677157151337028im
7.894924711199914 - 3.1675355535202785im
7.894924711236199 - 3.1675355535178897im
7.894987786952084 - 3.1673553694778707im
I reran this example with Julia LTS version 1.6.5. On Windows, this example continues to fail. But I can confirm that with 1.7.1 it runs correctly.
In the meantime I encountered other examples of complex matrices of various sizes on which eigvals
(and of course schur
) fail with version 1.6.5. My dilemma is that, since I included the LTS version as compulsory test platform for four packages on which I am working, I am not sure if this is a wise option for me, unless such failures can still happen. I would appreciate hearing your opinions on this issue and especially knowing what perspectives exist to correct this error in 1.6.5.
I think I found the issue where the convergence problems of generalized complex eigenvalues have been discussed in the LAPACK/Julia context #477 (see also #475). I tried several of the test matrices in #475, and yes, they fail on 1.6.5.
Backport issues to Julia 1.6 are discussed in #39216 in relation to Upgrade to OpenBLAS 0.3.13, but for certain reasons, the idea has been rejected. However I had the impression from that discussion that backporting would still be possible.
The fix turned out to cause multiple other issues and so being conservative with backporting seemed to be the right choice. Now that these patches have been used for a while an no other issues have cropped up backporting them should be okay.
It's unlikely there will be a new release in the v1.6 series at this point, and v1.10 will become the new LTS soon™️ . I'm going to close this ticket as won't fix.
I encountered the following error in computing the eigenvalues of a pair of complex matrices
A
andB
, arising by a similarity transformation of a pair of Hamiltonian-skew Hamiltonian matrices. The eigenvalues should have a certain symmetry: ifλ
is a generalized eigenvalue of the pair(A,B)
, then-conj(λ)
is a generalized eigenvalue as well.To reproduce this computation, I am attaching the saved matrices in the file
test_ggev.jld
(packed in the zip-file test_ggev.zip) and the following code produces the error with Julia v1.6.0 running on a machine with Windows 10:For checking purposes, I transfered the matrices to MATLAB and obtained the following eigenvalues, which exhibit the expected symmetry:
The following computation in Julia produces approximately the same result: