Quick Install Guide

This quick install guide outlines the basic steps needed to install OpenMC on your computer. For more detailed instructions on configuring and installing OpenMC, see Installation and Configuration in the User’s Manual.

Installing on Linux/Mac with conda-forge

Conda is an open source package management system and environment management system for installing multiple versions of software packages and their dependencies and switching easily between them. If you have conda installed on your system, OpenMC can be installed via the conda-forge channel. First, add the conda-forge channel with:

conda config --add channels conda-forge

OpenMC can then be installed with:

conda install openmc

Installing on Ubuntu through PPA

For users with Ubuntu 15.04 or later, a binary package for OpenMC is available through a Personal Package Archive (PPA) and can be installed through the APT package manager. First, add the following PPA to the repository sources:

sudo apt-add-repository ppa:paulromano/staging

Next, resynchronize the package index files:

sudo apt update

Now OpenMC should be recognized within the repository and can be installed:

sudo apt install openmc

Binary packages from this PPA may exist for earlier versions of Ubuntu, but they are no longer supported.

Installing on Linux/Mac/Windows with Docker

OpenMC can be easily deployed using Docker on any Windows, Mac or Linux system. With Docker running, execute the following command in the shell to download and run a Docker image with the most recent release of OpenMC from DockerHub called openmc/openmc:v0.10.0:

docker run openmc/openmc:v0.10.0

This will take several minutes to run depending on your internet download speed. The command will place you in an interactive shell running in a Docker container with OpenMC installed.

Note

The docker run command supports many options for spawning containers – including mounting volumes from the host filesystem – which many users will find useful.

Installing from Source on Ubuntu 15.04+

To build OpenMC from source, several prerequisites are needed. If you are using Ubuntu 15.04 or higher, all prerequisites can be installed directly from the package manager.

sudo apt install g++ cmake libhdf5-dev

After the packages have been installed, follow the instructions below for building and installing OpenMC from source.

Installing from Source on Linux or Mac OS X

All OpenMC source code is hosted on GitHub. If you have git, the gcc compiler suite, CMake, and HDF5 installed, you can download and install OpenMC be entering the following commands in a terminal:

git clone --recurse-submodules https://github.com/openmc-dev/openmc.git
cd openmc
mkdir build && cd build
cmake ..
make
sudo make install

This will build an executable named openmc and install it (by default in /usr/local/bin). If you do not have administrator privileges, the cmake command should specify an installation directory where you have write access, e.g.

cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local ..

The openmc Python package must be installed separately. The easiest way to install it is using pip, which is included by default in Python 2.7 and Python 3.4+. From the root directory of the OpenMC distribution/repository, run:

pip install .

If you want to build a parallel version of OpenMC (using OpenMP or MPI), directions can be found in the detailed installation instructions.