Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2943c43

Browse files
committed
Merge pull request #4191 from juliantaylor/openblas-info
BUG: get_info('openblas') does not read libraries key
2 parents 997f65e + 8a4ff79 commit 2943c43

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

numpy/distutils/system_info.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ def _check_libs(self, lib_dirs, libs, opt_libs, exts):
703703
else:
704704
found_libs = self._lib_list(lib_dirs, libs, exts)
705705
found_dirs = [lib_dirs]
706-
if len(found_libs) == len(libs):
706+
if len(found_libs) > 0 and len(found_libs) == len(libs):
707707
info = {'libraries': found_libs, 'library_dirs': found_dirs}
708708
# Now, check for optional libraries
709709
if is_sequence(lib_dirs):
@@ -1565,7 +1565,9 @@ class openblas_info(blas_info):
15651565
def calc_info(self):
15661566
lib_dirs = self.get_lib_dirs()
15671567

1568-
openblas_libs = self.get_libs('openblas_libs', self._lib_names)
1568+
openblas_libs = self.get_libs('libraries', self._lib_names)
1569+
if openblas_libs == self._lib_names: # backward compat with 1.8.0
1570+
openblas_libs = self.get_libs('openblas_libs', self._lib_names)
15691571
info = self.check_libs(lib_dirs, openblas_libs, [])
15701572
if info is None:
15711573
return

site.cfg.example

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,17 @@
8686
# **Warning**: OpenBLAS, by default, is built in multithreaded mode. Due to the
8787
# way Python's multiprocessing is implemented, a multithreaded OpenBLAS can
8888
# 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.
89+
# POSIX systems (Linux, Mac).
90+
# This is fixed in Openblas 0.2.9 for the pthread build, the OpenMP build using
91+
# GNU openmp is as of gcc-4.9 not fixed yet.
92+
# Python 3.4 will introduce a new feature in multiprocessing, called the
93+
# "forkserver", which solves this problem. For older versions, make sure
94+
# OpenBLAS is built using pthreads or use Python threads instead of
95+
# multiprocessing.
9396
# (This problem does not exist with multithreaded ATLAS.)
9497
#
9598
# http://docs.python.org/3.4/library/multiprocessing.html#contexts-and-start-methods
99+
# https://github.com/xianyi/OpenBLAS/issues/294
96100
#
97101
# [openblas]
98102
# libraries = openblas

0 commit comments

Comments
 (0)