Skip to content

Commit

Permalink
Add section on installing ERT on ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
Aron Høyer authored and aronhoyer committed Sep 6, 2023
1 parent 824f6ea commit ba5449b
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,58 @@ $ pip install git+https://github.com/equinor/ert.git@main
$ ert --help
```


The `ert` program is based on two different repositories:

1. [ecl](https://github.com/Equinor/ecl) which contains utilities to read and write Eclipse files.

2. ert - this repository - the actual application and all of the GUI.


ERT is now Python 3 only. The last Python 2 compatible release is [2.14](https://github.com/equinor/ert/tree/version-2.14)

### Installing on Macs with ARM CPUs

A few of ERT's dependencies aren't compiled for ARM CPUs. Because of this,
we need to do some Rosetta "hot swapping".

First, install Rosetta by running `softwareupdate --install-rosetta [--agree-to-license]`

Once Rosetta is installed, you can switch to an Intel based architecture by running:
`arch -x86_64 <SHELL_PATH>`. Note that if your shell is installed
as an ARM executable, this will error. If that's the case, you can simply pass
`/bin/zsh` as the shell path.

Now you're set to install Homebrew for Intel architectures:

`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`

Now, to be able to hot swap between Intel and ARM architectures, add the following
to your shell profile config:

```sh
alias arm="env /usr/bin/arch -arm64 <SHELL_PATH> --login"
alias intel="env /usr/bin/arch -x86_64 <SHELL_PATH> --login"

local cpu=$(uname -m)

if [[ $cpu == "arm64" ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi

if [[ $cpu == "x86_64" ]]; then
eval "$(/usr/local/homebrew/bin/brew shellenv)"
fi
```

Note: You can always check which architecture you're running by calling either
`arch` or `uname -m`.

This will allow you to switch between architectures by calling either `intel` or `arm`
from your terminal. Switching architectures will automatically source the correct
Hombrew executable for your architecture as well, which is key.

Now, simply switch to Intel, and install Python and set up a virtualenv as
instructed below.

## Documentation

Documentation for ert is located at [https://ert.readthedocs.io/en/latest/](https://ert.readthedocs.io/en/latest/).
Expand Down

0 comments on commit ba5449b

Please sign in to comment.