Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tridiagonal eigensolver for x86 ubuntu machine #97

Merged
merged 99 commits into from
Sep 9, 2022
Merged

Conversation

smataigne
Copy link
Collaborator

@smataigne smataigne commented Aug 30, 2022

Solve failing check on x86 ubuntu machine.

smataigne and others added 30 commits August 12, 2022 20:15
@codecov
Copy link

codecov bot commented Aug 30, 2022

Codecov Report

Base: 88.09% // Head: 88.17% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (68f0f2b) compared to base (839097b).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #97      +/-   ##
==========================================
+ Coverage   88.09%   88.17%   +0.07%     
==========================================
  Files           9        9              
  Lines        1344     1353       +9     
==========================================
+ Hits         1184     1193       +9     
  Misses        160      160              
Impacted Files Coverage Δ
src/skeweigen.jl 97.42% <100.00%> (+0.10%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@smataigne smataigne changed the title higher iteration limit Fix tridiagonal eigensolver for x86 ubuntu machine Aug 30, 2022
@smataigne
Copy link
Collaborator Author

@stevengj , the tests fail for the Julia 1.6 - ubuntu-latest - x86 machine because the algorithm doesn't converge and I don't find why. Do you have any idea of what could be the reason of this?

@stevengj
Copy link
Member

Maybe your tolerance is too low for the convergence, and it's just hitting that because the roundoff errors are slightly different?

@stevengj
Copy link
Member

stevengj commented Sep 5, 2022

You might want to look at the tolerances and convergence tests used by @andreasnoack in https://github.com/JuliaLinearAlgebra/GenericLinearAlgebra.jl/blob/master/src/eigenSelfAdjoint.jl

In particular, notice that it checks convergence by comparing the magnitude of the off-diagonal elements to the adjacent diagonal elements, not the norm of the whole matrix: https://github.com/JuliaLinearAlgebra/GenericLinearAlgebra.jl/blob/85e6867cb3b64e12e651e9e5cccc8b9385bb89cc/src/eigenSelfAdjoint.jl#L177

@smataigne
Copy link
Collaborator Author

smataigne commented Sep 5, 2022

You might want to look at the tolerances and convergence tests used by @andreasnoack in https://github.com/JuliaLinearAlgebra/GenericLinearAlgebra.jl/blob/master/src/eigenSelfAdjoint.jl

In particular, notice that it checks convergence by comparing the magnitude of the off-diagonal elements to the adjacent diagonal elements, not the norm of the whole matrix: https://github.com/JuliaLinearAlgebra/GenericLinearAlgebra.jl/blob/85e6867cb3b64e12e651e9e5cccc8b9385bb89cc/src/eigenSelfAdjoint.jl#L177

Thank you very much for the references! As I am travelling until 9th september, I will fix this issue at the end of the week.

@smataigne
Copy link
Collaborator Author

smataigne commented Sep 9, 2022

You might want to look at the tolerances and convergence tests used by @andreasnoack in https://github.com/JuliaLinearAlgebra/GenericLinearAlgebra.jl/blob/master/src/eigenSelfAdjoint.jl

In particular, notice that it checks convergence by comparing the magnitude of the off-diagonal elements to the adjacent diagonal elements, not the norm of the whole matrix: https://github.com/JuliaLinearAlgebra/GenericLinearAlgebra.jl/blob/85e6867cb3b64e12e651e9e5cccc8b9385bb89cc/src/eigenSelfAdjoint.jl#L177

@stevengj I found the origin of the error, it is not a problem of stopping criterion, however I changed it in a similar way to the references. The error is due to zero eigenvalues. I assumed that eigenvalues always came in pairs, but it is not the case for zero eigenvalues with my current shift. The assumption was however very convenient for the final complex transformation to get the eigenvectors from the matrix that transform into the real Schur form. I try the different solutions available, I think I will simply modify the shift to make appear pairs of zeroes at the end if any.

@smataigne smataigne merged commit f767d60 into main Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants