AMD Toolchain with SPACK

Micro Benchmarks/Synthetic

SPACK HPC Applications

Setting up Spack

Steps to clone from the Spack community and set the environment for Spack:

# Install Spack into SPACK_ROOT directory
$ export SPACK_ROOT=/path/spack
# Now get Spack
$ git clone -c feature.manyFiles=true ${SPACK_ROOT}
$ source ${SPACK_ROOT}/share/spack/
$ spack help
# You can add following lines to your .bashrc or .profile file to set the paths
$ export SPACK_ROOT=/path/spack
$ source ${SPACK_ROOT}/share/spack/

Listing the available compilers

Spack has the ability to build packages with multiple compilers and compiler versions. Spack searches for compilers on your machine automatically the first time it is run. It does this by inspecting your $PATH.

Run spack compilers or spack compiler list to view all the compilers Spack has found on your system:

Spack compilers
# To list available compilers
$ spack compilers
==> Available compilers
— aocc centos8-x86_64 ——————————————
aocc@3.2.0 aocc@3.1.0
— gcc centos8-x86_64 ——————————————-

If you do not find a compiler in this list, but you want to use it with Spack, you can run spack compiler find with the path to where the compiler is installed.

Build Your Own Compiler

Install GCC using Spack
# To install gcc@10.2.0
$ spack install gcc@10.2.0
# To add gcc@10.2.0 to your list of compilers
$ spack cd -i gcc@10.2.0
$ spack compiler add $PWD
# or you can add by spack compiler find
$ spack compiler find <Path to gcc@10.2.0>

Some Basic Commands

Some basic commands
# Update your git Repo
$ git pull
# To source spack env
$ source ${SPACK_ROOT}/share/spack/
# Show information for package Stream
$ spack info stream
# Shows installed packages of stream
$ spack find stream
# Show available compilers
$ spack compilers
# To edit compiler.yaml file
$ spack config edit compilers
# Show spack recipe for Stream package
$ spack edit stream
# Show build configuration for Stream
$ spack spec stream
# Install Stream package
$ spack install stream
# Uninstall Stream package
$ spack uninstall stream
# Go to location spack package location
$ spack cd -p stream
# Go to Stream installed location
$ spack cd -i stream
# List installed details of Stream
$ spack find -Ldvf stream
# Install specific version with @
$ spack install stream@5.10
# Specify a compiler with %
$ spack install stream@5.10 %aocc
# Add compile time opts with +
$ spack install stream +openmp
# Add custom compiler flags
$ spack install stream cflags="-O3"