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

macos-latest passes with warnings #2357

Open
purva-thakre opened this issue May 9, 2024 · 2 comments
Open

macos-latest passes with warnings #2357

purva-thakre opened this issue May 9, 2024 · 2 comments
Assignees
Labels
monitor-for-external-solution Tracking issues caused by external packages

Comments

@purva-thakre
Copy link
Contributor

purva-thakre commented May 9, 2024

Noticed the following 66 warnings in a macos-latest workflow run.

https://github.com/unitaryfund/mitiq/actions/runs/9006365923/job/24743744344#step:6:4149

image

I don't think this is fixable on our end. Created this issue to look up the source of the error later.

@purva-thakre
Copy link
Contributor Author

purva-thakre commented May 10, 2024

From what I could find, this appears to be an issue with ARM macos devices. numpy relies on BLAS and LAPACK libraries. There's a bug in OpenBLAS LAPACK. numpy/numpy#22025 (comment)

Qiskit/qiskit#10248 (comment)

I don't have access to a mac and I don't really know a lot about the differences between macos devices on ARM and Intel architectures. For this reason, I can't tell if this is something we should keep track of or will get fixed when the linked numpy issue is closed.

Feel free to close this issue.

@cosenal cosenal self-assigned this May 10, 2024
@cosenal
Copy link
Contributor

cosenal commented May 12, 2024

I can reproduce it on my M2 Pro.

(mitiqenv) ➜  mitiq git:(main) ✗ py.test -r w mitiq/benchmarks/tests/test_mirror_qv_circuits.py
================================================================================================ test session starts =================================================================================================
platform darwin -- Python 3.11.8, pytest-8.0.0, pluggy-1.4.0
rootdir: /Users/cosenal/Coding/unitaryfund/mitiq
configfile: pyproject.toml
plugins: cov-5.0.0, anyio-4.3.0, xdist-3.0.2, dash-2.16.1
collected 17 items

mitiq/benchmarks/tests/test_mirror_qv_circuits.py .................                                                                                                                                            [100%]

================================================================================================== warnings summary ==================================================================================================
mitiq/benchmarks/tests/test_mirror_qv_circuits.py: 18 warnings
  /opt/miniconda3/envs/mitiqenv/lib/python3.11/site-packages/numpy/linalg/linalg.py:2180: RuntimeWarning: divide by zero encountered in det
    r = _umath_linalg.det(a, signature=signature)

mitiq/benchmarks/tests/test_mirror_qv_circuits.py: 18 warnings
  /opt/miniconda3/envs/mitiqenv/lib/python3.11/site-packages/numpy/linalg/linalg.py:2180: RuntimeWarning: invalid value encountered in det
    r = _umath_linalg.det(a, signature=signature)

Environment info

(mitiqenv) ➜  mitiq git:(main) ✗ pip list | grep numpy
numpy                           1.26.4
(mitiqenv) ➜  mitiq git:(main) ✗ python -c "import numpy, threadpoolctl, pprint; \
pprint.pprint(threadpoolctl.threadpool_info())"

[{'architecture': 'armv8',
  'filepath': '/opt/miniconda3/envs/mitiqenv/lib/python3.11/site-packages/numpy/.dylibs/libopenblas64_.0.dylib',
  'internal_api': 'openblas',
  'num_threads': 12,
  'prefix': 'libopenblas',
  'threading_layer': 'pthreads',
  'user_api': 'blas',
  'version': '0.3.23.dev'}]

I propose we keep this open as a reminder to update the dependency whenever the upstream numpy/openblas issue is resolved.

@cosenal cosenal added the monitor-for-external-solution Tracking issues caused by external packages label May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
monitor-for-external-solution Tracking issues caused by external packages
Projects
None yet
Development

No branches or pull requests

2 participants