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

[XEB] Multiprocessing spawn #4090

Merged
merged 2 commits into from
May 13, 2021
Merged

Conversation

mpharrigan
Copy link
Collaborator

There are two multiprocessing "modes": fork and spawn. Fork used to always be the default. Now sometimes on Mac it defaults to spawn (?) but in any event: spawn works way better. This could prevent some of the c++-looking errors that @mrwojtek has seen. It fixed different-but-still-c++-looking-errors for me

@mpharrigan mpharrigan requested a review from mrwojtek May 6, 2021 21:48
@mpharrigan mpharrigan requested review from cduck, vtomole and a team as code owners May 6, 2021 21:48
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label May 6, 2021
@mrwojtek
Copy link
Collaborator

mrwojtek commented May 7, 2021

I'll test this one if it solves my isseus.

@mpharrigan
Copy link
Collaborator Author

In any event, using spawn is safer. It can be slower than fork but we use a Pool and give it plenty of work to do, so that difference should be negligible.

@mrwojtek
Copy link
Collaborator

I can confirm that strange warnings are gone!

@mpharrigan mpharrigan added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label May 13, 2021
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label May 13, 2021
@CirqBot CirqBot merged commit ce58f42 into quantumlib:master May 13, 2021
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels May 13, 2021
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
There are two multiprocessing "modes": fork and spawn. Fork used to always be the default. Now sometimes on Mac it defaults to spawn (?) but in any event: spawn works way better. This could prevent some of the c++-looking errors that @mrwojtek has seen. It fixed different-but-still-c++-looking-errors for me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/xeb cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants