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

python3Packages.qiskit-{aer,aqua} tests take way too long #102724

Closed
jonringer opened this issue Nov 4, 2020 · 5 comments
Closed

python3Packages.qiskit-{aer,aqua} tests take way too long #102724

jonringer opened this issue Nov 4, 2020 · 5 comments

Comments

@jonringer
Copy link
Contributor

jonringer commented Nov 4, 2020

The unit tests for python packages should be ~5 mins or less on a reasonable desktop. I think they've been going for >=1hr between qiskit-aer and qiskit-aqua on my review server.

Unit tests are highly encouraged to ensure packages are still coherent as we are often "more flexible" about version bounds than most upstream packages. We don't need to be as thorough as upstream is about regressions, we just need to ensure compatibility.

cc @drewrisinger

@drewrisinger
Copy link
Contributor

@jonringer they run relatively quickly locally for me, about 5 mins each.

The issue is probably that they run relatively heavy computations/quantum simulations as part of the unit tests. I've generally disabled all tests that take longer than 10 seconds on my 2011-era desktop (i5-2500), so I don't understand how it's taking > 1 hr other than maybe some issue with multi-thread race conditions in highly parallel systems.

I'm rebuilding them locally, and will get back.

@drewrisinger
Copy link
Contributor

Qiskit-aer build log:

========== 1070 passed, 940 skipped, 98 warnings in 161.72s (0:02:41) ==========
/build/source
Finished executing pytestCheckPhase
pytestcachePhase
/nix/store/7d3pbjzxl13nprxkfpswfiipsbh4nywg-python3.8-qiskit-aer-0.6.1

Total time (nothing else running): 4m 20s

Qiskit-aqua build log:

== 1228 passed, 177 skipped, 153 deselected, 25 warnings in 188.13s (0:03:08) ==
Finished executing pytestCheckPhase
pytestcachePhase
/nix/store/yf4rpfcs5s2kjgqq6fp08kw2fy61f1aj-python3.8-qiskit-aqua-0.7.5

Total time (nothing else running): 3m 32s

@jonringer
Copy link
Contributor Author

Interesting, because I'm giving them 32 cores. However, I was maxing out the server reviewing other PRs. maybe a situation where the tests think they have more cores available than they really do?

Even in the previous issue Qiskit/qiskit-aer#892 (comment) , it took me 20 minutes with 32 cores (I guess NIX_BUILD_CORES isn't respected by nix-build, but --cores is).

@drewrisinger
Copy link
Contributor

@jonringer I pushed #100007 to fail tests that last longer than 30 seconds. If you try to review that sometime, let me know which tests fail and I'll disable them to hopefully resolve this issue.

@drewrisinger
Copy link
Contributor

Closing Post #100007, which times out the tests automatically to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants