Commit 60253d78 authored by André Anjos's avatar André Anjos 💬

Merge branch 'no-numpy-lookup' into 'master'

Search system for lapack and blas first before looking into numpy

Closes #4

See merge request !6
parents 843fff63 734d2459
Pipeline #6622 passed with stages
in 5 minutes and 9 seconds
.. vim: set fileencoding=utf-8 : .. vim: set fileencoding=utf-8 :
.. Thu 11 Aug 2016 09:34:29 CEST .. Thu 11 Aug 2016 09:34:29 CEST
.. image:: http://img.shields.io/badge/docs-stable-yellow.png .. image:: http://img.shields.io/badge/docs-stable-yellow.svg
:target: http://pythonhosted.org/bob.math/index.html :target: http://pythonhosted.org/bob.math/index.html
.. image:: http://img.shields.io/badge/docs-latest-orange.png .. image:: http://img.shields.io/badge/docs-latest-orange.svg
:target: https://www.idiap.ch/software/bob/docs/latest/bob/bob.math/master/index.html :target: https://www.idiap.ch/software/bob/docs/latest/bob/bob.math/master/index.html
.. image:: https://gitlab.idiap.ch/bob/bob.math/badges/master/build.svg .. image:: https://gitlab.idiap.ch/bob/bob.math/badges/master/build.svg
:target: https://gitlab.idiap.ch/bob/bob.math/commits/master :target: https://gitlab.idiap.ch/bob/bob.math/commits/master
.. image:: https://img.shields.io/badge/gitlab-project-0000c0.svg .. image:: https://img.shields.io/badge/gitlab-project-0000c0.svg
:target: https://gitlab.idiap.ch/bob/bob.math :target: https://gitlab.idiap.ch/bob/bob.math
.. image:: http://img.shields.io/pypi/v/bob.math.png .. image:: http://img.shields.io/pypi/v/bob.math.svg
:target: https://pypi.python.org/pypi/bob.math :target: https://pypi.python.org/pypi/bob.math
.. image:: http://img.shields.io/pypi/dm/bob.math.png .. image:: http://img.shields.io/pypi/dm/bob.math.svg
:target: https://pypi.python.org/pypi/bob.math :target: https://pypi.python.org/pypi/bob.math
...@@ -42,5 +42,5 @@ development `mailing list`_. ...@@ -42,5 +42,5 @@ development `mailing list`_.
.. Place your references here: .. Place your references here:
.. _bob: https://www.idiap.ch/software/bob .. _bob: https://www.idiap.ch/software/bob
.. _installation: https://gitlab.idiap.ch/bob/bob/wikis/Installation .. _installation: https://www.idiap.ch/software/bob/install
.. _mailing list: https://groups.google.com/forum/?fromgroups#!forum/bob-devel .. _mailing list: https://www.idiap.ch/software/bob/discuss
...@@ -43,7 +43,7 @@ def gsvd_relations(A,B): ...@@ -43,7 +43,7 @@ def gsvd_relations(A,B):
def test_first_case(): def test_first_case():
""" """
Testing the first scenario: Testing the first scenario of gsvd:
M-K-L >= 0 (check http://www.netlib.org/lapack/explore-html/d1/d7e/group__double_g_esing_ga4a187519e5c71da3b3f67c85e9baf0f2.html#ga4a187519e5c71da3b3f67c85e9baf0f2) M-K-L >= 0 (check http://www.netlib.org/lapack/explore-html/d1/d7e/group__double_g_esing_ga4a187519e5c71da3b3f67c85e9baf0f2.html#ga4a187519e5c71da3b3f67c85e9baf0f2)
""" """
...@@ -55,7 +55,7 @@ def test_first_case(): ...@@ -55,7 +55,7 @@ def test_first_case():
def test_second_case(): def test_second_case():
""" """
Testing the second scenario: Testing the second scenario of gsvd:
M-K-L < 0 (check http://www.netlib.org/lapack/explore-html/d1/d7e/group__double_g_esing_ga4a187519e5c71da3b3f67c85e9baf0f2.html#ga4a187519e5c71da3b3f67c85e9baf0f2) M-K-L < 0 (check http://www.netlib.org/lapack/explore-html/d1/d7e/group__double_g_esing_ga4a187519e5c71da3b3f67c85e9baf0f2.html#ga4a187519e5c71da3b3f67c85e9baf0f2)
""" """
......
...@@ -50,13 +50,13 @@ ...@@ -50,13 +50,13 @@
.. _python: http://www.python.org .. _python: http://www.python.org
.. _pypi: http://pypi.python.org .. _pypi: http://pypi.python.org
.. _qt4: http://qt.nokia.com/ .. _qt4: http://qt.nokia.com/
.. _satellite packages: https://gitlab.idiap.ch/bob/bob/wikis/Packages .. _satellite packages: https://www.idiap.ch/software/bob/packages
.. _scipy: http://www.scipy.org .. _scipy: http://www.scipy.org
.. _setuptools: http://trac.edgewall.org/wiki/setuptools .. _setuptools: http://trac.edgewall.org/wiki/setuptools
.. _sphinx: http://sphinx.pocoo.org .. _sphinx: http://sphinx.pocoo.org
.. _sqlalchemy: http://www.sqlalchemy.org/ .. _sqlalchemy: http://www.sqlalchemy.org/
.. _sqlite: http://www.sqlite.org/ .. _sqlite: http://www.sqlite.org/
.. _submit a new bug report: https://groups.google.com/forum/?fromgroups#!forum/bob-devel .. _submit a new bug report: https://www.idiap.ch/software/bob/issues
.. _torch 3 vision: http://torch3vision.idiap.ch .. _torch 3 vision: http://torch3vision.idiap.ch
.. _torch 3: http://www.torch.ch .. _torch 3: http://www.torch.ch
.. _torch 5: http://torch5.sourceforge.net .. _torch 5: http://torch5.sourceforge.net
......
...@@ -69,6 +69,12 @@ math_flags = dict( ...@@ -69,6 +69,12 @@ math_flags = dict(
for key in math_flags: for key in math_flags:
math_flags[key] = uniq(lapack_flags.get(key, []) + blas_flags.get(key, [])) math_flags[key] = uniq(lapack_flags.get(key, []) + blas_flags.get(key, []))
# checks if those libraries actually exist
found_all = all([find_library(lib, prefixes=math_flags.get('library_dirs'))
for lib in math_flags['libraries']])
if not found_all:
math_flags['libraries'] = []
# checks if any libraries are being linked, otherwise we # checks if any libraries are being linked, otherwise we
# search through the filesystem in stock locations. # search through the filesystem in stock locations.
if not math_flags['libraries']: if not math_flags['libraries']:
...@@ -84,6 +90,11 @@ if not math_flags['libraries']: ...@@ -84,6 +90,11 @@ if not math_flags['libraries']:
# tries first to find an MKL implementation # tries first to find an MKL implementation
lapack = find_library('mkl_lapack64') lapack = find_library('mkl_lapack64')
if not lapack:
# if that fails, go for openblas
lapack = find_library('openblas')
if not lapack: if not lapack:
# if that fails, go for the default implementation # if that fails, go for the default implementation
lapack = find_library('lapack', subpaths=['sse2', '']) lapack = find_library('lapack', subpaths=['sse2', ''])
...@@ -94,6 +105,11 @@ if not math_flags['libraries']: ...@@ -94,6 +105,11 @@ if not math_flags['libraries']:
# tries first to find an MKL implementation # tries first to find an MKL implementation
blas = find_library('mkl') blas = find_library('mkl')
if not blas:
# if that fails, go for openblas
blas = find_library('openblas')
if not blas: if not blas:
# if that fails, go for the default implementation of cblas # if that fails, go for the default implementation of cblas
blas = find_library('cblas', subpaths=['sse2', '']) blas = find_library('cblas', subpaths=['sse2', ''])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment