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

Intel MKL FATAL ERROR upon importing Aesara on M1 Mac #909

Closed
larryshamalama opened this issue Apr 17, 2022 · 5 comments
Closed

Intel MKL FATAL ERROR upon importing Aesara on M1 Mac #909

larryshamalama opened this issue Apr 17, 2022 · 5 comments

Comments

@larryshamalama
Copy link
Contributor

Importing Aesara yields the following error due to the mkl package.

Screen Shot 2022-04-16 at 4 18 04 PM

Recreating the conda environment in environment.yml minus the mkl dependencies allows Aesara to be imported.

Given that mkl is an optional dependency, its removal altogether can be considered. Another option would be to replace it by blip as suggested by @dgerlanc

CC @brandonwillard

  • Aesara version: 2.4.0
  • Python version: 3.10.4
  • Operating system: Mac Monterey (M1)
  • How did you install Aesara: conda
@dgerlanc
Copy link
Contributor

@brandonwillard We may want to add an environment-arm.yml without the mkl dependencies.

@dgerlanc
Copy link
Contributor

I'm thinking we probably want to avoid importing MKL at all on ARM Mac if we're getting this failure on import.

@twiecki
Copy link
Contributor

twiecki commented May 31, 2022

Is MKL a dependency? I thought I had removed it from conda-forge et al. In any case, it definitely should be optional

@dgerlanc
Copy link
Contributor

dgerlanc commented May 31, 2022

I don't think it's a required dependency or my nomkl requirement here would resolve successfully.

It seems you may still be able to install MKL on OS X Arm with conda, and if it's found by aesara then Python will exit. In theory, you could also have openBLAS installed, and the symlink at ~/miniconda3/envs/aesara-dev/lib/libblas.dylib and
libcblas.dylib would determine the configured BLAS. For openBLAS, on my M1 Mac, with openBLAS configured, they both point to libopenblas_vortexp-r0.3.18.dylib (ignore the specific version as this will change with new release of openBLAS).

As far as I can tell, just having MKL present in an OS X Arm conda environment causes the interpreter to exit when aesara is imported. Granted, one shouldn't be installing MKL as it's not usable on OS X Arm, so it may not be unreasonable to raise an error if the package is found at all. However, we probably shouldn't exit the Python interpreter.

@brandonwillard
Copy link
Member

This was effectively closed by #960, but we can still do something about the error message/warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants