wmayner / pyphi

A toolbox for integrated information theory.
https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1006343
Other
368 stars 98 forks source link

Python 3.8 multiprocessing breaks configuration system with parallelization on macOS #38

Closed wmayner closed 2 years ago

wmayner commented 4 years ago

Interactive changes to the configuration are not respected in subprocesses in Python 3.8 on macOS.

This is due to a change introduced in Python 3.8: on macOS, multiprocessing starts processes with spawn by default, instead of fork. The subprocesses no longer receive the Config object from the parent process and create their own, losing the interactive changes.

Relevant discussion on the Python bug tracker: https://bugs.python.org/issue33725