Closed AngusMingare closed 10 months ago
This is a known issue. We are considering moving to the ray
library , this should fix the problem and may give other benefits too (due to shared objs not being pickled).
Fixed in final pull requests: #151 and #153
Description
Several places in Symmer use multiprocessing in the following way:
New process are created in one of two ways:
Minimal example
Running Symmer on MacOS Monterey (Apple M1 chip), I encountered this problem trying to run the code in notebook 2.2 as a local python script after cloning the Symmer repo to my local machine.
Suggested fixes
Ensuring all experiments run using Symmer are contained in the
idiom will prevent the top-level script being executed when it is imported to the spawned process stopping the infinite loop issue. This should then be documented in Symmer.
Alternatively, it's possible to force the new process to fork by using:
This also fixes the issue without requiring the above if name == main idiom. However this may be bad practice (?). It would also need to be tested on Windows OS.