-
Notifications
You must be signed in to change notification settings - Fork 621
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 failing steadystate tests #1694
Conversation
@Ericgig I've started this branch specifically to tackle the strange steadystate (and other) test failures. |
I think we finally have a concrete error and it's rather mystifying to me how it can happen:
See https://github.com/qutip/qutip/runs/3966808806?check_suite_focus=true#step:6:1646 |
Only 3.9 seems to fails so migrate all test there.
Tests sometime passes and sometime don't, 1) If it is to fail, I want it to always fail. 2) Are tries independent? 3) Does size matter?
Tests seems to pass or fail together. Maybe there is a conflict with some VM configuration or cpus. So I am storing cpu, ram, and distribution info.
Distribution info fail, not pytest.
@Ericgig tracked this issue down to only occuring on numpy 1.21.X (and not 1.20.X) on CI workers with certain Intel CPUs (8171 and 8272). There are a number of changes in numpy 1.21 which could have caused this, but it might take awhile to track down. The plan from here is to make a small PR for some of the tiny clean-ups from here that seem good to have anyway, and then to create a new PR off of master to try get us back onto 1.21.X somehow (probably this will require a numpy fix, but maybe there is another work around). |
Minimal script to reproduce the error that only uses numpy:
|
Numpy bug report -- numpy/numpy#20356 |
Even smaller script for reproducing the issue: a = np.diag([1+0j, 1])
np.exp(0)
x = np.linalg.det(a) |
@hodgestar do we close this now or do we wait for numpy's fix to be on conda. |
@Ericgig I'm happy to leave this open until a new numpy is released and we can update the version of numpy used in CI tests. Probably also good to have an issue open in case users encounter this in the wild. |
The bug fix is scheduled to be included in numpy 1.22.0 -- https://github.com/numpy/numpy/milestone/93. |
Description
We have steadystate tests that fail almost always in CI on Python 3.9 with OpenMP and MKL, and sometimes with just Python 3.9 and MKL.
Issue is currently hard to reproduce locally.
Related issues or PRs
Progress so far
--count=100
on the steadystate tests in the hopes of reproducing the bug locally.Only set method in pseudo_inverse if one is explicitly defined.(revert)Changelog
TODO: Write the changelog once we understand properly what is going on.