Detailed Build and Installation Instructions for SST 9.1.x

Overview

SST is an open source, cross platform simulation platform that provides a framework to connect multiple simulated hardware object including CPUs, network, memory, etc. Simulations using the toolkit can be run either single node, or run on multiple nodes via MPI. The toolkit provides a parallel discrete event core as well as several programming interfaces including classes to manage random number generation, statistics handling, simulation output and efficient memory pooling for simulation events. The most recent performance evaluation has shown that SST can scale to simulate beyond 1.5M objects and operate efficiently on simulations up to 128 dual-processor nodes.

These instructions are intended to walk the user through a detailed set of steps to build and install SST. It is for users with intermediate knowledge in the operation of Unix/Linux/OSX environments.

NOTE: The following instructions build a basic version of SST and its required external components. Additional (optional) external components can be built to provide additional features. Instructions for these additional components are available at Instructions for Additional External SST Components.

The SST Release Notes identify what operating systems, compiler and external component combinations have been tested and proven to work with SST 9.1.x.

NOTE: Using combinations other than what is identified in the Release Notes may cause build failures and/or unexpected results.

A detailed list of elements provided with the SST distribution are available at SST Element Summary and SST Element Release Matrix.

If you encounter difficulties, go to the SST Support page.

NOTE: Building SST can be cumbersome and error prone due to the sheer number of combinations of operating systems, compiler versions and external required components. It is STRONGLY recommended that users closely follow these instructions.

General Build and Install Information

SST does not require root/superuser privileges for installation. Prior to installation, the user will need to decide on directories where SST and its prerequisites can be built and installed. This location should have sufficient space and permissions for building and storage of the libraries and other binaries.

The user is expected to have an intermediate knowledge in the operation of Unix/Linux/OSX environments. They should be able to modify their environment variables, and understand basic build/installation methods, and manipulate the file system.

NOTE: SST and all of its external components should be built using the same compiler type and version. Mixing different compiler types or versions can create binary incompatibilities that can be difficult to diagnose.

Shell Used For Instructions

These instructions are targeted to users running Bourne-compatible shells. Users running different shells will need to adjust these instructions as necessary.

Specific Instructions for Operating Systems and Compilers

There are 2 main operating systems used for SST: Linux and Mac OSX (macOS).

In the instructions that follow, the following icons are used to point out specific issues for an operating system or an operating system with a specific compiler.

- Represents Instructions specific to Linux Operating Systems.

- Represents Instructions specific to Mac OSX Operating Systems.


Required system tools

Refer to SST Build Prerequisites for a list of required system tools necessary for building SST.

- Most Linux Systems contain all the necessary tools required to build SST (either pre-installed or available via the distro.). However, some older versions may need their system tools updated to newer revisions. NOTE - Newer versions of components for SST (such as Boost) can cause incompatibilites. It is recommended that the versions defined in the SST Release Notes be used if at all possible.

- Mac OSX systems will need the following to be installed on the system before building SST see (Mac OSX Install Options):


Example Build and Install Directories

These instruction use the following conventions (though users can adjust these as they see fit):

Other Possible Tasks for Users

For most users, following these instructions will get SST up and running. However there may be rare circumstances that the user will have implement additional changes to their system to resolve problems.

The user may have to possibly modify their system environment in the following possible ways:

It is expected that the user has sufficent knowledge and experience in Linux and/or Mac OSX operating systems to understand and manage these changes.



Building A Basic SST System

SST recommends that 1 external component (OpenMPI) be built, installed and available on the users machine. After this component is available, then SST itself can be built and installed.

Additional external components can be built to provide additional features. Instructions for these additional components are available at Instructions for Additional External SST Components.

NOTE: If OpenMPI is not available, the SST-Core must be configured with the --disable-mpi option (see configure instructions below). With OpenMPI disabled, the user will be unable to run multi-node simulations.

External Dependent Components

SST 9.1.x is regularly tested with OpenMPI 2.1.3, and this version is known to work with SST. Installation of an MPI package from source code is typically unnecessary, since many Linux distributions provide OpenMPI as an optional installable package. Instructions for building OpenMPI 2.1.3 follow.

OpenMPI can be obtained online at http://www.open-mpi.org/software/ompi/v2.1/

1. Download the OpenMPI archive file openmpi-2.1.3.tar.gz to $HOME/scratch/src

2. Unarchive the compressed tar file

$ cd $HOME/scratch/src
$ tar xfz openmpi-2.1.3.tar.gz
$ cd openmpi-2.1.3

3. Decide on an installation location. For this example: $HOME/local/packages/OpenMPI-2.1.3. Note this location will contain bin, lib, include, and other directories for use of OpenMPI.

4. Set the home directory environment variable of the OpenMPI installation.

$ export MPIHOME=$HOME/local/packages/OpenMPI-2.1.3

5. Configure OpenMPI to be installed in $MPIHOME

$ ./configure --prefix=$MPIHOME

6. Build and install OpenMPI

$ make all install

7. Update your PATH environment variable so that it contains the bin directory of the OpenMPI installation location. Also set the MPICC and MPICXX variables to point to the correct MPI compiler options. initialization file.

$ export PATH=$MPIHOME/bin:$PATH
$ export MPICC=mpicc
$ export MPICXX=mpicxx

8. OPTIONAL - In some cases, it may be necessary to specify the location of the OpenMPI library files for proper operation of SST.

$ export LD_LIBRARY_PATH=$MPIHOME/lib:$LD_LIBRARY_PATH
$ export DYLD_LIBRARY_PATH=$MPIHOME/lib:$DYLD_LIBRARY_PATH
$ export MANPATH=$MPIHOME/share/man:$DYLD_LIBRARY_PATH

9. To make the changes to the environment variables a permanent change, it may require editing of your login shell’s initialization file.



SST Build Architecture

NOTE - SST (6.x and later) is now made up of two separate packages:

NOTE - SST (7.x and later) no longer requires that Boost be built as part of the core.

* Some 3rd party elements may require Boost - It is recommended not to build SST-Core with Boost until it is confirmed that it is necessary.


SST Core 9.1.x Build and Installation

After the prerequisite Components (OpenMPI and other optional components) have been successfully installed, the SST-Core can then be built and installed.

1. Obtain the SST-Core 9.1.x source code and save it in $HOME/scratch/src. The tarfile can be downloaded from here.

$ cd $HOME/scratch/src
$ tar xfz sstcore-9.1.0.tar.gz
$ cd $HOME/scratch/src/sstcore-9.1.0

2. Set the home directory environment variable to the SST-Core installation (i.e. where you want the SST-Core files installed), and the source directory.

$ export SST_CORE_HOME=$HOME/local/sstcore-9.1.0
$ export SST_CORE_ROOT=$HOME/scratch/src/sstcore-9.1.0

3. Review prerequisite package installation locations and use this to construct a configure line for SST-Core. For more information on SST-Core configuration click here or run $ ./configure –help

4. Configure SST-Core, being sure to make configure reference the location of SST-Core’s local prerequisite packages.

$ ./configure --prefix=$SST_CORE_HOME [other configure settings as needed]

5. Build and install SST-Core

$ make all
$ make install

6. Update your PATH environment variable so that it contains the bin directory of the SST-Core installation location.

$ export PATH=$SST_CORE_HOME/bin:$PATH

7. Test your SST-Core install

$ which sst
$ sst --version
$ sst-info

8. To make the changes to the environment variables a permanent change, it may require editing of your login shell’s initialization file.



SST Elements 9.1.x Build and Installation

After SST-Core has been successfully installed, SST-Elements can then be built and installed.

1. Obtain the SST-Elements 9.1.x source code and save it in $HOME/scratch/src. The tarfile can be downloaded from here.

$ cd $HOME/scratch/src
$ tar xfz sst-elements-library-9.1.0.tar.gz
$ cd $HOME/scratch/src/sst-elements-library-9.1.0

2. Set the home directory environment variable to the SST-Elements installation (i.e. where you want the SST-Elements files installed), and the source directory.

$ export SST_ELEMENTS_HOME=$HOME/local/sstelements-9.1.0
$ export SST_ELEMENTS_ROOT=$HOME/scratch/src/sst-elements-library-9.1.0

3. Review prerequisite package installation locations and use this to construct a configure line for SST-Elements. For more information on SST-Elements configuration click here or run $ ./configure –help

4. Configure SST-Elements, being sure to make configure reference the location of SST-Elements’s local prerequisite packages.

$ ./configure --prefix=$SST_ELEMENTS_HOME --with-sst-core=$SST_CORE_HOME [other configure settings as needed]

5. Build and install SST-ELEMENTS (This will register SST-Elements with the SST-Core)

$ make all
$ make install

6. Update your PATH environment variable so that it contains the bin directory of the SST-ELEMENTS installation location.

$ export PATH=$SST_ELEMENTS_HOME/bin:$PATH

7. To make the changes to the environment variables a permanent change, it may require editing of your login shell’s initialization file.



Testing SST 9.1.x Functionality

1. Run a very simple sanity test

$ sst --version

2. Verify elements are installed (should generate a list of elements)

$ sst-info

3. Run a very simple simulation

$ sst <Path to SST-Elements Source Directory>/src/sst/elements/simpleElementExample/tests/test_simpleRNGComponent_mersenne.py


Other SST Elements

Additional SST elements are available at the GitHub sstsimulator organization page.

1. Verify that applications in the SST-Core bin directory are found in the proper directory defined by the PATH environment variable>

$ which sst-register
$ which sst-config

sst-external-element

The sst-external-element element is an example template to demonstrate how to build a standalone 3rd party element.

After SST-Core has been successfully installed, the sst-external-element element can then be built and installed.

Note: The instructions below assume the user will clone the external element. The user may also download the sst-external-element 9.1.x released element

1. Clone the master branch of sst-external-element in $HOME/scratch/src. The repository can be found here.

$ cd $HOME/scratch/src
$ git clone https://github.com/sstsimulator/sst-external-element.git
$ cd $HOME/scratch/src/sst-external-element
$ git checkout v9.1.0_Final

2. Build and install sst-external-element (This will register sst-external-element with the SST-Core)

$ cd src
$ make

juno

The juno element is a very lightweight processor model which executes programs written in a simple assembly.

After SST-Core and SST-Elements have been successfully installed, the juno element can then be built and installed.

Note: The instructions below assume the user will clone the external element. The user may also download the juno 9.1.x released element

1. Clone the master branch of juno in $HOME/scratch/src. The repository can be found here.

$ cd $HOME/scratch/src
$ git clone https://github.com/sstsimulator/juno.git
$ cd $HOME/scratch/src/juno
$ git checkout v9.1.0_Final

2. Build and install juno (This will register juno with the SST-Core)

$ cd src
$ make
$ cd ..

3. Build the juno assembler

$ cd asm
$ make
$ cd ..

To use the assembler

<juno root dir>/asm/sst-juno-asm -i <inputfile>.juno -o <outputfile>.bin

Example:
$ cd ./test/asm/
$ ../../asm/sst-juno-asm -i sum.juno -o sum.bin
$ cd ../sst
$ JUNO_EXE=../asm/sum.bin sst juno-test.py

balar

The balar element is a GPU Simulation model based on the PTX virtual ISA.

For the balar component to be registered with SST-Core, it must be built prior to building SST-Elements.

Note: The instructions below assume the user will clone the external element. The user may also download the balar 9.1.x released element

NOTE: SST-Core must be built with –disable-mpi and –disable-mem-pools for Balar with GPGPU-Sim to run properly

NOTE: CUDA MUST BE INSTALLED ON THE SYSTEM

1. Clone the master branch of balar in $SST_ELEMENTS_ROOT/src/sst/elements/balar. The repository can be found here.

$ cd $SST_ELEMENTS_ROOT/src/sst/elements
$ git clone https://github.com/sstsimulator/balar.git $SST_ELEMENTS_ROOT/src/sst/elements/balar
$ cd balar
$ git checkout v9.1.0_Final

2. Clone the master branch of sst-gpgpusim-external in $SST_ELEMENTS_ROOT/src/sst/elements/balar/sst-gpgpusim. The repository can be found here.

$ cd $SST_ELEMENTS_ROOT/src/sst/elements/balar
$ git clone https://github.com/purdue-aalp/sst-gpgpusim-external $SST_ELEMENTS_ROOT/src/sst/elements/balar/sst-gpgpusim
$ cd balar/sst-gpgpusim
$ git checkout v9.1.0_final

3. Setup the GPGPU-Sim Environment and build it NOTE: CUDA must be installed for the setup-environment script to work properly.

$ cd $SST_ELEMENTS_ROOT/src/sst/elements/balar/sst-gpgpusim
$ export GPGPUSIM_ROOT=`pwd`
$ source setup-environment
$ make

4. FOR SST-Elements 9.1 - Copy required file - balar will fail to build if this is not done

$ cd $SST_ELEMENTS_ROOT/config
$ wget https://github.com/sstsimulator/sst-elements/blob/v9.1.0_beta/config/sst_check_gpgpusim.m4
$ ls sst_check_gpgpusim.m4

5. Build and install balar (NOTE: This will re-build and install SST-Elements)

$ cd $SST_ELEMENTS_ROOT
$ ./autogen.sh
$ ./configure --prefix=$SST_ELEMENTS_HOME --with-sst-core=$SST_CORE_HOME --with-pin=$PIN_HOME --with-cuda=$CUDA_ROOT --with-gpgpusim=$GPGPUSIM_ROOT <other configure optons as desired>
$ make
$ make install


What’s Next…



Configuration selection for Internal Elements and Optional/Required External Components

Below is a description of the Elements provided with SST 9.1.x. Most elements are automatically included in the configuration. Some elements are only enabled when the –with-“external component” is set. For more information, see Instructions for Additional External SST Components