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

Python wheel for arm64 macOS on M1 seems to have x86_64 code #1232

Closed
PhilMiller opened this issue Mar 18, 2022 · 2 comments
Closed

Python wheel for arm64 macOS on M1 seems to have x86_64 code #1232

PhilMiller opened this issue Mar 18, 2022 · 2 comments

Comments

@PhilMiller
Copy link

Describe the bug

Via WarpX's run_tests.sh, I got a pip installation of openPMD_api:

Collecting openpmd-api
  Using cached openPMD_api-0.14.4-cp39-cp39-macosx_11_0_arm64.whl (6.6 MB)

However, subsequent tests that actually use this code failed to load it in the analysis script:

building qed_breit_wheeler_2d_opmd...
   cmake --build /private/var/folders/dp/8d6ytsgx01d2dwck1fccc9c40000gn/T/ci-JnRqT43TaB/warpx/builddir -j 8 --  
   Compilation time: 12.117 s
   run & test directory: /private/var/folders/dp/8d6ytsgx01d2dwck1fccc9c40000gn/T/ci-JnRqT43TaB/rt-WarpX/WarpX-tests/2022-03-18/qed_breit_wheeler_2d_opmd/
   copying files to run directory...
   path to input file: Examples/Modules/qed/breit_wheeler/inputs_2d
   running the test...
   mpiexec -n 2 ./qed_breit_wheeler_2d_opmd.ex inputs_2d  diag1.file_prefix=qed_breit_wheeler_2d_opmd_plt   amrex.abort_on_unused_inputs=1 amrex.fpe_trap_invalid=1 amrex.fpe_trap_zero=1 amrex.fpe_trap_overflow=1 warpx.always_warn_immediately=1 warpx.abort_on_warning_threshold=low diag1.format = openpmd diag1.openpmd_backend = h5 warpx.abort_on_warning_threshold = high
   Execution time: 1.526 s
   WARNING: unable to open the job_info file
   doing the analysis...
   WARNING: analysis failed...
./analysis_opmd.py  qed_breit_wheeler_2d_opmd_plt
Traceback (most recent call last):
  File "/private/var/folders/dp/8d6ytsgx01d2dwck1fccc9c40000gn/T/ci-JnRqT43TaB/rt-WarpX/WarpX-tests/2022-03-18/qed_breit_wheeler_2d_opmd/./analysis_opmd.py", line 13, in <module>
    import openpmd_api as io
  File "/private/var/folders/dp/8d6ytsgx01d2dwck1fccc9c40000gn/T/ci-JnRqT43TaB/py-venv/lib/python3.9/site-packages/openpmd_api/__init__.py", line 1, in <module>
    from . import openpmd_api_cxx as cxx
ImportError: dlopen(/private/var/folders/dp/8d6ytsgx01d2dwck1fccc9c40000gn/T/ci-JnRqT43TaB/py-venv/lib/python3.9/site-packages/openpmd_api/openpmd_api_cxx.cpython-39-darwin.so, 0x0002): tried: '/private/var/folders/dp/8d6ytsgx01d2dwck1fccc9c40000gn/T/ci-JnRqT43TaB/py-venv/lib/python3.9/site-packages/openpmd_api/openpmd_api_cxx.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/local/lib/openpmd_api_cxx.cpython-39-darwin.so' (no such file), '/usr/lib/openpmd_api_cxx.cpython-39-darwin.so' (no such file)

   Analysis time: -0.732 s
   WARNING: unable to copy analysis image
   archiving the output...
   creating problem test report ...
   qed_breit_wheeler_2d_opmd FAILED

To Reproduce

On an M1 Mac:

# in directory $HOME/WarpX
./run_tests.sh qed_breit_wheeler_2d_opmd

Software Environment

  • version of openPMD-api: 0.14.4
  • installed openPMD-api via: pip
  • operating system: macOS Monterey 12.2.1
  • machine: M1 Mac Mini
  • name and version of Python implementation: CPython 3.9
@ax3l
Copy link
Member

ax3l commented Mar 18, 2022

Thanks for the report!

Can you check if the universal wheel https://files.pythonhosted.org/packages/e8/16/6455fa6f1291f9f494f0c3a51093ebb2b5fb5c09ac97439e3db7f2e6eb4c/openPMD_api-0.14.4-cp39-cp39-macosx_10_9_universal2.whl has the same issue?
Update: yep.

@ax3l ax3l self-assigned this Mar 18, 2022
@ax3l ax3l mentioned this issue Jun 7, 2022
@ax3l
Copy link
Member

ax3l commented Jun 7, 2022

PR #1286 that publishes wheeks for 0.14.5 will fix this.
(Fix was prepared in #1233)

@ax3l ax3l closed this as completed Oct 17, 2022
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

2 participants