Don't enable multiprocessing by default on Python 3.9 #6524
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
We've recently been hitting a slew of job timeouts in python 3.9 CI jobs
recently. This was originally reported in #6188 but the frequency of
these timeouts have spiked since #6270 merged which added sympy to the
default mulitprocessing path (for pickling symengine expressions by
first converting it to a sympy expression). Trying to debug this locally
is tricky but when I've reproduced it seems to be just hanging
indefinitely on pickling. I think whatever is causing the issue as
reported in #6188 was just made worse by adding a sympy import to the
pickling process (assuming there is a parameter expression in the
circuit). To workaround this issue until we can come up with a solution
for whatever is causing things to hang this commit disables
multiprocessing on python 3.9 by default (it can still be enabled by
users if they desire.
Details and comments