This is a repo containing Spack scripts for installing various projects in the CAS-GPI-Space framework
Spack is a package manager specifically aimed at handling software installations in supercomputing environments, but usable on anything from a personal computer to an HPC cluster. It supports Linux and macOS (note that the CAS-GPI-Space framework and hence our packages require Linux).
We will assume that the user has some directory path with read and
write access. In the following, we assume this path is set as the environment variable
software_ROOT
, as detailed in the following example:
export software_ROOT=~/singular-gpispace
Note, this needs to be set again if you open a new terminal session (preferably set it automatically by adding the line to your .profile file).
If Spack is not already present in the above directory, clone Spack from Github:
git clone https://github.com/spack/spack.git $software_ROOT/spack
We check out verison v0.19.0 of Spack (the current version):
cd $software_ROOT/spack
git checkout releases/v0.19
cd $software_ROOT
Spack requires a couple of standard system packages to be present. For example, on an Ubuntu machines they can be installed by the following commands (which typically require sudo privilege)
sudo apt update
sudo apt install build-essential ca-certificates coreutils curl environment-modules gfortran git gpg lsb-release python3 python3-distutils python3-venv unzip zip
To be able to use spack from the command line, run the setup script:
. $software_ROOT/spack/share/spack/setup-env.sh
Note, this script needs to be executed again if you open a new terminal session (preferably set it automatically by adding the line to your .profile file).
Finally, Spack needs to boostrap clingo. This can be done by concretizing any spec, for example
spack spec zlib
Note: If you experience connection timeouts due to a slow internet connection you can set in the following file the variable connect_timeout
to a larger value.
vim $software_ROOT/spack/etc/spack/defaults/config.yaml
Note that Spack can be uninstalled by just deleting its directory and its configuration files. Be CAREFUL to do that, since it will delete your Spack setup. Typically you do NOT want to do that now, so the code is commented out. It can be useful if your Spack installation is broken:
#cd
#rm -rf $software_ROOT/spack/
#rm -rf .spack
Once you have installed Spack, our package can be installed with just three lines of code.
Clone the CAS-GPI-Space package repository into this directory:
git clone https://github.com/singular-gpispace/spack-packages.git $software_ROOT/spack-packages
Add the CAS-GPI-Space package repository to the Spack installation:
spack repo add $software_ROOT/spack-packages
Now you are good to go to install specific packages of the framework. For example, you could do:
spack install pfd-parallel
If you install your first package, this will take a bit of time since a lot of dependencies are installed, e.g. Singular and GPI-Space.
To use the package you have to load it:
spack load pfd-parallel
Please refer to the repos of the various packages on how to use them.