ContinuumIO / anaconda-issues

Anaconda issue tracking
648 stars 224 forks source link

Intel MKL Warning on ARM M1 (2021)- MacOs Ventura 13.5 #13236

Open EliaSavino opened 1 year ago

EliaSavino commented 1 year ago

Checklist

Impacted product

What happened?

In conda environment conda issues the following error: Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.

It happens when the script is loading the unittest tests. It seems like conda is not able to run Rosetta?

Expected behavior or outcome

The tests should run without MKL warnings

Conda info

active environment : REDACTED
    active env location : /Users/REDACTED/opt/anaconda3/envs/REDACTED
            shell level : 2
       user config file : /Users/REDACTED/.condarc
 populated config files : /Users/REDACTED/.condarc
          conda version : 23.1.0
    conda-build version : 3.23.3
         python version : 3.10.9.final.0
       virtual packages : __archspec=1=x86_64
                          __osx=10.16=0
                          __unix=0=0
       base environment : /Users/REDACTED/opt/anaconda3  (writable)
      conda av data dir : /Users/REDACTED/opt/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/REDACTED/opt/anaconda3/pkgs
                          /Users/REDACTED/.conda/pkgs
       envs directories : /Users/REDACTED/opt/anaconda3/envs
                          /Users/REDACTED/.conda/envs
               platform : osx-64
             user-agent : conda/23.1.0 requests/2.28.1 CPython/3.10.9 Darwin/22.6.0 OSX/10.16
                UID:GID : 501:20
             netrc file : None
           offline mode : False

Conda config

==> /Users/REDACTED/.condarc <==
ssl_verify: True
channels:
  - defaults

Conda list

# packages in environment at /Users/REDACTED/opt/anaconda3/envs/REDACTED:
#
# Name                    Version                   Build  Channel
appdirs                   1.4.4              pyhd3eb1b0_0    defaults
blas                      1.0                         mkl    defaults
bottleneck                1.3.5           py311hb9e55a9_0    defaults
brotlipy                  0.7.0           py311h6c40b1e_1002    defaults
bzip2                     1.0.8                h1de35cc_0    defaults
ca-certificates           2023.05.30           hecd8cb5_0    defaults
certifi                   2023.7.22       py311hecd8cb5_0    defaults
cffi                      1.15.1          py311h6c40b1e_3    defaults
charset-normalizer        2.0.4              pyhd3eb1b0_0    defaults
contourpy                 1.1.0                    pypi_0    pypi
cryptography              41.0.2          py311h3b477ad_0    defaults
cycler                    0.11.0                   pypi_0    pypi
et_xmlfile                1.1.0           py311hecd8cb5_0    defaults
fonttools                 4.41.1                   pypi_0    pypi
idna                      3.4             py311hecd8cb5_0    defaults
intel-openmp              2023.1.0         ha357a0b_43547    defaults
joblib                    1.2.0           py311hecd8cb5_0    defaults
kiwisolver                1.4.4                    pypi_0    pypi
libcxx                    14.0.6               h9765a3e_0    defaults
libffi                    3.4.4                hecd8cb5_0    defaults
libgfortran               5.0.0           11_3_0_hecd8cb5_28    defaults
libgfortran5              11.3.0              h9dfd629_28    defaults
llvm-openmp               14.0.6               h0dcd299_0    defaults
matplotlib                3.7.2                    pypi_0    pypi
mkl                       2023.1.0         h59209a4_43558    defaults
mkl-service               2.4.0           py311h6c40b1e_1    defaults
mkl_fft                   1.3.6           py311hdb55bb0_1    defaults
mkl_random                1.2.2           py311hdb55bb0_1    defaults
ncurses                   6.4                  hcec6c5f_0    defaults
nmrglue                   0.9                      pypi_0    pypi
numexpr                   2.8.4           py311h728a8a3_1    defaults
numpy                     1.25.0          py311h728a8a3_0    defaults
numpy-base                1.25.0          py311h53bf9ac_0    defaults
openpyxl                  3.0.10          py311h6c40b1e_0    defaults
openssl                   3.0.9                hca72f7f_0    defaults
packaging                 23.0            py311hecd8cb5_0    defaults
pandas                    1.5.3           py311hc5848a5_0    defaults
pillow                    10.0.0                   pypi_0    pypi
pip                       23.2.1          py311hecd8cb5_0    defaults
pooch                     1.4.0              pyhd3eb1b0_0    defaults
pycparser                 2.21               pyhd3eb1b0_0    defaults
pyopenssl                 23.2.0          py311hecd8cb5_0    defaults
pyparsing                 3.0.9                    pypi_0    pypi
pysocks                   1.7.1           py311hecd8cb5_0    defaults
python                    3.11.4               hf27a42d_0    defaults
python-dateutil           2.8.2              pyhd3eb1b0_0    defaults
pytz                      2022.7          py311hecd8cb5_0    defaults
readline                  8.2                  hca72f7f_0    defaults
requests                  2.31.0          py311hecd8cb5_0    defaults
scikit-learn              1.2.2           py311hcec6c5f_0    defaults
scipy                     1.10.1          py311h224febf_1    defaults
setuptools                68.0.0          py311hecd8cb5_0    defaults
six                       1.16.0             pyhd3eb1b0_1    defaults
sqlite                    3.41.2               h6c40b1e_0    defaults
tbb                       2021.8.0             ha357a0b_0    defaults
threadpoolctl             2.2.0              pyh0d69192_0    defaults
tk                        8.6.12               h5d9f67b_0    defaults
tzdata                    2023c                h04d1e81_0    defaults
urllib3                   1.26.16         py311hecd8cb5_0    defaults
wheel                     0.38.4          py311hecd8cb5_0    defaults
xz                        5.4.2                h6c40b1e_0    defaults
zlib                      1.2.13               h4dc903c_0    defaults

Additional information

I redacted any sensitive info in the paths, however just assume that the installation was defaulted. The issue only arose very recently

mcg1969 commented 1 year ago

Just to double-check, are you deliberately running osx-64 builds for a particular reason, and not osx-arm64 native builds?

mcg1969 commented 1 year ago

I can reproduce this rather readily by installing an osx-64 environment.

CONDA_SUBDIR=osx-64 conda create -n osx64test pandas

This yields:

Python 3.11.4 (main, Jul  5 2023, 08:41:25) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.
Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.

On the other hand, the same environment creation without the CONDA_SUBDIR override offers no such warning:

(osxarm64test) m1mbp:anaconda-mirror mgrant$ python
Python 3.11.4 (main, Jul  5 2023, 08:40:20) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> 

I am inclined to blame an interaction between Rosetta and Intel's MKL, which is likely unavoidable—except by avoiding Rosetta altogether.

EliaSavino commented 1 year ago

Hello!

First thank you for the swift reply. I am not running osx-64 builds on purpose, I have been just building the environment as default.

edit: after a bit of testing It seems that my conda takes as the default subdir osx-64 instead of osx-arm64. Is there a way of fixing this?

mcg1969 commented 1 year ago

It looks like you've downloaded the osx-64 version of Anaconda. The permanent fix is for you to replace it with an osx-arm64 version instead. If you go to the download page (https://www.anaconda.com/), you'll be able to select which version you obtain—the M1/M2 version is the correct one! Unfortunately, it's not easy for browsers to detect whether or not you are running an Intel or ARM processor.

EliaSavino commented 1 year ago

Thank you for your help. It was such a noob mistake on my side ;)

annieco29 commented 12 months ago

This helped me out! Thank you!

skhaleefah commented 3 months ago

I have accidentally installed the osx-64 version instead of the osx-arm64 version on my MBP M3 pro. Is there a way to globally change the platform? Right now I've been setting the platform for every environment using conda activate env followed by conda config --env --set subdir osx-arm64 which seems to do the trick but I don't want to have to keep doing this. Is there a quick way to fix this installation mistake? Or do I have to uninstall conda as a whole (losing all environments in the process) and reinstalling the correct version from their website?