Repository navigation
Conversation
The divide-and-conquer algorithm of `syevd` is faster than the MRRR algorithm of `syevr` to compute all the eigenvectors, especially when the eigenvalues are clustered, e.g., in the scaling of interior-point methods for semidefinite programs near the central path. Eigenvalues and eigenvectors of a symmetric `801 × 801` matrix with the eigenvalues `1 + δ * randn()` and 10 BLAS threads: | Spectrum | syevr | syevd | |---|---|---| | exp10.(range(-8, 2)) | 42.2 ms | 32.1 ms | | δ = 1e-1 | 75.4 ms | 35.9 ms | | δ = 1e-3 | 72.7 ms | 34.4 ms | | δ = 1e-6 | 75.3 ms | 34.1 ms |
This was referenced Nov 5, 2026
blegat
added a commit
to blegat/LowRankOpt.jl
that referenced
this pull request
Nov 9, 2026
* Use syevd for the eigenvectors of EigenWorkspace The divide-and-conquer algorithm of `syevd` is about twice as fast as the MRRR algorithm of `syevr` to compute all eigenvectors when the eigenvalues are clustered, as for the NT scaling of Loraine near the central path, where `X Z ≈ μ I`. `LAPACK.syevd!` allocates its work arrays until FastLapackInterface supports `syevd!` with a preallocated workspace. Eigenvalues and eigenvectors of a symmetric `801 × 801` matrix with the eigenvalues `1 + δ * randn()` and 10 BLAS threads: | Spectrum | syevr | syevd | |---|---|---| | exp10.(range(-8, 2)) | 42.2 ms | 32.1 ms | | δ = 1e-1 | 75.4 ms | 35.9 ms | | δ = 1e-3 | 72.7 ms | 34.4 ms | | δ = 1e-6 | 75.3 ms | 34.1 ms | Total time with Loraine (kit=0 unless specified): | Problem | syevr | syevd | |---|---|---| | theta1 | 0.33 s | 0.33 s | | control1 | 0.32 s | 0.32 s | | tru9 | 9.1 s | 8.9 s | | vib9 | 29.6 s | 29.4 s | | vib9, kit=1 | 2.1 s | 2.0 s | | maxG11 | 5.5 s | 5.1 s | | thetaG11 | 7.1 s | 5.7 s | | thetaG51 (first 4 iterations) | 7.3 s | 7.1 s | * Allocation-free syevd until FastLapackInterface supports it `LinearAlgebra.LAPACK.syevd!` allocates its eigenvalues and work arrays, which made the iterations of Loraine allocate 1280 B. Call `dsyevd` and `ssyevd` directly with work arrays stored in `EigenWorkspace`, resized by the first call. The branch `bl/fli_syevd` replaces this with `FastLapackInterface.syevd!` from DynareJulia/FastLapackInterface.jl#55 once it is released.
blegat
added a commit
to blegat/LowRankOpt.jl
that referenced
this pull request
Nov 9, 2026
Replace the direct calls to `dsyevd` and `ssyevd` by `syevd!` of FastLapackInterface, added by DynareJulia/FastLapackInterface.jl#55. The compat assumes that it is released as 2.2; adjust it to the version that contains it before merging.
Author
|
@MichelJuillard @svillemot kind reminder :) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needed in blegat/LowRankOpt.jl#107. It seems to fit quite well within this package so I'm contributing it here instead of adding it in LowRankOpt, let me know if the contribution makes sense.