Installing Software on MetaCentrum¶
This page describes a practical team workflow for compiling software from source on MetaCentrum.
For official guidance first, see:
When to use this guide¶
Use this guide when:
- You need a newer version than the centrally installed one.
- You need custom compilation flags or optional libraries.
- A code requires a specific compiler or MPI stack.
Recommended workflow (generic)¶
- Build inside an interactive job (not on a busy login shell).
- Unpack source code into your project directory.
- Load the required OS environment and modules.
- Configure and compile with explicit options.
- Install to a user-owned location.
- Run test/check targets before production runs.
- Record exact modules and commands for reproducibility.
Minimal generic template¶
# 1) Start an interactive build job
qsub -I -l walltime=2:00:00 -l select=1:ncpus=8:mem=20gb
# 2) Prepare source tree
cd /path/to/source/archive
# Example archive command, adjust extension as needed
# tar -zxf software-x.y.z.tar.gz
# 3) Optionally switch OS compatibility layer if required by the package
# run_in_os debian11
# 4) Load toolchain and libraries (example only)
# module add <compiler-module>
# module add <mpi-module>
# module add <math-library-module>
# 5) Configure/build/install (package-specific)
# ./configure --prefix=/path/to/install
# make -j 8
# make install
# 6) Validate
# make check -j 8
Worked example: CASTEP 25.1¶
The commands below are a documented working example from team usage.
Notes¶
- The installation is time-consuming. In one tested run it took about 1 hour on 8 CPUs.
- Use an interactive job for the build.
- The Debian11 runtime switch is used only for installation compatibility.
Build steps¶
qsub -I -l walltime=2:00:00 -l select=1:ncpus=8:mem=20gb
cd /path/where/is/your/CASTEP-25.1.tar.gz
tar -zxf CASTEP-25.1.tar.gz
cd CASTEP-25.1
# Activate Debian11 environment for compilation compatibility.
run_in_os debian11
module add intel-oneapi-mkl/2022.1.0-intel-2021.6.0-ndqwmkd
module add intel-oneapi-mpi/2021.6.0-intel-2021.6.0-razgfqp
module add intel-oneapi-compilers/2022.1.0-gcc-10.2.1-ir6y5fb
make OPT=-O2 COMMS_ARCH=mpi SUBARCH=mpi FFT=mkl MATHLIBS=mkl LIBXC=compile -j 8
During the build, you may be asked twice for the MKL path. Use:
/cvmfs/software.metacentrum.cz/spack18/software/linux-debian11-x86_64_v2/intel-2021.6.0/intel-oneapi-mkl-2022.1.0-ndqwmkdtrkxvfth7ancyqvowcfkxpcou/mkl/2022.1.0
Continue with installation and checks:
make install -j 8
# If prompted: "/linux_x86_64_ifort--serial does not exist. Create [y/n]?"
# Answer: y
make check -j 8
# Expected summary: [495/495]
cd Test
make check MAX_PROCS=8 PARALLEL="--total-processors=8 --processors=4"
# Expected summary: [494/494]
Team reproducibility checklist¶
After a successful build, save these details in your project notes:
- Source archive name and version.
- Full module list (
module list). - Full build command.
- Install location.
- Test summary (
make checkresults). - Any interactive prompts and your responses.