Skip to content

Installation of pfd‐parallel using Spack

Janko Boehm edited this page Jan 1, 2024 · 4 revisions

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 Singular/GPI-Space framework and hence our package requires 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
export install_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).

Install Spack

We first give a short acoount on how to install Spack for use in our setting.

Installation of Spack

Install pfd-parallel

Once you have installed Spack, our package can be installed with just three lines of code.

Clone the Singular/GPI-Space package repository into this directory:

git clone https://github.com/singular-gpispace/spack-packages.git $software_ROOT/spack-packages

Add the Singular/GPI-Space package repository to the Spack installation:

spack repo add $software_ROOT/spack-packages

Finally, install pfd-parallel:

spack install pfd-parallel

Note, this may take quite a bit of time, when doing the initial installation, as it needs to build GPI-Space and Singular including dependencies. Installing further components of the framework or updating is then typically quick.

Load pfd-parallel

Once pfd-parallel is installed, to use pfd-parallel load the package via:

spack load pfd-parallel

Note, that this command needs to be executed again if you open a new terminal session. In particular, the environment variable PFD_INSTALL_DIR is available only after executing this command.

Set up ssh

GPI-Space requires a working SSH environment with a password-less SSH-key when using the SSH RIF strategy. To ensure this, leave the password field empty when generating your ssh keypair.

By default, ${HOME}/.ssh/id_rsa is used for authentication. If no such key exists,

ssh-keygen -t rsa -b 4096 -N '' -f "${HOME}/.ssh/id_rsa"

can be used to create one.

If you compute on your personal machine, there must run an ssh server. On an Ubuntu machine, the respective package can be installed by:

sudo apt install openssh-server

Your key has to be registered with the machine you want to compute on. On a cluster with shared home directory, this only has to be done on one machine. For example, if you compute on your personal machine, you can register the key with:

ssh-copy-id -f -i "${HOME}/.ssh/id_rsa" "${HOSTNAME}"