提交 4ec4edaa authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Silence the mkl warning if we successfully find another blas linked to numpy.

上级 e5d51daf
......@@ -1170,6 +1170,7 @@ AddConfigVar('cmodule.age_thresh_use',
def default_blas_ldflags():
global numpy
warn_record = []
try:
if (hasattr(numpy.distutils, '__config__') and
numpy.distutils.__config__):
......@@ -1284,7 +1285,7 @@ def default_blas_ldflags():
import mkl # noqa
except ImportError as e:
if any([m for m in ('conda', 'Continuum') if m in sys.version]):
_logger.warning('install mkl with `conda install mkl-service`: %s', e)
warn_record.append(('install mkl with `conda install mkl-service`: %s', e))
else:
# This branch is executed if no exception was raised
if sys.platform == "win32":
......@@ -1327,6 +1328,10 @@ def default_blas_ldflags():
if res:
return res
for warn in warn_record:
_logger.warning(*warn)
del warn_record
# Some environment don't have the lib dir in LD_LIBRARY_PATH.
# So add it.
ret.extend(['-Wl,-rpath,' + l for l in
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论