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

Possibly unreachable line in lapack.jl #1201

Open
ajinkya-k opened this issue Feb 12, 2025 · 0 comments
Open

Possibly unreachable line in lapack.jl #1201

ajinkya-k opened this issue Feb 12, 2025 · 0 comments

Comments

@ajinkya-k
Copy link
Contributor

ajinkya-k commented Feb 12, 2025

Is the following line in lapack.jl even reachable?

error("failed to converge eigenvectors:\n$(findall(!iszero, ifail))")

The call to chklapackerror(info[]) on line 4138

chklapackerror(info[])

should throw an error if any of the eigenvectors failed to converge and therefore its unlikely the if block would ever be reached.

can someone suggest a test for this? I tried a bunch of matrices from the MatrixDepot.jl packages but none of them threw any errors when running eigen.

The relevant code for context (comments with <-- mine)

# .... # 
# lapack.jl lines 4138 - 4142
            chklapackerror(info[]) 
            if any(ifail .!= 0) # <-- should be unreachable because of the line above
                # TODO: better error message / type
                error("failed to converge eigenvectors:\n$(findall(!iszero, ifail))") # <-- this line here
            end

# ... # 
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

No branches or pull requests

1 participant