SCONE Verification Notice

SCONE is a research-oriented code with a smaller user base than MCNP, OpenMC, or SERPENT. Our examples are intended as educational guidance. For authoritative syntax, physics options, and nuclear data requirements, consult the official documentation.

Installing SCONE

Prerequisites

Before installing SCONE, ensure you have the following prerequisites:

  • Fortran Compiler: Either gfortran 8.0+ or Intel Fortran 18.0+ (recommended)
  • CMake: Version 3.12 or higher for build system generation
  • BLAS/LAPACK: Basic Linear Algebra Subprograms and Linear Algebra Package
  • MPI: Optional, for parallel processing (OpenMPI or MPICH)
  • HDF5: Optional, for advanced data output capabilities
  • Git: For version control and downloading the source code

Compiler Recommendation

Intel Fortran often provides better performance for numerical computations, especially when combined with MKL (Math Kernel Library). However, gfortran is freely available and works well for most use cases. If you're pursuing high-performance computing, consider using Intel Fortran with MKL.

System Requirements

SCONE does not publish official system requirements. The following are reasonable estimates based on typical Monte Carlo code behavior and similar tools (MCNP, Serpent). Verify against the upstream project.

Minimum Requirements:

  • 4GB RAM
  • Modern multi-core processor
  • 1GB free disk space
  • Linux, macOS, or Windows with WSL

Recommended:

  • 16GB RAM or more
  • Modern processor with AVX2 support
  • 10GB free disk space
  • SSD storage for improved build and runtime performance
  • Linux operating system

For Small Models

Pin cell and small assembly simulations:

  • 4GB RAM
  • Dual-core processor
  • Results in minutes

For Medium Models

Full assemblies and small core models:

  • 8-16GB RAM
  • Quad-core processor
  • Results in hours

For Large Models

Full core and complex models:

  • 32GB+ RAM
  • 16+ cores recommended
  • Results in hours to days

Platform-Specific Installation

Linux Installation

Linux is the recommended platform for SCONE due to better compiler support and HPC compatibility. Follow these steps to install SCONE on most Linux distributions:

bash
# Install required dependencies (Ubuntu/Debian)
sudo apt update
sudo apt install -y build-essential gfortran cmake git

# Required libraries
sudo apt install -y liblapack-dev libblas-dev libhdf5-dev

# Optional: Intel Math Kernel Library for better performance
# sudo apt install intel-mkl-full

# Clone SCONE repository (verify URL with official documentation)
git clone https://github.com/CambridgeNuclear/SCONE.git
cd SCONE

# Create build directory
mkdir build && cd build

# Configure with CMake
cmake -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_Fortran_COMPILER=gfortran \
      -DSCONE_ENABLE_HDF5=ON \
      ..

# Build using multiple cores
make -j$(nproc)

# Verify build (if tests are available)
if [ -f CTest ]; then
    ctest --output-on-failure
fi

# Set up environment (add to ~/.bashrc for persistence)
echo 'export SCONE_DIR="$HOME/SCONE"' >> ~/.bashrc
echo 'export PATH="$PATH:$SCONE_DIR/build/bin"' >> ~/.bashrc
source ~/.bashrc

HPC Environments

If you're using SCONE on an HPC cluster with environment modules, load the required modules first:

bash
module load intel/2021
module load mkl/2021
module load cmake/3.21.0

macOS Installation

SCONE can be installed on macOS using Homebrew to manage dependencies:

bash
# Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install required dependencies
brew install gcc cmake libomp hdf5 lapack

# Clone SCONE repository
git clone https://github.com/CambridgeNuclear/SCONE.git
cd SCONE

# Create build directory and configure with CMake
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DSCONE_ENABLE_HDF5=ON -DCMAKE_Fortran_COMPILER=gfortran ..

# Build using multiple cores
make -j4

# Run tests to verify installation
ctest -j4

# Add SCONE to your PATH (add to ~/.zshrc for persistence)
echo 'export PATH="$PATH:$HOME/SCONE/build/bin"' >> ~/.zshrc
source ~/.zshrc

Apple Silicon Note

For Apple Silicon (M1/M2) Macs, ensure you have Rosetta 2 installed. Some Fortran dependencies may still require x86 emulation. When installing gfortran, you may need the x86_64 version:arch -x86_64 brew install gcc

Windows Installation

SCONE is best installed on Windows using Windows Subsystem for Linux (WSL), which provides a Linux environment within Windows:

bash
# Install Windows Subsystem for Linux (WSL) first
# Open PowerShell as Administrator and run:
wsl --install

# After WSL is installed, launch Ubuntu and follow these steps:
sudo apt update
sudo apt install -y build-essential gfortran cmake liblapack-dev libhdf5-dev

# Clone SCONE repository
git clone https://github.com/CambridgeNuclear/SCONE.git
cd SCONE

# Create build directory and configure with CMake
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DSCONE_ENABLE_HDF5=ON ..

# Build using multiple cores
make -j4

# Run tests to verify installation
ctest -j4

Windows Native Option

While WSL is recommended, native Windows installation is possible using Intel Fortran with Visual Studio. This approach requires more advanced configuration and may have limitations. If you need a native Windows build, consider consulting the official SCONE documentation for specific instructions.

Build Configuration Options

SCONE's CMake system offers several configuration options to customize your build:

OptionDescriptionDefaultExample Usage
CMAKE_BUILD_TYPEBuild type (Release, Debug, RelWithDebInfo)Release-DCMAKE_BUILD_TYPE=Debug
SCONE_ENABLE_MPIEnable MPI parallelizationON-DSCONE_ENABLE_MPI=OFF
SCONE_ENABLE_OPENMPEnable OpenMP parallelizationON-DSCONE_ENABLE_OPENMP=OFF
SCONE_ENABLE_HDF5Enable HDF5 output supportOFF-DSCONE_ENABLE_HDF5=ON
SCONE_ENABLE_TESTSBuild testsON-DSCONE_ENABLE_TESTS=OFF
SCONE_ENABLE_COVERAGEEnable code coverage analysisOFF-DSCONE_ENABLE_COVERAGE=ON
CMAKE_INSTALL_PREFIXInstallation directory/usr/local-DCMAKE_INSTALL_PREFIX=~/scone

To use these options, add them to your CMake command line. For example, to build a debug version with HDF5 support but without MPI:

bash
cmake -DCMAKE_BUILD_TYPE=Debug -DSCONE_ENABLE_HDF5=ON -DSCONE_ENABLE_MPI=OFF ..

Nuclear Data Installation

SCONE requires nuclear data libraries to perform simulations. These libraries contain cross-section data and other nuclear physics information. Follow these steps to set up nuclear data for SCONE:

bash
# Create a directory for nuclear data
mkdir -p ~/nuclear_data

# Download ENDF/B-VII.1 ACE-format data (or JEF-3.1.1, etc.)
cd ~/nuclear_data
curl -O https://www.nndc.bnl.gov/endf/b7.1/acefiles/ENDF-B-VII.1-neutron-293.6K.tar.gz
tar -xzf ENDF-B-VII.1-neutron-293.6K.tar.gz

# SCONE reads ACE libraries via the aceLibrary path inside the nuclearData block
# of your input file. No separate config file or environment variable is required.

Supported Nuclear Data Libraries

SCONE can use nuclear data from several evaluated libraries:

  • ENDF/B-VII.1: Comprehensive U.S. evaluation (recommended for beginners)
  • JEFF-3.3: European evaluation with strong reactor physics focus
  • JENDL-4.0: Japanese evaluation with emphasis on fast reactor data
  • User-processed libraries: Custom ACE files processed with NJOY

Nuclear Data Processing

For advanced users: If you need to process your own nuclear data libraries, you can use NJOY2016 or NJOY21 to convert ENDF-format evaluations to ACE format. This allows customization of temperature grids, inclusion of specific isotopes, or use of specialized evaluations.

Download and Verify

SCONE is open-source (MIT license) and can be downloaded from GitHub to verify examples from this guide:

bash
git clone https://github.com/CambridgeNuclear/SCONE.git
cd SCONE
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j4
ctest -j4

After a successful build, copy the minimal test input from the "Run a Simple Example" section below into test_case.inp, or use the pre-made file from this guide's scone-examples/ folder. Set export SCONE_ACE=/path/to/your.aceXS (or replace the path in the input), then run ./build/scone.out test_case.inp from the SCONE root.

Verification and Testing

After installation, it's important to verify that SCONE is working correctly:

1. Run the Test Suite

SCONE comes with a comprehensive test suite that verifies various components:

bash
cd build
ctest -j4  # Run tests using 4 cores
ctest -R geometry  # Run only geometry-related tests
ctest -V  # Verbose output for debugging test failures

# If ctest fails, the executable may still exist - check build/ or build/bin/

2. Run a Simple Example

Create a minimal block-style input file with a single fuel pin geometry. Set the aceLibrary path to your ACE data location:

bash
# Create a minimal test input (from SCONE root directory)
cat > test_case.inp << 'EOL'
type eigenPhysicsPackage;
pop 1000; active 10; inactive 5; XSdata ce; dataType ce;
collisionOperator { neutronCE { type neutronCEstd; } }
transportOperator { type transportOperatorDT; }
geometry {
  type geometryStd; boundary (0 0 0 0 0 0); graph { type shrunk; }
  surfaces {
    cellR { id 3; type zCylinder; radius 0.63; origin (0.0 0.0 0.0); }
  }
  cells {}
  universes {
    root { id 1; type rootUniverse; border 3; fill u<999>; }
    pin { id 999; type pinUniverse; radii (0.39218 0.40005 0.45720 0.0); fills (UO2-31 Helium Zircaloy Water); }
  }
}
nuclearData {
  handles { ce { type aceNeutronDatabase; aceLibrary $SCONE_ACE; } }
  materials {
    UO2-31 { temp 600; composition { 92235.06 7.2175E-04; 92238.06 2.2253E-02; 8016.06 4.5853E-02; } }
    Water { temp 600; composition { 1001.06 6.6667E-02; 8016.06 3.3333E-02; } }
    Zircaloy { temp 600; composition { 40090.06 5.0E-03; 40091.06 1.1E-03; 40092.06 1.7E-03; 40094.06 1.7E-03; 40096.06 2.8E-04; 26000.06 1.3E-04; 14000.06 1.0E-04; } }
    Helium { temp 600; composition { 2004.06 2.4044E-04; } }
  }
}
inactiveTally {}
activeTally { fissionRate { type collisionClerk; response (fission); fission { type macroResponse; MT -6; } } }
EOL

# Set ACE path, then run:
export SCONE_ACE=/path/to/your/JEF311.aceXS   # or IntegrationTestFiles/testLib for minimal tests
./build/scone.out test_case.inp

IDE Configuration

Setting up a proper development environment can significantly improve your workflow when working with SCONE. Here are setup instructions for popular IDEs:

Visual Studio Code

VS Code with the Fortran extension provides an excellent development environment for SCONE:

bash
# Create a .vscode directory in your project
mkdir -p .vscode

# Create a settings.json file for Fortran configuration
cat > .vscode/settings.json << EOL
{
  "fortran.linter.includePaths": [
    "${workspaceFolder}/src/**"
  ],
  "fortran.fortls.path": "fortls",
  "fortran.fortls.launchWith": ["fortls", "--enable_code_actions"],
  "fortran.fortls.nthreads": 4,
  "editor.formatOnSave": true,
  "editor.rulers": [100],
  "files.associations": {
    "*.inp": "fortran"
  }
}
EOL

# Create a launch.json file for debugging
cat > .vscode/launch.json << EOL
{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "cppdbg",
      "request": "launch",
      "name": "Debug SCONE",
      "program": "${workspaceFolder}/build/bin/scone",
      "args": ["${file}"],
      "cwd": "${workspaceFolder}",
      "MIMode": "gdb",
      "setupCommands": [
        {
          "description": "Enable pretty-printing for gdb",
          "text": "-enable-pretty-printing",
          "ignoreFailures": true
        }
      ]
    }
  ]
}
EOL

Install the following VS Code extensions for Fortran development:

  • Modern Fortran (by Fortran Lang)
  • C/C++ (for debugging support)
  • CMake Tools
  • Code Runner (optional, for running simple scripts)

Vim/Neovim

For terminal-based editing, Vim or Neovim with fortran-language-server provides good support:

bash
# Install fortran-language-server
pip install fortran-language-server

# Add to your .vimrc or init.vim
# For vim-plug users
call plug#begin()
Plug 'dense-analysis/ale'  " Linting
Plug 'prabirshrestha/vim-lsp'  " Language Server Protocol
Plug 'autozimu/LanguageClient-neovim'  " For Neovim
call plug#end()

" Configure LSP
let g:ale_linters = {'fortran': ['fortls']}
let g:ale_fixers = {'fortran': ['fprettify']}
let g:ale_fix_on_save = 1

" Optional: Install fprettify for code formatting
pip install fprettify

Eclipse with Photran

Eclipse with the Photran plugin offers a full-featured Fortran IDE:

  1. Download Eclipse IDE for Scientific Computing
  2. Install Photran through Help → Install New Software
  3. Import SCONE as a CMake project
  4. Configure Photran to use your Fortran compiler
  5. Set up the project include paths to match SCONE's directory structure

Troubleshooting

If you encounter issues during installation or when running SCONE, try these troubleshooting steps:

bash
# Check if compiler is properly installed
gfortran --version

# Check CMake version
cmake --version

# Verify MKL installation (if using Intel)
echo $MKLROOT

# Check HDF5 installation
h5cc -showconfig

# Common CMake error with missing HDF5
# Solution: Specify HDF5 path explicitly
cmake -DCMAKE_BUILD_TYPE=Release -DHDF5_ROOT=/path/to/hdf5 ..

# Compilation fails with MPI errors
# Solution: Disable MPI if not needed
cmake -DSCONE_ENABLE_MPI=OFF ..

# Library path errors when running SCONE
# Solution: Set library path environment variable
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/needed/libs

# Common file not found error for nuclear data
# Solution: Create symbolic links to data files
ln -sf /actual/path/to/data.ace ~/nuclear_data/data.ace

Common Installation Problems

Problem: CMake can't find Fortran compiler

Solution: Explicitly specify the compiler path:cmake -DCMAKE_Fortran_COMPILER=/path/to/gfortran ..

Problem: Missing libraries during linking

Solution: Install missing development packages or specify library paths:cmake -DCMAKE_PREFIX_PATH=/path/to/libs ..

Problem: Segmentation fault when running SCONE

Solution: Build in debug mode and use a debugger:gdb --args ./build/scone.out input_file.inp

Problem: SCONE can't find nuclear data

Solution: Set the aceLibrary path inside the nuclearData block of your input file to the absolute path of your ACE library (e.g. JEF311.aceXS or ENDFB71.aceXS).

If problems persist, consult the following resources:

Next Steps

Now that you have SCONE installed, you're ready to start using it:

  1. Learn SCONE Basics: Continue to the Basic Concepts page
  2. Understand Input Files: Review the Configuration File documentation
  3. Try Simple Examples: Experiment with the examples in Simple Examples
  4. Explore Advanced Features: As you become more comfortable, explore advanced features like variance reduction and parallel computing

Getting Help

If you encounter issues or have questions about SCONE, several resources are available:

  • Official SCONE documentation (Read the Docs)
  • GitHub Issues for reporting bugs or requesting features
  • Community forums and mailing lists (if available)
  • This guide's other sections for specific usage instructions