[Bug]: PyBaMM fails to import when user has already imported a library that uses mp.set_start_method
#3997
Labels
bug
Something isn't working
mp.set_start_method
#3997
PyBaMM Version
develop
Python Version
3.11
Describe the bug
PyBaMM fails to import when importing a library that uses multiprocessing and has already set the start method to something other than fork, as a result of #3975. This should be apparent when reading the documentation for
mp.set_start_method
Pending a long-term solution, I think that #3975 should at least have
mp.set_start_method
wrapped in a try-except -- most people, most of the time, do not really need the multiprocessing functionality, and I don't think pybamm should force those users to modify their multiprocessing configuration. It can throw a warning saying multiprocessing is not available or whatever.Other solutions are welcome, of course.
Steps to Reproduce
module
thing
:script:
Relevant log output
The text was updated successfully, but these errors were encountered: