Required
A Fortran compiler such as gfortran
In order to compile NDPP, you will need to have a Fortran compiler installed on your machine. Since a number of Fortran 2003/2008 features are used in the code, it is recommended that you use the latest version of whatever compiler you choose. For gfortran, it is necessary to use version 4.6.0 or above.
If you are using Debian or a Debian derivative such as Ubuntu, you can install the gfortran compiler using the following command:
sudo apt-get install gfortran
Optional
An MPI implementation for distributed-memory parallel runs
This feature is not yet implemented*
To compile with support for parallel runs on a distributed-memory architecture, you will need to have a valid implementation of MPI installed on your machine. The code has been tested and is known to work with the latest versions of both OpenMPI and MPICH. Note that if using OpenMPI, make sure that –with-mpi-f90-size is not set to medium or large since this may prevent MPI calls from completing successfully in NDPP. OpenMPI and/or MPICH can be installed on Debian derivatives with:
sudo apt-get install mpich2 libmpich2-dev
sudo apt-get install openmpi1.6-bin libopenmpi1.6-dev
HDF5 Library for portable binary output format
To compile with support for HDF5 output (highly recommended), you will need to have HDF5 installed on your computer. The installed version will need to have been compiled with the same compiler you intend to compile NDPP with.
git version control software for obtaining source code
All NDPP source code is hosted on GitHub. You can download the source code directly from GitHub or, if you have the git version control software installed on your computer, you can use git to obtain the source code. The latter method has the benefit that it is easy to receive updates directly from the GitHub repository. With git installed and setup, the following command will download the full source code from the GitHub repository:
git clone git@ndpp.org:ndpp/ndpp.git
By default, the cloned repository will be set to the development branch. To switch to the source of the latest stable release, run the following commands:
cd ndpp/src
git checkout master
All configuration for NDPP is done within the Makefile located in src/Makefile. In the Makefile, you will see that there are a number of User Options which can be changed. It is recommended that you do not change anything else in the Makefile unless you are experienced with compiling and building software using Makefiles. The following parameters can be set from the User Options sections in the Makefile:
It is also possible to change these options from the command line itself. For example, if you want to compile with DEBUG turned on without actually change the Makefile, you can enter the following from a terminal:
make DEBUG=yes
To compile NDPP on Linux or Max OS X, run the following commands from within the root directory of the source code:
cd src
make
sudo make install
This will build an executable named ndpp and install it (by default in /usr/local/bin).
One option for compiling NDPP on a Windows operating system is to use Cygwin, a Linux-like environment for Windows. You will need to first install Cygwin. When you are asked to select packages, make sure the following are selected:
If you plan on obtaining the source code directly using git, select the following packages:
In order to use the Python scripts provided with NDPP, you will also need to install Python. This can be done within Cygwin or directly in Windows. To install within Cygwin, select the following packages:
Once you have obtained the source code, run the following commands from within the source code root directory:
cd src
make
This will build an executable named ndpp.
An alternate option for installing NDPP on Windows is using MinGW, which stands for Minimalist GNU for Windows. An executable for installing the MinGW distribution is available on SourceForge. When installing MinGW, make sure the following components are selected:
Once MinGW is installed, copy the NDPP source distribution to your MinGW home directory (usually C:\MinGW\msys\1.0\home\YourUsername). Once you have the source code in place, run the following commands from within the MinGW shell in the root directory of the NDPP distribution:
cd src
make
This will build an executable named ndpp.
In order to run a simulation with NDPP, you will need cross section data for each nuclide in your problem. Since NDPP uses ACE format cross sections, you can use nuclear data that was processed with NJOY, such as that distributed with MCNP or Serpent. Several sources provide free processed ACE data as described below. The TALYS-based evaluated nuclear data library, TENDL, is also openly available in ACE format.
In the following discussion, note that the cross_sections.xml file can be the same as is used by OpenMC. Therefore, these steps can be skipped if OpenMC is currently installed on the system.
The NNDC provides ACE data from the ENDF/B-VII.1 neutron and thermal scattering sublibraries at four temperatures processed using NJOY. To use this data with NDPP, a script is provided with NDPP that will automatically download, extract, and set up a configuration file:
cd ndpp/data
python get_nndc_data.py
At this point, you should set the CROSS_SECTIONS environment variable to the absolute path of the file ndpp/data/nndc/cross_sections.xml.
The NEA provides processed ACE data from the JEFF nuclear library upon request. A DVD of the data can be requested here. To use this data with NDPP, the following steps must be taken:
Copy and unzip the data on the DVD to a directory on your computer.
In the root directory, a file named xsdir, or some variant thereof, should be present. This file contains a listing of all the cross sections and is used by MCNP. This file should be converted to a cross_sections.xml file for use with NDPP. A Python script is provided in the NDPP distribution for this purpose:
ndpp/src/utils/convert_xsdir.py xsdir31 cross_sections.xml
In the converted cross_sections.xml file, change the contents of the <directory> element to the absolute path of the directory containing the actual ACE files.
Additionally, you may need to change any occurrences of upper-case “ACE” within the cross_sections.xml file to lower-case.
Either set the <cross_sections> Element in a settings.xml file or the CROSS_SECTIONS environment variable to the absolute path of the cross_sections.xml file.
To use cross sections distributed with MCNP, change the <directory> element in the cross_sections.xml file in the root directory of the NDPP distribution to the location of the MCNP cross sections. Then, either set the <cross_sections> Element in a settings.xml file or the CROSS_SECTIONS environment variable to the absolute path of the cross_sections.xml file.
To use cross sections distributed with Serpent, change the <directory> element in the cross_sections_serpent.xml file in the root directory of the NDPP distribution to the location of the Serpent cross sections. Then, either set the <cross_sections> Element in a settings.xml file or the CROSS_SECTIONS environment variable to the absolute path of the cross_sections_serpent.xml file.
Once an NDPP input file has been created (see Writing XML Input Files), you can either run the ndpp executable directly from the directory containing your XML input files, or you can specify as a command-line argument the directory containing the XML input files. For example, if the path of your NDPP executable is /home/username/ndpp/src/ndpp and your XML input files are in the directory /path/to/somemodel, one way to run the simulation would be:
cd /path/to/somemodel
ndpp
Alternatively, you could run from any directory:
ndpp /path/to/someplace
Note that in the latter case, any output files will be placed in the present working directory which may be different from /path/to/somemodel.