Dynamic Compilation and Linking using SPACK

Contents provided by Centre for Development of Advanced Computing.

On Parampravega, the packaging utility called SPACK is used to bundle programming environment requirements necessary for a specific job. The usefulness of the Spack packaging manager is the identification of necessary dependencies associated with a specific programming environment. The job scheduler used is SLURM.

Users can interactively build their execution files on the login nodes but will have to use the batch job scheduler (SLURM) for executing jobs on the system. To ensure that the required programming environment is available during execution, the user must include and load the necessary modules through their job script. This system can only be used in batch execution mode and users must submit their jobs using job scripts to the SLURM job scheduler

SPACK

PARAM Pravega extensively uses spack. The purpose of spack is to provide freedom to users for loading required application or package of specific versions with all its dependencies in the user environment. Users can find the list of all installed packages with their specific version and dependencies. This also specifies which version of the application is available for a given session. All applications and libraries are made available through spack. A user must load the appropriate package from the available list of packages on the system to enable access to the application during its execution. The following table lists some useful commands to find and list the necessary installed software on the system:

Spack command Explanation
$module load spack To load spack module and setting up environment of spack.
$spack find This command lists all installed packages.
$spack find –path Shows the path of all installed packages with hash key.
$spack load package_name Loads specified package with all dependencies in user environment.
$spack load <compiler name>@<version>
Example:
$spack load gcc@11.2.0
$gcc –v
Load gcc@11.2.0 in user environment
Shows the path and currently using gcc.It must Show the loaded gcc version.
Shows the default gcc version available in spack.
$spack unload package_name
Example:
$spack unload gcc@11.2.0
Remove specified package with all dependencies from user environment. Remove gcc@11.2.0 from user.