Install DAGMC with multiple physics codes

This document explains how to install DAGMC with multiple physics codes, assuming you have already installed the required dependencies.

Get DAGMC

As before, this guide assumes that you are building DAGMC in the subdirectory dagmc_bld of your home directory.

The first step is to clone the DAGMC repository.

$ cd $HOME/dagmc_bld
$ mkdir DAGMC
$ cd DAGMC
$ git clone https://github.com/svalinn/DAGMC
$ cd DAGMC
$ git checkout develop

Before configuring DAGMC

Before you configure DAGMC, you will need to perform the steps listed in the guides for the individual codes with which you want to install DAGMC.

For DAG-MCNP5/6, you will need to apply one of the MCNP source code patches.

For FluDAG, you will need to install FLUKA.

For DAG-Geant4, you will need to install Geant4.

Configure DAGMC with multiple physics codes

First, create and enter the build directory.

$ cd $HOME/dagmc_bld/DAGMC
$ ln -s DAGMC src
$ mkdir bld
$ cd bld

Then, choose where you want to install DAGMC. This is where the binaries, libraries, header files, etc. will be placed. This guide uses $INSTALL_PATH to represent this location.

$ INSTALL_PATH=$HOME/dagmc_bld/DAGMC

CMake variables are used to configure DAGMC with your desired build options. A few examples will be shown here, but you can see a list of all possible options here.

The following CMake command will build DAG-Geant4 and FluDAG as well as MPI versions of DAG-MCNP5 and DAG-MCNP6.

$ cmake ../src -DMOAB_DIR=$HOME/dagmc_bld/MOAB \
               -DBUILD_MCNP5=ON \
               -DBUILD_MCNP6=ON \
               -DBUILD_MCNP_MPI=ON \
               -DBUILD_GEANT4=ON \
               -DGEANT4_DIR=$HOME/dagmc_bld/Geant4 \
               -DBUILD_FLUKA=ON \
               -DFLUKA_DIR=$FLUPRO \
               -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH

If the CMake configuration proceeded successfully, you are now ready to install DAGMC.

Build DAGMC with multiple physics codes

Use Make to install DAGMC with multiple physics codes.

$ make
$ make install

If the build was successful, the binaries, libraries, header files, and tests will be installed to the bin, lib, include, and tests subdirectories of $INSTALL_PATH respectively.

Test DAGMC

We regularly run the DAGMC test suite on Travis as part of our continuous integration system. You may however wish to run the tests yourself in order to verify you have installed DAGMC correctly.

If the tests have completed successfully, you are now ready to run your first DAGMC problem. See the DAGMC user’s guide for more information.