Cyclus Core

The core of the Cyclus nuclear fuel cycle simulator from the University of Wisconsin - Madison is intended to be a simulation framework upon which to develop innovative fuel cycle simulations.

To see user and developer documentation for this code, please visit the Cyclus Homepage.

Dependencies

In order to facilitate future compatibility with multiple platforms, Cyclus is built using CMake. A full list of the Cyclus package dependencies is shown below:

Package

Minimum Version

CMake

3.16.3

pkg-config

0.29.1

boost

1.71.0

libxml2

2.9.10

libxml++

2.40.1

python

3.8.10

sqlite3

3.31.1

HDF5

1.10.4

LAPACK

3.9.0

And a few optional dependencies:

Package

Minimum Version

Purpose

Notes

Coin-Cbc

2.10.3

Enables use of Branch-and-Cut solver

Cyclus must be built with --allow-milps flag

Coin-Clp

1.17.5

Enables use of Linear Programming solver

Cyclus must be built with --allow-milps flag

doxygen

1.7.6.1

Building documentation

N/A

TCMmalloc

any

Improves performance

Only used if Cython is not present

Cython

0.29

Enables use of Python agents and input files

N/A

Jinja2

2.10.1

Enables use of Python agents and input files

Only needed if Cython is installed

NumPy

1.9

Enables use of Python agents and input files

Only needed if Cython is installed

pandas

0.25.3

Enables use of Python agents and input files

Only needed if Cython is installed

pip

20.0.2

Enables use of Python agents and input files

Only needed if Cython is installed

Note that the Debian/Ubuntu package ``libtcmalloc`` is NOT discovered correctly by our build system. Instead use ``libgoogle-perftools-dev``.

Installing Dependencies

Cyclus dependencies can either be installed manually or using an operating system’s package manager.

Installing Dependencies (Linux and Unix)

This guide assumes that the user has root access (to issue sudo commands) and access to a package manager or has some other suitable method of automatically installing established libraries. This process was tested using a fresh install of Ubuntu versions 20.04 and 22.04, using apt-get as the package manager (scroll down further for Mac OSX instructions).

The command to install a dependency takes the form of:

sudo apt-get install package

where “package” is replaced by the correct package name. The minimal list of required library package names is:

  1. make

  2. cmake

  3. pkg-config

  4. libboost-all-dev (see note below)

  5. libxml2-dev

  6. libxml++2.6-dev

  7. python3-dev

  8. libsqlite3-dev

  9. libhdf5-dev

  10. liblapack-dev

and (optionally):

  1. doxygen

  2. libgoogle-perftools-dev

  3. coinor-libcbc-dev

  4. coinor-libcoinutils-dev

  5. coinor-libosi-dev

  6. coinor-libclp-dev

  7. python3-tables

  8. python3-pandas

  9. python3-numpy

  10. python3-pytest

  11. python3-jinja2

  12. python3-pip

  13. cython3 (see note below)

For example, in order to install libxml++ (and libxml2) on your system, type:

sudo apt-get install libxml++2.6-dev

If you’d prefer to copy/paste, the following line will install all required Cyclus dependencies:

sudo apt-get install -y cmake make pkg-config libboost-all-dev libxml2-dev libxml++2.6-dev \
python3-dev libsqlite3-dev libhdf5-dev liblapack-dev

And to install all Cyclus dependencies (required and optional):

sudo apt-get install -y cmake make pkg-config libboost-all-dev libxml2-dev libxml++2.6-dev \
python3-dev libsqlite3-dev libhdf5-dev liblapack-dev coinor-libcbc-dev coinor-libcoinutils-dev \
coinor-libosi-dev coinor-libclp-dev coinor-libcgl-dev doxygen libgoogle-perftools-dev python3-tables \
python3-pandas python3-numpy python3-pytest python3-jinja2 cython3

To determine which version of Python is already installed on your computer, run:

python -V

Despite having installed python3, Ubuntu installations may still point at python2 by default. So Python -V can return a version of python that is not preferred. In that case the python version can be changed system-wide with the update-alternatives command.

First, you can list alternatives with the following command:

update-alternatives --list python

Ubuntu may not list any alternatives. To make Ubuntu aware of python 3, use:

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1

From now on, to switch between different versions, use:

sudo update-alternatives --config python

Even if you only have a single python installation, you may have to use update-alternatives to point python at the correct version to avoid build errors.

Check your current python version with the following command:

python --version

Then make Ubuntu aware of your current python version. Run the following command, using the python version you just checked. The following command uses version python3.8 as an example and will fail if you do not replace 3.8 with your own version number.

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2

Cython Note

If you get an error related to an old Cython version, then this may be because the Debian stable version of Cython is 0.23.4. However, Cyclus requires 0.29.0+. To install the latest cython version, please visit the Cython Documentation.

Boost Note

The libboost-all-dev used above will install the entire Boost library, which is not strictly needed. We currently depend on a small subset of the Boost libraries:

  1. libboost-program-options-dev

  2. libboost-system-dev

  3. libboost-filesystem-dev

However, it is possible (likely) that additional Boost libraries will be used because they are an industry standard. Accordingly, we suggest simply installing libboost-all-dev to limit any headaches due to possible dependency additions in the future.

Installing Dependencies (Mac OSX)

Cyclus archetype development is not fully supported on Mac. Nonetheless, because there are some use cases which require installation from source, we have compiled a list of instructions that should be successful. Use a Mac platform at your own risk; we strongly recommend Linux as a primary development environment.

This guide assumes that the user has root access (to issue sudo commands) and access to a package manager or has some other suitable method of automatically installing established libraries. This process was tested using a fresh install of 10.11.6 (El Capitan) using macports as the package manager. Macports installs packages in /opt/local. If installing to a different location, (i.e. /usr/local) change paths in the following instructions accordingly. If you use homebrew, try the following instructions with brew commands in place of the port commands.

The command to install a dependency takes the form of:

sudo port install package

where “package” is replaced by the correct package name. The minimal list of required library package names is:

  1. cmake

  2. boost

  3. hdf5

  4. libxml2

  5. libxmlxx2

  6. sqlite3

  7. doxygen

  8. glibmm

Then install Coin-Cbc from source. They can be downloaded to any directory on your computer:

Coin-Cbc: Download and build using the svn command in the terminal:

svn co https://projects.coin-or.org/svn/Cbc/stable/2.8 Coin-Cbc
cd Coin-Cbc/
mkdir build
cd build/
../configure --prefix=/opt/local
make
sudo make install

Finally, update your path and the following environment variables in your ~/.profile (or ~/.bashrc ) file:

export DYLD_FALLBACK_LIBRARY_PATH=/opt/local/lib:/opt/local:$DYLD_FALLBACK_LIBRARY_PATH

export CMAKE_MODULE_PATH=/opt/local/include:$CMAKE_MODULE_PATH
export CMAKE_PREFIX_PATH=/opt/local:$CMAKE_PREFIX_PATH

# add to PATH:
export PATH=${HDF5_DIR}:/opt/local/bin:${HOME}/.local/bin:$PATH