Installing from binary packages

Installing from packages

Below are instructions for installing OPM from binary package repositories on some selected Linux distributions. After completing the instructions we suggest that you test the installation by going through the SPE1 tutorial. There is a YouTube tutorial that shows how this works in practice.

Ubuntu Linux 24.04 or 22.04 (64 bit version only)

The easiest way to install the Ubuntu packages is to first add the opm personal package archive (ppa). In order to do that we need to install the apt-add-repository command.

sudo apt-get update
sudo apt-get install software-properties-common

Then we add the repository, and run update again:

sudo apt-add-repository ppa:opm/ppa
sudo apt-get update

At this point, all the OPM modules should be available to install. To see a list of (for example) the opm-simulators packages:

apt-cache search opm-simulators

Then, to install the opm-simulators (including Flow) and their dependencies,

sudo apt-get install mpi-default-bin
sudo apt-get install libopm-simulators-bin \
   python3-opm-common

If you want to use the Python bindings to run a blackoil simulation using Python, then please also install these binding:

sudo apt-get install python3-opm-simulators
Note 1: the mpi install above is required for the mpi libraries which the OPM executables are linked to, even those that are not intended to be run with mpirun. The reason the opm packages do not depend on that package is that by Debian policy the user should be allowed to choose which MPI implementation to use (above we picked the default set by Ubuntu).

Note 2: if you have old versions of prerequisite libraries already installed (for example from installing a previous release of OPM) it may be necessary to upgrade them:

sudo apt-get update
sudo apt-get upgrade
Note 3: some users have experienced trouble with Flow simply aborting with no error message. In some cases that can be related to locale issues. Check by running the “locale” command. Flow requires the “C” or an english locale to run correctly. One way to fix this can be to put the following in your .bash_profile (note the initial point in the filename), and open a new terminal (command) window:

LANG=”en_US.UTF-8″ export LANG LC_ALL=”en_US.UTF-8″ export LC_ALL

Note 4: The package python3-opm-common is needed by the simulator (included in libopm-simulators-bin) if your models use PYACTION. It is also needed for using the Python bindings python3-opm-simulators as they build upon it.

Red Hat Enterprise Linux 7 or 8

First add the opm package repository:

sudo yum-config-manager --add-repo \
https://www.opm-project.org/package/opm.repo

The OPM software is split in several packages. To list all available OPM packages you can use:

sudo yum search opm-

For example you can install the opm-simulators binary package to get access to the Flow reservoir simulator:

sudo yum install opm-simulators-bin \
   python3-opm-common

If you want to use the Python bindings to run a blackoil simulation using Python, then please also install these binding:

sudo yum install python3-opm-simulators

Development packages are available using the -devel suffix. For example, to install the opm-upscaling development package use:

sudo yum install opm-upscaling-devel
Note 1:
If you want to install the MPI parallel version of Flow, you must choose an MPI implementation, either mpich or openmpi, and instead use the following command:

sudo yum install opm-simulators-openmpi-bin

For mpich, just replace openmpi with mpich in the above command. In order to run Flow in parallel using mpirun you must also load the required module first:

module load mpi/openmpi-x86_64

To use mpich instead, replace openmpi with mpich in the above command.

Note 2: The package python3-opm-common is needed by the simulator (included in libopm-simulators-bin) if your models use PYACTION. It is also needed for using the Python bindings python3-opm-simulators as they build upon it.