We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9856eb2 commit ecc8325Copy full SHA for ecc8325
doc/source/examples/setup_multiprocessing.py
@@ -5,6 +5,13 @@
5
os.environ["VECLIB_MAXIMUM_THREADS"] = "1"
6
os.environ["NUMEXPR_NUM_THREADS"] = "1"
7
8
+# I'm forcing the multiprocessing start method to 'fork' on Macs
9
+# because 'spawn' seems to cause errors with the numba code.
10
+from sys import platform
11
+if 'darwin' in platform:
12
+ import multiprocessing as mp
13
+ mp.set_start_method('fork')
14
+
15
from numba import set_num_threads, config
-config.THREADING_LAYER = 'forksafe'
-set_num_threads(1)
16
+config.THREADING_LAYER = 'safe'
17
+set_num_threads(1)
0 commit comments