Closed salomon73 closed 8 months ago
To use some packages I installed that are native for Intel and haven't been bridged to Apple silicon, I used my terminal with the Rosetta II emulator when I installed simsopt. The code as then built for arch x86_64, and failed to run on arm64. This might be helpful if people encounter the same issue: when building the code, make sure that Rosetta is disabled. A quick verification:
uname -m
arm64
Regards.
Hi,
I managed to install simsopt on my laptop, a macbook with apple silicon M3 processor. I am using conda, installed from brew, and updated to the latest version. I followed M1/M2 installation, and in particular the conda toolchain only installation process.
I bypassed the difficulty to install f90wrap with --no-build-isolation by using the conda-forge channel. The code builds after installing a few additional packages.
However, when trying to any simsopt example script, every single step involving
from simsopt import <module_name>
fails with the following hardware error:illegal instruction: 4
.Here is what I tried to solve the issue:
osx-64
architecture. The default setting on silicon mac is set onosx-arm
, although apple provides us with an emulator called Rosetta to run osx-64 packages or apps on arm64 architecture. I installed all packages from conda-forge with this architecture, and built simsopt this way as well. Building works but execution fails. In this configuration:arch -> arm64 uname -m -> arm64
osx-64
conda env, running everything from terminal opened with Rosetta. In this configuration:arch -> i386 uname -m -> x86_64
Simsopt builds the same way but I get the same error when executing scripts, when trying to import scripts. From what I have understood, this same kind of issue has been encountered with packages like tensorflow, for many people. I don't know how to solve that bug.Some additional informations:
Building simsopt initially failed as pybind11 was missing. Installing pybind11 with conda-forge gave this error: `Could not find a package configuration file provided by pybind11 with any of the following names:
pybind11Config.cmake pybind11-config.cmake `
I solved is using
pip install --no-build-isolation pybind11[global]
.Let me know if any additional information is requested.
Thank you.