OpenModelica

The OpenModelica Linux released software is classified according to the table below:

Official Release
Stable Development
  • dev.xx versions are released during development when the performance is
    sufficiently stable; they contain bug fixes and some new features that still
    need to be validated
  • dev.betaxx versions are released in preparation to official releases for testing;
    no  new features are added to beta versions, only bug fixes
  • latest stable release: 1.19.0-dev.beta1 (commit history) (release notes)
Nightly Build
  • built daily with the latest additions to the code base that pass the standard
    regression tests (commit history)

  • intended to make the latest developments and enhancements available for
    testers and developers, not for productive usage
  • features that are not subject to regression testing may get broken between
    one nightly build and the next
  • current nightly builds 1.19.0-dev

 

Debian / Ubuntu Packages

We provide .deb packages compiled on Ubuntu and Debian: jessie, stretchbionic, focal, jammy (x86, amd64, and armv7), and usually the most recent non-LTS Ubuntu versions. You can also check the full list including latest updateSource packages are also provided if your distribution is too old (or still not released yet) for the binary packages. Older distributions may not have all build dependencies used by omc, but can still be built. Some older distributions still have binary packages, but are no longer maintained. Note that armhf packages are only available for more recent versions of Ubuntu (and not Debian at all).

Use one of the following lines in a shell to update your sources.list (you might want to substitute your release name for the corresponding Debian or Ubuntu release if your OS is based on these and there is no symbolic link in the repository yet). The release build installs the latest official release of OpenModelica with validated features, possibly with some critical maintenance fixes (versions x.y.z with z > 0). The stable build installs the latest stable version released during the development of a new official release, or the latest beta version during the beta testing phase of a new official release. We recommend to use the stable build if you need recent bug fixes between official releases, but at the same time require a stable version that does not change daily. The nightly build is generated automatically from the git sources (master branch) every night; it will usually be working properly since all commits are checked against the test suite, though it is still possible that some features that are not included in the regression tests occasionally get broken. We recommend to use the nightly build if you are interested in following and testing the latest developments of the code in the master branch. Add the deb-src entry if you want to be able to install OpenModelica's build dependencies and compile it yourself from source code.

sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL http://build.openmodelica.org/apt/openmodelica.asc | sudo gpg --dearmor -o /usr/share/keyrings/openmodelica-keyring.gpg
# Or replace stable with nightly or release
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openmodelica-keyring.gpg] https://build.openmodelica.org/apt \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/openmodelica.list > /dev/null

To verify that the correct key is installed (optional):
$ gpg --show-keys /usr/share/keyrings/openmodelica-keyring.gpg
pub rsa2048 2010-06-22 [SC]
D229AF1CE5AED74E5F59DF303A59B53664970947
uid OpenModelica Build System <build@openmodelica.org>;
sub rsa2048 2010-06-22 [E]

Then update and install OpenModelica

sudo apt update
sudo apt install openmodelica

Installing Modelica libraries

In the current release of OpenModelica, you use apt to install libraries:

for PKG in `apt-cache search "omlib-.*" | cut -d" " -f1`; do sudo apt-get install -y "$PKG"; done # Installs optional Modelica libraries (most have not been tested with OpenModelica)

In the latest nightly build, there is now a package manager for Modelica libraries. See the documentation for how to install the libraries.

Installing the C++ runtime

The C++ runtime is an alternative to the default C runtime. To install the C++ runtime run this command:

sudo apt install libomccpp

Installing Older Releases

Older releases are stored for some stable Debian/Ubuntu versions along with the libraries that existed at the time of the release. You can find the releases at https://build.openmodelica.org/omc/builds/linux/releases and newer versions of libraries at https://build.openmodelica.org/libraries/. Starting with OpenModelica 1.9.4 you can use apt to download the packages using a deb-line such as the one below; make sure all existing OpenModelica packages have been uninstalled (so you do not end up with mismatching versions of dependencies):

deb https://build.openmodelica.org/omc/builds/linux/releases/1.13.0/ bionic release

Downloading source code from repository

If your platform is too old for the pre-built packages, you can install them from any of the source repositories:

sudo apt install devscripts debhelper
mkdir ~/tmp
cd ~/tmp
sudo apt build-dep openmodelica sudo apt install libsundials-kinsol1 libqtwebkit-dev # Might be needed depending on platform
apt -b source openmodelica
sudo dpkg -i *.deb

Virtual Machine Image

If you do not have a Debian-based distribution and do not want to try the RPM packages or building from source code, there is also a pre-built virtual machine image available.

 

RPM packages

There are yum repositories (to be downloaded to /etc/yum.repos.d/) available for CentOS/RHEL/Fedora

Note that CentOS/RHEL requires the EPEL (all version) and devtoolset (CentOS/RHEL 6 only) repositories enabled (see the linked repo files for details). Devtoolset includes C++11 compilers (not available in the GCC 4.4 shipped in the 2010 OS). EPEL includes the omniORB libraries (needed for OMPython and other OpenModelica clients). Only Fedora supports 3D visualization (it includes OpenSceneGraph in the repositories).

Once the repository has been enabled in the OS, use sudo yum install openmodelica-1.14 openmodelica-1.16.1 openmodelica-nightly. (Fedora users can skip installing the suggested Modelica libraries.) It is possible to select if /usr/bin/omc (and OMEdit, etc) should point to a different OpenModelica version using sudo alternatives --config openmodelica. You can also use commands like omc-1.13 or /opt/openmodelica-1.13/bin/omc directly if you to try your model uising a particular OpenModelica version.

Source Code

If you can't use deb packages at all, we recommended installing OpenModelica from source code.

If you have any questions about the installation, feel free to ask either Martin or the bug tracker.

OpenModelica includes SystemDynamics library with World modeling. Instructions for systemdynamics World3 simulations.

Instructions updated 2021-12-18

Please consider supporting our efforts.

Amount: 

You are here: