IDAES/idaes-pse

Improve machine architecture detection logic for `idaes get-extensions` to address common macOS/Apple Silicon issues

Opened this issue · 0 comments

Motivation

  • On machines running macOS with Apple Silicon processors, it might happen that the Python executable is run in x86_64 compatibility model, e.g. because the x86_64 version of Conda, and consequently Python, gets installed
  • This causes an issue for idaes get-extensions: in this scenario, the current architecture detection logic only "sees" x86_64 and downloads the corresponding binaries, which causes many things not to work properly (see #1494)

Possible solution/remedies

  • Enable idaes get-extensions to detect when it's being run in this scenario (i.e. x86_64 executable on an Apple Silicon machine) and error out and/or warn the user

Implementation considerations

  • There might be heuristics we can use to work around the inability to detect the machine architecture directly in this scenario: for example, macOS versions starting from 10.14 only run on Apple Silicon
  • Therefore, if the detected OS version is 10.14 and the detected machine architecture is x86_64, it is likely (or possibly certain?) that the code is running in this "unwanted compatibility mode" scenario and idaes get-extensions can warn/error out accordingly

Proposed next steps

  • Investigate and reproduce the "unwanted compatibility mode" scenario (connected with #1497)
  • Test possible solutions to detect this scenario such as the ones described above