-
Notifications
You must be signed in to change notification settings - Fork 114
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
Change POD default rtol and fix analyze_pickle demo for numpy master #1012
Conversation
1fc790c
to
7253cda
Compare
Looking into https://zivgitlab.uni-muenster.de/pymor/pymor/-/jobs/369546 and https://zivgitlab.uni-muenster.de/pymor/pymor/-/jobs/369541 |
If you can't quickly resolve this issue, maybe it would be better to disable the numpy git build for now? It's blocking everything else, and does not seem critical for the next release. |
The numpy git build is fine. WIth the last commit the second issue I linked should be gone. Hopeful I get the first one too in the next few hours (iterating docker builds sadly is somewhat slow). |
91f8bd0
to
e8a78ad
Compare
These problems are now out of the way. Once this PR is merged, all open PRs should rebase on master, @pymor/pymor-devs |
e8a78ad
to
2e50560
Compare
@renefritze, I have just fixed the build failure for test_project_array. Will push a fix into this branch soon. |
Codecov Report
|
Here is again the build failure I cannot reproduce (even with docker). |
Saw it and restarted. Not the time or place to block this PR for that. |
a88b3dd
to
d15cf3b
Compare
Or maybe this is the time after all since restarts didn't make it go away. I tried to replicate the other one you linked earlier. I could not. AFAICT I had eliminated sources of explicit randomness. |
I just pushed another change giving Regarding |
d15cf3b
to
50bd56b
Compare
Did you perchance notice a pattern in which runner the pipelines fail on, @sdrave ? |
local failure means on my machine. And then:
|
So in method of snapshots the eigen values output from |
So there's definitely something weird if not nondeterministic happening in |
I've tried all the applicable LAPACK drivers for @sdrave what CPU you got in your machine? |
Unless that result is actually the same for everyone? |
My first eigenvalues are 4.64099021e+01 and 6.28570143e-14, the computed tolerance is 7.425584340909018e-14 (so the first EV is actually slightly different already), so the second EV is dropped. So in my case the test succeeds, but barely. Seems like the maybe the default rtol of
I think that's ok. You should never set
That might be a possible explanation: I'm on a Core i5 760, very old stuff. The newest SIMD tech seems to be SSE 4.2. So it is very well possible, that a different code path is selected in eigh. I will check again on my laptop. |
I've tested on a Xeon E5-1630 v3, a Ryzen Pro 3700U, both fail. Could be AVX vs SSE then. http://www.cpu-world.com/Compare_CPUs/AMD_YM370BC4T4MFG,Intel_BV80605001908AN,Intel_CM8064401614501/ |
I can reproduce the failure on my Core i5-3320M, which has AVX (v1?) |
Tried it with the adjusted tolerance, got
Edit: that's different input |
Now things get even stranger. With this decorator i get an entirely different
even with docker. (I run |
Sorry, I might have had multiple failures and copied the wrong one. |
Ok. For the above hash, I don't see a test failure (on my laptop). Also I'm surprised about the error. Are you sure you have changed the right tolerance? ( |
The first few eigenvalues I get on my machine are Right now, I can't find the error analysis results for symmetric eigenvalue problem solvers, but I expect Maybe for the first failure, an easy fix would be to limit the number of modes, e.g., modes = min(len(A), A.dim, modes if modes else np.inf) I'm not sure what are the dimensions of the second failure @renefritze found. |
BTW, if someone wants to get the data for the first failure, it in A.zip, containing |
Yeah, that was not clear. If I change the |
I should correct this. I got this when using |
I'm testing the new tolerance here |
The test also fails for me and I get the two largest eigenvalues It seems like the condition number of the matrix whose eigenvalues are computed in the failing test is very high. As far as I understand we can't really expect accurate results for this kind of matrix, since error bounds depend on the condition number. I think changing the default tolerance in |
That went through OK and since we all seem to be OK with adjusting it, I cherry-picked the |
Any objections to merging this now, @pymor/pymor-devs ? |
I have changed the default rtol for |
Currently, in
analyze_picle
set_x/ylim
gets passed a 1-d array of length 1 for one of the limits, causing an error in matplotlib with the current numpy master branch. This is fixed by this PR.