-
Notifications
You must be signed in to change notification settings - Fork 112
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
IXMP on Apple Silicon (ARM architecture) #473
Comments
I don't know if that makes a difference, but your path includes an |
I did some casual searching for "libgmdjni" and "gmdjni", and found no direct references in the ixmp_source repo, nor much on the Internet in general. ".dylib" is a macOS library file, and (as @glatterf42 suggests) I guess the one version bundled with ixmp is x86_64/amd64-specific, with no analogous file for the Apple ARM architecture. This may be a result of the process whereby the ixmp_source JAR and its dependencies are prepared, i.e. it may pick up dependencies for certain platforms and architectures, but this set may exclude the Apple ARM architecture. To reiterate my point during the MESSAGE meeting: since ixmp_source is effectively unmaintained (we do not have a Java developer assigned to maintain it, including fixing bugs), this may go unfixed unless boosted to higher priority. |
Thanks Paul and Fridolin. It seems that Pauls analysis is correct here. One possible solution is to recompile the Java Code (Eclipse/Xcode) while specifying the ARM architecture. Another stopgap solution that I found is to use VMWare Fusion personal license (Free for now) along with Windows 11 ARM developer preview to run the code under emulation - very low performance hit. |
Steps to enable MESSAGEix model development on Apple (ARM based CPU) --- Verified 17th April 2023. 1.) Install GAMS 40 - https://www.gams.com/40/ The above steps are tested for M1Pro processor. |
Thanks for providing us with these steps! Do you know which of them (if any) are ARM-CPU specific? |
HI Fridolin, The beauty of these install steps is that none of the following is ARM specific: The above steps forces the MACOS ARM to install X86(intel/AMD) platform specific code. This results in rosetta translation layer (https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment) to kick-in which translates X86 to ARM on the fly during runs. This is not ideal as there is performance penalty during translation. But, since the ARM chips from Apple are already industry leader in performance, these performance hits are not noticeable. For example, model load from Excel to IXMP takes 15 mins, Model solve takes 6 mins for a global Messageix model. In the previous queries which I am sure will be same for any new user, the anaconda env was pulling packages from For GAMS Arm native build, I will do some tests and revert. Best, |
Thanks, then we can update our installation instructions ahead of the community meeting and workshop. Please also let us know what you find for the GAMS ARM native build, whenever you find the time to do so. |
Hi again @SiddharthJoshi-Git, I have a few more questions before updating the installation instructions:
|
Hi Fridolin, - Looking at the miniconda installers, there are M1 ARM installers.Did they fail for you so that you had to change to the Intel x86 64-bit pkg?
- Which conda channels did you end up using? Could you please post the output of conda list here?
- Which command did you use to change the default conda channels? - Finally, what are the default conda channels for you? Could you please simulate starting the process from scratch and check that?
|
Update latest Python version Add footnote for #473
Thanks a lot, I updated the installation instructions accordingly. |
Update latest Python version Add footnote for #473
Steps to enable MESSAGEix model development on Apple (ARM based CPU) --- Verified 11th April 2024. 1.) Install GAMS 46.4 using the package installer for macOS on Intel CPUs. Ensure you select 'customize' during installation and set the tick box to add to your Path variable, your .zprofile should have an entry that looks like this after installation: PATH="/Library/Frameworks/GAMS.framework/Resources:${PATH}" Manual edits are likely to fail. 2.) Install Miniconda (Miniconda3 macOS Intel x86 64-bit pkg)- https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.pkg 3.) Create and activate conda environment (Python version 3.10) - 4.) Check that the packages being installed next are coming from the "pkgs/main/osx-64" conda channel using $ conda info 5.) Fork or clone and install ixmp from source - https://docs.messageix.org/projects/ixmp/en/latest/install.html#from-source 6.) Install open JDK (ver. conda-forge/osx-64::openjdk-11.0.9.1-hcf210ce_1) using $ conda install -c conda-forge openjdk 7.1) Run $ ixmp show-versions. This should show gams 46.4. 8.) Fork or clone and install MESSAGEix from source - https://docs.messageix.org/en/stable/install.html#from-source 9.) Install pyam - $ pip install pyam-iamc 10.) Install Jupyterlab - $ conda install -c conda-forge jupyterlab 11.) Navigate to message_ix repository and run $ pytest. This should pass. |
During Solve:
ERROR Reported: java.lang.java.lang.UnsatisfiedLinkError
Error can be due to CPU/ Java architecture mismatch. Have tried both X86 and ARM builds of JAVA, still this error persists.
Code sample or context
The text was updated successfully, but these errors were encountered: