Building Your Own Software on the Vega System
This document describes recommended approaches for preparing your own software on the Vega system. It is intended for users who want to use software versions that are not available through system modules or pre-built containers, or who want to prepare their own software environments.
Overview of available options
On the Vega HPC system, software can be prepared in the following ways:
- Building from source code - recommended for individual applications or libraries.
- Custom modules (Lmod) - for easy usage of multiple software versions.
- Apptainer containers - for portable and reproducible software environments.
The appropriate method depends on your use case. The table below provides guidance when selecting the preferred approach:
| scenario | recommended solution |
|---|---|
| single application | build from source code |
| multiple versions of the same software | custom module |
| complex software environment with many dependencies | Apptainer container |
All approaches are universal and can support different software environments.
Building from source code
Building software from source code is the fastest way to provide a custom software environment. The build procedure depends on the specific software package and version. Instructions are usually provided in the documentation of each software package.
Tools required for building the software package should be enabled using modulov. Example:
module purge
module load GCC
module load CMake
It is recommended to install software in your home directory so that it is available on all compute nodes.
| area | path | description |
|---|---|---|
| home | /ceph/hpc/home/$USER | User home directory on a shared filesystem mounted on compute and login nodes |
Create a directory for the software source code in your home directory.
Example:
mkdir -p $HOME/software/myprogram/src
cd $HOME/software/myprogram/src
Next, follow the software build procedure described in the package documentation. First, download the source code into the directory you created (using tools such as git, wget, etc.). Example:
git clone ...
Then configure the build. It is necessary to define the directory where the compiled software will be installed (inside your home directory). Use the build documentation provided for the specific software package. Software documentation can usually be found on project wiki pages or on the project's GitHub repository. Before building the software, load the required modules: more information about compilers and development environments. Example:
mkdir -p $HOME/software/myprogram/bin
cmake \ -DCMAKE_INSTALL_PREFIX=$HOME/software/myprogram/bin \ ..
or
./configure --prefix=$HOME/software/myprogram/bin
Then compile and install the software to the configured location. Example:
make
make install
After installation, the software can be used directly or a custom module can be prepared. The program can be executed directly using slurm.
Preparing a custom module
Custom modules allow simple usage of installed software with the module load command. This approach is especially useful when multiple versions of the same software are required or when switching between different software environments.
Create a directory for your modules in your home directory using the structure described below. The first directory level should contain software names, and the second level should contain modulefiles named according to the software version.
Recommended directory structure:
$HOME
└── modules
└── package
└── 1.0
The modulefile defines paths and configures the required environment. Create the modulefile:
touch 1.0
The following example shows the general structure. It must be adapted according to the specific software installation and usage instructions.
In a modulefile, the prepend-path command adds a path to the beginning of an existing environment variable.
Example modulefile:
#%Module1.0
proc ModulesHelp { } {
puts stderr "myprogram 1.0"
}
module-whatis "myprogram 1.0"
set root $::env(HOME)/software/myprogram
prepend-path PATH $root/bin
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path MANPATH $root/share/man
prepend-path PKG_CONFIG_PATH $root/lib/pkgconfig
After creating the modulefile, the directory containing the modules must be added: module use $HOME/modules. The module can then be loaded: module load myprogram/1.0.
After loading the module, executable files from: $HOME/software/myprogram/bin will automatically become available in the command line environment.
The program can then be executed using Slurm.
Preparing custom Apptainer containers
An Apptainer container can be prepared:
- on your local computer,
- on another Linux system,
- using a remote build service.
An Apptainer container can be created from a pre-built container image (for example, Docker) or from a local container definition file.
More information about building containers and examples of container definition files can be found here.
Transfer the resulting .sif file to Vega and use it directly.
Containers should be stored in your home directory.