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

MKL unexpected behaviour in numpy.linalg.inv returning different values in successive calls with same input data #11023

Closed
4 tasks done
leobiec opened this issue Nov 4, 2021 · 2 comments
Labels
locked [bot] locked due to inactivity off-topic not related to project, discussion is spam, or is otherwise nonsensical

Comments

@leobiec
Copy link

leobiec commented Nov 4, 2021

Checklist

  • I added a descriptive title
  • I searched for other issues and couldn't find a solution or duplication
  • I already searched in Google and didn't find any good information or help
  • I looked at the docs and didn't see anything to help

What happened?

MKL unexpected behavior in numpy.linalg.inv returning different values in successive calls with same input data

When calling numpy.linalg.inv in a conda environment with numpy installed via conda, I get a matrix with some nan elements.
Besides that, immediate call to the same function with the same input data returns a non nan matrix.

If I test the same script in an environment where numpy is installed via pip this doesn't happen.

Issue created for Numpy in: numpy/numpy#20233

Conda info

No response

Conda config

conda config --show
add_anaconda_token: True
add_pip_as_python_dependency: True
aggressive_update_packages:
  - ca-certificates
  - certifi
  - openssl
allow_conda_downgrades: False
allow_cycles: True
allow_non_channel_urls: False
allow_softlinks: False
always_copy: False
always_softlink: False
always_yes: None
anaconda_upload: None
auto_activate_base: True
auto_stack: 0
auto_update_conda: True
bld_path:
changeps1: True
channel_alias: https://conda.anaconda.org
channel_priority: flexible
channels:
  - defaults
client_ssl_cert: None
client_ssl_cert_key: None
clobber: False
conda_build: {}
create_default_packages: []
croot: C:\Users\lbieczynski\conda-bld
custom_channels:
  pkgs/main: https://repo.anaconda.com
  pkgs/r: https://repo.anaconda.com
  pkgs/msys2: https://repo.anaconda.com
  pkgs/pro: https://repo.anaconda.com
custom_multichannels:
  defaults:
    - https://repo.anaconda.com/pkgs/main
    - https://repo.anaconda.com/pkgs/r
    - https://repo.anaconda.com/pkgs/msys2
  local:
debug: False
default_channels:
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - https://repo.anaconda.com/pkgs/msys2
default_python: 3.8
default_threads: None
deps_modifier: not_set
dev: False
disallowed_packages: []
download_only: False
dry_run: False
enable_private_envs: False
env_prompt: ({default_env})
envs_dirs:
  - C:\Users\lbieczynski\.conda\envs
  - C:\ProgramData\Anaconda3\envs
  - C:\Users\lbieczynski\AppData\Local\conda\conda\envs
error_upload_url: https://conda.io/conda-post/unexpected-error
execute_threads: 1
extra_safety_checks: False
force: False
force_32bit: False
force_reinstall: False
force_remove: False
ignore_pinned: False
json: False
local_repodata_ttl: 1
migrated_channel_aliases: []
migrated_custom_channels: {}
non_admin_enabled: True
notify_outdated_conda: True
offline: False
override_channels_enabled: True
path_conflict: clobber
pinned_packages: []
pip_interop_enabled: False
pkgs_dirs:
  - C:\ProgramData\Anaconda3\pkgs
  - C:\Users\lbieczynski\.conda\pkgs
  - C:\Users\lbieczynski\AppData\Local\conda\conda\pkgs
proxy_servers: {}
quiet: False
remote_backoff_factor: 1
remote_connect_timeout_secs: 9.15
remote_max_retries: 3
remote_read_timeout_secs: 60.0
repodata_fns:
  - current_repodata.json
  - repodata.json
repodata_threads: None
report_errors: None
restore_free_channel: False
rollback_enabled: True
root_prefix: C:\ProgramData\Anaconda3
safety_checks: warn
sat_solver: pycosat
separate_format_cache: False
shortcuts: True
show_channel_urls: None
signing_metadata_url_base: None
solver_ignore_timestamps: False
ssl_verify: True
subdir: win-64
subdirs:
  - win-64
  - noarch
target_prefix_override:
track_features: []
unsatisfiable_hints: True
unsatisfiable_hints_check_depth: 2
update_modifier: update_specs
use_index_cache: False
use_local: False
use_only_tar_bz2: False
verbosity: 0
verify_threads: 1
whitelist_channels: []

Conda list

conda list
# Name                    Version                   Build  Channel
argon2-cffi               20.1.0           py38h2bbff1b_1    defaults
async_generator           1.10               pyhd3eb1b0_0    defaults
attrs                     21.2.0             pyhd3eb1b0_0    defaults
backcall                  0.2.0              pyhd3eb1b0_0    defaults
blas                      1.0                         mkl    defaults
bleach                    4.0.0              pyhd3eb1b0_0    defaults
brotli                    1.0.9                ha925a31_2    defaults
ca-certificates           2021.10.26           haa95532_2    defaults
certifi                   2021.10.8        py38haa95532_0    defaults
cffi                      1.14.6           py38h2bbff1b_0    defaults
colorama                  0.4.4              pyhd3eb1b0_0    defaults
cycler                    0.10.0                   py38_0    defaults
debugpy                   1.4.1            py38hd77b12b_0    defaults
decorator                 5.1.0              pyhd3eb1b0_0    defaults
defusedxml                0.7.1              pyhd3eb1b0_0    defaults
entrypoints               0.3                      py38_0    defaults
fonttools                 4.25.0             pyhd3eb1b0_0    defaults
freetype                  2.10.4               hd328e21_0    defaults
icc_rt                    2019.0.0             h0cc432a_1    defaults
icu                       58.2                 ha925a31_3    defaults
importlib-metadata        4.8.1            py38haa95532_0    defaults
importlib_metadata        4.8.1                hd3eb1b0_0    defaults
intel-openmp              2021.4.0          haa95532_3556    defaults
ipykernel                 6.4.1            py38haa95532_1    defaults
ipython                   7.29.0           py38hd4e2768_0    defaults
ipython_genutils          0.2.0              pyhd3eb1b0_1    defaults
ipywidgets                7.6.5              pyhd3eb1b0_1    defaults
jedi                      0.18.0           py38haa95532_1    defaults
jinja2                    3.0.2              pyhd3eb1b0_0    defaults
jpeg                      9d                   h2bbff1b_0    defaults
jsonschema                3.2.0              pyhd3eb1b0_2    defaults
jupyter                   1.0.0                    py38_7    defaults
jupyter_client            7.0.1              pyhd3eb1b0_0    defaults
jupyter_console           6.4.0              pyhd3eb1b0_0    defaults
jupyter_core              4.8.1            py38haa95532_0    defaults
jupyterlab_pygments       0.1.2                      py_0    defaults
jupyterlab_widgets        1.0.0              pyhd3eb1b0_1    defaults
kiwisolver                1.3.1            py38hd77b12b_0    defaults
libpng                    1.6.37               h2a8f88b_0    defaults
libtiff                   4.2.0                hd0e1b90_0    defaults
libwebp                   1.2.0                h2bbff1b_0    defaults
lz4-c                     1.9.3                h2bbff1b_1    defaults
m2w64-gcc-libgfortran     5.3.0                         6    defaults
m2w64-gcc-libs            5.3.0                         7    defaults
m2w64-gcc-libs-core       5.3.0                         7    defaults
m2w64-gmp                 6.1.0                         2    defaults
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    defaults
markupsafe                2.0.1            py38h2bbff1b_0    defaults
matplotlib                3.4.3            py38haa95532_0    defaults
matplotlib-base           3.4.3            py38h49ac443_0    defaults
matplotlib-inline         0.1.2              pyhd3eb1b0_2    defaults
mistune                   0.8.4           py38he774522_1000    defaults
mkl                       2021.4.0           haa95532_640    defaults
mkl-service               2.4.0            py38h2bbff1b_0    defaults
mkl_fft                   1.3.1            py38h277e83a_0    defaults
mkl_random                1.2.2            py38hf11a4ad_0    defaults
msys2-conda-epoch         20160418                      1    defaults
munkres                   1.1.4                      py_0    defaults
nbclient                  0.5.3              pyhd3eb1b0_0    defaults
nbconvert                 6.1.0            py38haa95532_0    defaults
nbformat                  5.1.3              pyhd3eb1b0_0    defaults
nest-asyncio              1.5.1              pyhd3eb1b0_0    defaults
notebook                  6.4.5            py38haa95532_0    defaults
numpy                     1.21.2           py38hfca59bb_0    defaults
numpy-base                1.21.2           py38h0829f74_0    defaults
olefile                   0.46               pyhd3eb1b0_0    defaults
openssl                   1.1.1l               h2bbff1b_0    defaults
packaging                 21.0               pyhd3eb1b0_0    defaults
pandocfilters             1.4.3            py38haa95532_1    defaults
parso                     0.8.2              pyhd3eb1b0_0    defaults
pickleshare               0.7.5           pyhd3eb1b0_1003    defaults
pillow                    8.4.0            py38hd45dc43_0    defaults
pip                       21.0.1           py38haa95532_0    defaults
prometheus_client         0.11.0             pyhd3eb1b0_0    defaults
prompt-toolkit            3.0.20             pyhd3eb1b0_0    defaults
prompt_toolkit            3.0.20               hd3eb1b0_0    defaults
pycparser                 2.20                       py_2    defaults
pygments                  2.10.0             pyhd3eb1b0_0    defaults
pyparsing                 3.0.4              pyhd3eb1b0_0    defaults
pyqt                      5.9.2            py38ha925a31_4    defaults
pyrsistent                0.17.3           py38he774522_0    defaults
python                    3.8.12               h6244533_0    defaults
python-dateutil           2.8.2              pyhd3eb1b0_0    defaults
pywin32                   228              py38hbaba5e8_1    defaults
pywinpty                  0.5.7                    py38_0    defaults
pyzmq                     22.2.1           py38hd77b12b_1    defaults
qt                        5.9.7            vc14h73c81de_0    defaults
qtconsole                 5.1.1              pyhd3eb1b0_0    defaults
qtpy                      1.10.0             pyhd3eb1b0_0    defaults
scipy                     1.7.1            py38hbe87c03_2    defaults
send2trash                1.8.0              pyhd3eb1b0_1    defaults
setuptools                58.0.4           py38haa95532_0    defaults
sip                       4.19.13          py38ha925a31_0    defaults
six                       1.16.0             pyhd3eb1b0_0    defaults
sqlite                    3.36.0               h2bbff1b_0    defaults
terminado                 0.9.4            py38haa95532_0    defaults
testpath                  0.5.0              pyhd3eb1b0_0    defaults
tk                        8.6.11               h2bbff1b_0    defaults
tornado                   6.1              py38h2bbff1b_0    defaults
traitlets                 5.1.0              pyhd3eb1b0_0    defaults
vc                        14.2                 h21ff451_1    defaults
vs2015_runtime            14.27.29016          h5e58377_2    defaults
wcwidth                   0.2.5              pyhd3eb1b0_0    defaults
webencodings              0.5.1                    py38_1    defaults
wheel                     0.37.0             pyhd3eb1b0_1    defaults
widgetsnbextension        3.5.1                    py38_0    defaults
wincertstore              0.2              py38haa95532_2    defaults
winpty                    0.4.3                         4    defaults
xz                        5.2.5                h62dcd97_0    defaults
zipp                      3.6.0              pyhd3eb1b0_0    defaults
zlib                      1.2.11               h62dcd97_4    defaults
zstd                      1.4.9                h19a0ad4_0    defaults

Additional Context

No response

@bnavigator
Copy link

See discussion in numpy/numpy#20233. Conda's main repo linalg libraries need a fix. MKL and OpenBLAS.

@kenodegard kenodegard added off-topic not related to project, discussion is spam, or is otherwise nonsensical and removed type::bug describes erroneous operation, use severity::* to classify the type labels Nov 19, 2021
@kenodegard
Copy link
Contributor

This appears to be an issue with the numpy package, not conda itself. I would encourage reporting this to https://github.com/ContinuumIO/anaconda-issues/.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Nov 22, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity off-topic not related to project, discussion is spam, or is otherwise nonsensical
Projects
None yet
Development

No branches or pull requests

3 participants