Fixes to Processes Manager on MacOS #251
Merged
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.
Issue Number. Is this pull request related to any outstanding issues? If so, list the issue number.
#114
Describe the changes made. A clear and concise description of what the problem is and what you did to fix it. E.g. [...] was happening and I've changed [...] to fix it.
Since Python >= 3.8,
multiprocessing
defaults tospawn
on MacOS (link). Withspawn
, new processes no longer share memory with their parents, leading to cases like in #114 when WESTPA is used with theprocesses
work manager.The downside to swapping back to the
fork
method (which is the default on other Unix systems) is that might crash the whole subprocess. Currently, we suggest users to install python 3.7 on MacOS, which defaults tofork
and puts us at the same risk anyways.Added a few lines to swap to
fork
when it's on a mac since the alternative is either: 1) Rewriteprocesses
so it runs well withspawn
or 2) Not working. 1) seemed non-trivial and I think swapping back tofork
is a nice compromise.Goals and Outstanding Issues. A clear and concise list of goals (to be) accomplished.
Processes
work manager work on MacOS + Python >=3.8Major files changed.
Status.
Additional context. Add any other context or screenshots about the pull request here.