Skip to content

Spack on MeluXina

The MeluXina system environment provides the Spack package management tool.

EasyBuild module description

Spack is a package manager for supercomputers, Linux, and macOS. It makes installing scientific software easy. With Spack, you can build a package with multiple versions, configurations, platforms, and compilers, and all of these builds can coexist on the same machine.

You can use Spack to configure your software environment and install your own packages locally.

Spack usage

Interactive

Reserve an interactive session:

salloc -A COMPUTE_ACCOUNT -t 01:00:00 -q dev --res cpudev -p cpu -N 1

The example above will allocate one CPU node in interactive mode (dev QoS with cpudev reservation). Load the Spack module as in below script.

module load Spack
spack install mpileaks

Batch

Spack can also be used in a batch job using Slurm. The script below install mpileaks package on one CPU node allocated for 1h.

#!/bin/bash -l
#SBATCH -N 1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH -p cpu
#SBATCH -q short

#Load Spack module
module load Spack

#Check Spack version
spack --version

#Install mpileaks with Spack
spack install mpileaks

#Check the version of mpileaks installed
spack versions mpileaks

#More info on installed mpileaks package
spack info mpileaks