Skip to content

Commit 7488ebe

Browse files
committed
DOC: site.cfg: warn against OpenBLAS and multiprocessing
Fixes numpy#654 by not fixing it; I don't think NumPy *can* actually fix the problem as it's a design flaw in Python's multiprocessing. Listed various alternatives (Python 3.4 forkserver, single-threaded OpenBLAS, Python threading).
1 parent 4b4796a commit 7488ebe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

site.cfg.example

+11
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@
8383
# for your configuration (in the following example we installed OpenBLAS with
8484
# ``make install PREFIX=/opt/OpenBLAS``.
8585
#
86+
# **Warning**: OpenBLAS, by default, is built in multithreaded mode. Due to the
87+
# way Python's multiprocessing is implemented, a multithreaded OpenBLAS can
88+
# cause programs using both to hang as soon as a worker process is forked on
89+
# POSIX systems (Linux, Mac). Python 3.4 will introduce a new feature in
90+
# multiprocessing, called the "forkserver", which solves this problem. For
91+
# older versions, either compile OpenBLAS with multithreading turned off or
92+
# use Python threads instead of multiprocessing.
93+
# (This problem does not exist with multithreaded ATLAS.)
94+
#
95+
# http://docs.python.org/3.4/library/multiprocessing.html#contexts-and-start-methods
96+
#
8697
# [openblas]
8798
# libraries = openblas
8899
# library_dirs = /opt/OpenBLAS/lib

0 commit comments

Comments
 (0)