[code .sh]

git clone YAML
cd YAML && mkdir build && cd build && \
make -j8 && \
make -j8 install


This will install to /usr/local if you are root. Otherwise, you’ll need to do sudo make install.

If you don’t have root access, you can set -DCMAKE_INSTALL_PREFIX=[install dir] when configuring above.

Other libraries


On ubuntu, I found that I had to install ruamel.yaml:

[code .sh]

apt-get install python3-ruamel.yaml

scons and cython

[code .sh]

conda install scons cython


Checkout Cantera

We use a slightly modified version of cantera which is hosted on our software repository.  To check this out:

[code .sh]

git clone --single-branch --branch multiscale-api-mods


Build Cantera

Go to your Cantera source code directory (see the Checkout Cantera section above) and build Cantera:

cd [cantera-source-dir]
scons build -j 8 \
    python_package=minimal \
    prefix=[install path]  \
    boost_inc_dir=[boost header path] \
    python_cmd=[python cmd with path] \
    system_yamlcpp=y \
    f90_interface=n \
    skip_slow_tests=yes \
    extra_inc_dirs=/usr/local/include \

If the build succeeds, then you should run a test:

[code]scons test[/code]

and then install Cantera:

[code]scons install[/code]

Configure System Settings

At this point, the installation will dump out some information about paths.  Pay particular attention to where the setup_cantera script is placed.  You should add this script to your .bashrc or .zshrc (for bash) script to ensure that the proper environment is setup for using Cantera.

At this point, you should have a functional cantera installation.

Docker Image

If you want a docker image that has a functioning cantera build, you can find one based on ubuntu on docker hub at jsutherland/ubuntu_cantera

Categories: Uncategorized


Leave a Reply

Avatar placeholder