Installation
SLATE can be built from source using Makefile, CMake, or installed via Spack. This guide covers all three methods.
Prerequisites
SLATE requires:
C++ Compiler: C++17 support (GCC 7+, Clang 5+, Intel 19+)
MPI: MPI-3.0+ with
MPI_THREAD_MULTIPLEsupportOpenMP: OpenMP 4.5+
BLAS/LAPACK: Optimized implementation (MKL, OpenBLAS, ESSL, LibSci, etc.)
Optional for GPU acceleration:
NVIDIA GPUs: CUDA toolkit
AMD GPUs: ROCm
Intel GPUs: oneAPI with SYCL/DPC++
Downloading Source
Clone the repository with submodules:
# HTTPS
git clone --recursive https://github.com/icl-utk-edu/slate.git
# SSH
git clone --recursive git@github.com:icl-utk-edu/slate.git
cd slate
Makefile Build
The Makefile build auto-detects compilers and dependencies from your environment.
Basic Configuration
Create a make.inc file with your configuration:
# make.inc
CXX = mpicxx
FC = mpif90
blas = openblas
Build and Install
make lib # Build libraries
make tester # Build tester
make check # Run sanity tests
make install prefix=/usr/local # Install
Configuration Options
Common make.inc options:
# Compiler settings
CXX = mpicxx
FC = mpif90
# BLAS library: openblas, mkl, essl, accelerate
blas = mkl
# GPU support: cuda, hip, sycl, or leave empty
gpu_backend = cuda
# Build type
# Use 'make static' for static libraries
# Additional flags
CXXFLAGS += -O3
LDFLAGS += -L/path/to/lib
CMake Build
CMake provides more control over configuration.
Basic Build
mkdir build && cd build
export CXX=g++
export FC=gfortran
cmake -D blas=openblas \
-D CMAKE_INSTALL_PREFIX=/usr/local \
..
make lib # Build libraries
make tester # Build tester
make check # Run sanity tests
make install # Install
CMake Options
Option |
Description |
Default |
|---|---|---|
|
BLAS library (openblas, mkl, essl, etc.) |
auto-detect |
|
GPU backend (cuda, hip, sycl, none) |
auto-detect |
|
Build shared libraries |
ON |
|
Installation directory |
/usr/local |
|
Build type (Release, Debug) |
Release |
Example with MKL and CUDA
cmake -D blas=mkl \
-D gpu_backend=cuda \
-D CMAKE_CUDA_ARCHITECTURES=70 \
-D CMAKE_INSTALL_PREFIX=$HOME/local \
..
Spack Installation
Spack is the recommended method for HPC systems.
Install Spack
If you don’t have Spack:
git clone https://github.com/spack/spack.git
source spack/share/spack/setup-env.sh
spack compiler find
Install SLATE
# View available options
spack info slate
# Install with defaults
spack install slate
# With specific compiler
spack install slate %gcc@11.3.1
# With OpenBLAS, without CUDA
spack install slate %gcc@11.3.1 ^openblas ~cuda
# With CUDA support
spack install slate %gcc@11.3.1 +cuda cuda_arch=70
Loading SLATE
spack load slate
# or
module load slate # if configured
GPU-Aware MPI
For optimal GPU performance, enable GPU-aware MPI:
# Enable SLATE's GPU-aware MPI
export SLATE_GPU_AWARE_MPI=1
# For Cray MPI (Frontier, Perlmutter)
export MPICH_GPU_SUPPORT_ENABLED=1
Check your HPC center’s documentation for additional flags.
Verifying Installation
Run the basic test suite:
export OMP_NUM_THREADS=8
# Single process test
./test/tester gemm
# Multi-process test (4 MPI ranks)
mpirun -n 4 ./test/tester gemm
# With Slurm
srun --nodes=4 --ntasks=16 --cpus-per-task=${OMP_NUM_THREADS} \
./test/tester gemm
Successful output:
gemm dtype=d, origin=h, target=t, transA=n, transB=n, m=100, n=100, k=100, ...
time=0.00123, gflop/s=1.63, ref_time=..., ref_gflop/s=..., error=1.2e-15, okay
Troubleshooting
Common Issues
MPI_THREAD_MULTIPLE not supported
Some MPI implementations require configuration. For OpenMPI:
mpirun --mca mpi_thread_multiple 1 -n 4 ./program
BLAS library not found
Set library paths:
export LIBRARY_PATH=/path/to/blas/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/path/to/blas/lib:$LD_LIBRARY_PATH
CUDA not detected
Ensure nvcc is in your PATH:
export PATH=/usr/local/cuda/bin:$PATH
Getting Help
User Forum: https://groups.google.com/a/icl.utk.edu/g/slate-user
BLAS++ Issues: https://github.com/icl-utk-edu/blaspp/issues/
LAPACK++ Issues: https://github.com/icl-utk-edu/lapackpp/issues/
Module Environment (HPC Systems)
Many HPC systems provide SLATE as a module:
module avail slate
module load slate
Check with your HPC support desk for available versions and configurations.