mackelab/delfi

getting started example gives runtime error because of mkl version 2018

awakenting opened this issue · 1 comments

Hey,
I tried the example from the "Getting started" page and got the following runtime error:

home-path/.local/lib/python3.6/site-packages/theano/configdefaults.py in check_mkl_openmp()
   1250         import mkl
   1251         if '2018' in mkl.get_version_string():
-> 1252             raise RuntimeError('To use MKL 2018 with Theano you MUST set "MKL_THREADING_LAYER=GNU" in your environement.')
   1253     except ImportError:
   1254         raise RuntimeError("""

RuntimeError: To use MKL 2018 with Theano you MUST set "MKL_THREADING_LAYER=GNU" in your environement.

when running the following code:

from delfi.inference import Basic

inf_basic = Basic(generator=g, n_components=2, n_hiddens=[10])

which I think is related to this theano issue: Theano/Theano#6568

Downgrading to mkl 2017 via "conda install mkl=2017" solved the issue for me so maybe you want to put that into your dependencies?

Cheers,
Andrej

Thanks for reporting this. Reading up on the issue, this seems to be fixed in newer versions of NumPy. For now, I would rely on this, rather than through dependencies. Alternatively, the error can be surpressed by setting an environment variable (see Theano/Theano#6568 (comment)).