Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with pip and anaconda scipy versions due to MKL #13

Open
IngoScholtes opened this issue Sep 14, 2018 · 0 comments
Open

Problem with pip and anaconda scipy versions due to MKL #13

IngoScholtes opened this issue Sep 14, 2018 · 0 comments
Labels
bug Something isn't working external dependency

Comments

@IngoScholtes
Copy link
Contributor

From pathpy created by verginer : sg-dev/pathpy#39

The results of functions which rely on scipy linear algebra (e.g. scipy.sparse.linalg.eigen) can give significant different results depending on whether scipy was compiled with MKL (i.e. conda install) or without (i.e. pip install).

The differences in results are significant. For example from the tests:

test_eigen_centrality
...
1.7205880187995493 != 1.7461339874793727
2.007652443416882 != 2.030946758

Similarly convergence is inconsistent depending on MKL.

To make this more transparent it might be good to explicitely tell the user when using affected functions through a log message (i.e. INFO) that the results might be different if an other scipy version is used.

The following invocation will list any MKL compile time flags:

In [1]: import scipy
In [2]: scipy.show_config()

openblas_lapack_info:
  NOT AVAILABLE
mkl_info:
    libraries = ['mkl_rt', 'pthread']
    library_dirs = ['anaconda3/envs/pathpy/lib']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['anaconda3/envs/pathpy/include']
lapack_mkl_info:
    libraries = ['mkl_rt', 'pthread']
    library_dirs = ['/anaconda3/envs/pathpy/lib']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/anaconda3/envs/pathpy/include']
lapack_opt_info:
    libraries = ['mkl_rt', 'pthread']
    library_dirs = ['/anaconda3/envs/pathpy/lib']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/anaconda3/envs/pathpy/include']
blas_mkl_info:
    libraries = ['mkl_rt', 'pthread']
    library_dirs = ['/anaconda3/envs/pathpy/lib']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/anaconda3/envs/pathpy/include']
blas_opt_info:
    libraries = ['mkl_rt', 'pthread']
    library_dirs = ['/anaconda3/envs/pathpy/lib']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/anaconda3/envs/pathpy/include']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external dependency
Projects
None yet
Development

No branches or pull requests

1 participant