Spack Setup and SIESTA Installation Guide
This tutorial shows the step by step process to install the SIESTA aplication on the new shared storage infrastructure, using Spack.
First Steps
Setup Spack Environment
export SPACK_ROOT=/nfs/software/citimac/spack
export SPACK_DISABLE_LOCAL_CONFIG=true
source ${SPACK_ROOT}/share/spack/setup-env.sh
Now you can find, manage, and install any packages you want using the Spack utilities.
Spack Configuration
Configuring Spack to Find External Software
To make Spack recognize already installed software, some configuration changes are necessary.
Add existing compilers
To add existing compilers to Spack you can edit the compilers.yaml file. You can find an example configuration here.
spack config edit compilers
Add existing software
To add existing software to Spack you can edit the packages.yaml
file. You can find an example configuration here.
spack config edit packages
Note: The default compiler is set to the system's gcc@8.5.0
, and the CPU architecture target is x86_64_v2
. These parameters are defaults but can be explicitly overridden for any package.
Compiling SIESTA
Environment
It is important to be aware of the compiler we are using and the CPU architecture of the node we are compiling on. To reduce risk of applicacion incompatibilties make sure to check if you are using the adeacuate compiler and architecture to later execute you application in the desired compute nodes.
In this tutorial all the compiling has been done on an intel x86_64_v2
CPU using the existing GCC compiler of the server. These parameters are specified in the packages.yaml
file as provided in the example.
SIESTA-Specific Steps
It is possible to install SIESTA with Spack by using appropriate versions of the “recipes” used by SIESTA and its dependencies. Typically, these recipes are kept in the built-in repository that is part of the Spack distribution. However, the Siesta-related recipes in this default repository might be outdated.
To ensure the latest version is used, follow these steps:
git clone https://gitlab.com/siesta-project/ecosystem/build-tools.git
cd build-tools/Spack/
spack repo add siesta-project-spack-repo
spack repo list
Checking and Installing SIESTA
spack spec siesta
spack install siesta
Generating Module Files
With Spack, we can generate modulefiles for every installed package.
- Edit the module configuration. You can find an example configuration here.
spack config edit modules
- Generate modulefiles:
spack module tcl --name apps refresh --delete-tree -y
spack module tcl --name libs refresh --delete-tree -y
Running SIESTA
Already at the compute node:
module use /nfs/software/citimac/spack/modulefiles/auto/apps
module load siesta
siesta -v