GalSim-developers / GalSim

The modular galaxy image simulation toolkit. Documentation:
http://galsim-developers.github.io/GalSim/
Other
224 stars 105 forks source link

Use the fork context explicitly in some places where spawn fails #1116

Closed rmjarvis closed 3 years ago

rmjarvis commented 3 years ago

This addresses issue #1112. @erykoff pointed out that some uses of multiprocessing, especially in the config layer, fails when using a 'spawn' context. Some versions of Python 3.8 (notable MacOS) have made that the default, so they fail. Linux still seems to use 'fork' as the default, so the CI tests of 3.8 have been passing.

Anyway, it's probably best to be explicit about our use of 'fork' where necessary, so I added context stuff in various places to use 'fork' where it was necessary for the unit tests in python 3.8 on my Mac to pass.

This PR is directed at the releases/2.2 branch. This is in support of issue #1115 to make a 2.2.5 release that works in Python 3.8. I'll cherry pick it over to main after merging.