MCNP Installation Guide

Step-by-step guide to obtaining and installing MCNP

Overview

MCNP is export-controlled software requiring official approval before download. The process involves registration, approval, and compilation from source code.

Installation Steps

Administrative

1. Register with RSICC

2. Submit required documents

3. Wait for approval (1-2 weeks)

4. Download distribution

Technical

1. Install prerequisites

2. Configure build environment

3. Compile source code

4. Install and test

RSICC Registration

The Radiation Safety Information Computational Center (RSICC) distributes MCNP under export control regulations. Registration requires institutional affiliation and proper documentation.

Required Documents

Export Control Form: Signed compliance statement

Reference Letter: From advisor or supervisor

Institutional Proof: Student ID or employment letter

Research Statement: Brief description of intended use

Registration Process

text
1. Visit https://rsicc.ornl.gov
2. Create account with institutional email
3. Complete application form
4. Upload required documents
5. Submit for review
6. Monitor application status
7. Download approved packages

Processing typically takes 1-2 weeks. Use institutional email addresses and ensure all documents are properly signed and dated.

System Requirements

Hardware

CPU: 2+ cores, 2.0 GHz minimum

RAM: 4GB minimum, 16GB recommended

Storage: 20GB free space

Network: Internet for downloads

Software

OS: Linux, Windows, or macOS

Compiler: GCC 7.0+ or Intel

MPI: OpenMPI 4.0+ or MPICH

Build: Make, CMake optional

Linux Installation

Linux provides the most straightforward MCNP installation path. Most distributions include the required compilers and libraries in their package repositories.

Install Prerequisites

bash
# Ubuntu/Debian
sudo apt update
sudo apt install build-essential gfortran openmpi-bin libopenmpi-dev

# CentOS/RHEL
sudo yum groupinstall "Development Tools"
sudo yum install gcc-gfortran openmpi-devel

# Check versions
gcc --version        # Should be 7.0+
gfortran --version   # Should be 7.0+
mpirun --version     # Should be 4.0+

Build and Install

bash
# Extract distribution
mkdir -p ~/mcnp
cd ~/mcnp
tar -xzf MCNP6.2-Source.tar.gz
cd MCNP6.2/Source

# Configure build
export FC=gfortran
export CC=gcc
export CXX=g++
export MPIFC=mpif90
export MPICC=mpicc

# Build MCNP
make
make install PREFIX=/opt/mcnp

# Add to PATH
echo 'export PATH=/opt/mcnp/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Verify Installation

bash
# Check MCNP version
mcnp6 --version

# Test with simple input
mcnp6 i=test.i o=test.o

# Run parallel test
mpirun -np 4 mcnp6 i=test.i o=test.o tasks 4

Windows Installation

Windows installation requires Visual Studio and Intel Fortran Compiler. The process is more complex but well-documented in the MCNP manual.

Required Software

Visual Studio 2019+: Community edition sufficient

Intel Fortran: Required for Fortran compilation

Microsoft MPI: For parallel execution

Windows SDK: Latest version

Build Process

batch
# Open Visual Studio Developer Command Prompt
# Navigate to source directory
cd C:MCNP6.2Source

# Set environment variables
set FC=ifort
set CC=cl
set CXX=cl

# Build using nmake
nmake -f Makefile.win

# Install to Program Files
nmake -f Makefile.win install

Cross Section Data

MCNP requires nuclear cross section libraries for particle transport calculations. These libraries are distributed separately from the main code.

Essential Libraries

ENDF/B-VIII.0: Latest US evaluation (.80c)

ENDF/B-VII.1: Well-validated library (.70c)

Thermal Data: S(α,β) scattering libraries

Photon Data: Atomic relaxation data

Setup Cross Section Path

bash
# Download and extract cross section libraries
mkdir -p /opt/mcnp/data
cd /opt/mcnp/data
tar -xzf ENDF80SaB.tar.gz

# Set environment variable
export DATAPATH=/opt/mcnp/data
echo 'export DATAPATH=/opt/mcnp/data' >> ~/.bashrc

# Verify XSDIR file exists
ls -la /opt/mcnp/data/xsdir

Common Issues

Troubleshooting

Compiler errors

Ensure GCC/Gfortran versions are 7.0+. Update if necessary.

Missing libraries

Install development packages (build-essential, gfortran-dev).

MPI problems

Verify OpenMPI installation and environment variables.

Cross section errors

Check DATAPATH environment variable and xsdir file.

Permission issues

Use sudo for system-wide installation or install to home directory.

Testing Your Installation

Verify your MCNP installation with a simple test problem. This ensures all components are properly configured and functional.

Basic Test

bash
# Create simple test input (test.i)
cat > test.i << EOF
Simple sphere test
1 1 -1.0 -1 imp:n=1
2 0      1  imp:n=0

1 so 10

m1 1001 1
sdef
nps 1000
EOF

# Run test
mcnp6 i=test.i o=test.o

# Check for successful completion
grep "run terminated normally" test.o

A successful test run indicates MCNP is properly installed and configured. The output file should contain transport results and terminate normally.

Installation Tips

Keep your RSICC account information secure and note license renewal dates. MCNP licenses typically require annual renewal.

Document your installation process and keep installation files backed up. This saves time when setting up MCNP on additional systems or after system updates.