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 ARM wheel OpenMP version may default to x86 instead of ARM #151

Closed
mlxd opened this issue Sep 23, 2021 · 1 comment
Closed

MacOS ARM wheel OpenMP version may default to x86 instead of ARM #151

mlxd opened this issue Sep 23, 2021 · 1 comment

Comments

@mlxd
Copy link
Member

mlxd commented Sep 23, 2021

It may be possible that the libomp binary installed from Brew on MacOS runners does not respect the target architecture of the machine.

@mlxd mlxd changed the title MacOs ARM wheel OpenMP version may default to x86 instead of ARM MacOS ARM wheel OpenMP version may default to x86 instead of ARM Sep 23, 2021
@KetpuntoG
Copy link

KetpuntoG commented Nov 8, 2021

When I tried to pass the tests with my Mac (ARM) I got the following message

guille@MacBook-Pro-de-Guillermo pennylane % pl-device-test --device=lightning.qubit --tb=short --skip-ops --shots=None --tb=short -s -x
========================================================================================== test session starts ===========================================================================================
platform darwin -- Python 3.9.6, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/guille/Documents/GitHub/pennylane/pennylane/devices/tests, configfile: pytest.ini
plugins: flaky-3.7.0, mock-3.6.1, cov-3.0.0
collected 315 items                                                                                                                                                                                      

pennylane/devices/tests/test_compare_default_qubit.py F

================================================================================================ FAILURES ================================================================================================
_______________________________________________________________________ TestComparison.test_hermitian_expectation[device_kwargs0] ________________________________________________________________________
pennylane/devices/tests/test_compare_default_qubit.py:33: in test_hermitian_expectation
    dev = device(n_wires)
pennylane/devices/tests/conftest.py:100: in _device
    dev = qml.device(**device_kwargs)
pennylane/__init__.py:260: in device
    plugin_device_class = plugin_devices[name].load()
/opt/homebrew/lib/python3.9/site-packages/pkg_resources/__init__.py:2450: in load
    return self.resolve()
/opt/homebrew/lib/python3.9/site-packages/pkg_resources/__init__.py:2456: in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
/opt/homebrew/lib/python3.9/site-packages/pennylane_lightning/__init__.py:17: in <module>
    from .lightning_qubit import LightningQubit
/opt/homebrew/lib/python3.9/site-packages/pennylane_lightning/lightning_qubit.py:35: in <module>
    from .lightning_qubit_ops import (
E   ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/pennylane_lightning/lightning_qubit_ops.cpython-39-darwin.so, 2): Symbol not found: ___kmpc_for_static_fini
E     Referenced from: /opt/homebrew/lib/python3.9/site-packages/pennylane_lightning/lightning_qubit_ops.cpython-39-darwin.so
E     Expected in: flat namespace
E    in /opt/homebrew/lib/python3.9/site-packages/pennylane_lightning/lightning_qubit_ops.cpython-39-darwin.so
============================================================================================ warnings summary ============================================================================================
../../../../../opt/homebrew/lib/python3.9/site-packages/autograd/numpy/numpy_wrapper.py:20
../../../../../opt/homebrew/lib/python3.9/site-packages/autograd/numpy/numpy_wrapper.py:20
../../../../../opt/homebrew/lib/python3.9/site-packages/autograd/numpy/numpy_wrapper.py:20
../../../../../opt/homebrew/lib/python3.9/site-packages/autograd/numpy/numpy_wrapper.py:20
  /opt/homebrew/lib/python3.9/site-packages/autograd/numpy/numpy_wrapper.py:20: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    int_types = {_np.int, _np.int8, _np.int16, _np.int32, _np.int64, _np.integer}

-- Docs: https://docs.pytest.org/en/stable/warnings.html
======================================================================================== short test summary info =========================================================================================
FAILED pennylane/devices/tests/test_compare_default_qubit.py::TestComparison::test_hermitian_expectation[device_kwargs0] - ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/pennylane_ligh...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 1 failed, 4 warnings in 0.61s ======================================================================================
guille@MacBook-Pro-de-Guillermo pennylane % 

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

No branches or pull requests

2 participants