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

guard against LAPACK least squares solver test failure #25287

Merged
merged 1 commit into from
Dec 30, 2017

Conversation

Sacha0
Copy link
Member

@Sacha0 Sacha0 commented Dec 27, 2017

Modify a LAPACK least squares solver test to guard against chance failure due to poor conditioning of the test matrices. Failure identified by @vtjnash in https://ci.appveyor.com/project/JuliaLang/julia/build/1.0.22839/job/gam4o5u92uhi6e5j. Best!

(Did I make the test matrices too well conditioned again, Andreas? 😉)

@Sacha0 Sacha0 added bugfix This change fixes an existing bug linear algebra Linear algebra test This change adds or pertains to unit tests labels Dec 27, 2017
@Sacha0
Copy link
Member Author

Sacha0 commented Dec 28, 2017

(AppVeyor spawn discontent appears unrelated.)

A = rand(elty,10,10)
B = rand(elty,10,10)
A = 10I + rand(elty, 10, 10)
B = 10I + rand(elty, 10, 10)
C, j = LAPACK.gelsd!(copy(A),copy(B))
D, k = LAPACK.gelsy!(copy(A),copy(B))
@test C ≈ D
Copy link
Member

@andreasnoack andreasnoack Dec 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to have @test C ≈ D rtol=eps(cond(A)) and continue to have some variation in the condition number of A.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated: forgot the eps

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers, and done! :)

@Sacha0 Sacha0 changed the title better condition LAPACK least squares solver test matrices guard against LAPACK least squares solver test failure Dec 29, 2017
@andreasnoack andreasnoack merged commit 224b40f into JuliaLang:master Dec 30, 2017
@Sacha0 Sacha0 deleted the gelsy branch December 31, 2017 02:21
@Sacha0
Copy link
Member Author

Sacha0 commented Dec 31, 2017

Thanks Andreas! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug linear algebra Linear algebra test This change adds or pertains to unit tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants