Software Installation Guide¶
This guide provides instructions for installing commonly used scientific software packages on the PERUN cluster using Python Virtual Environments.
Overview¶
All software installations should be performed within Python virtual environments to ensure:
- Isolated dependencies for different projects
- Reproducible environments across computing sessions
- No conflicts with system libraries or other projects
Tip — Create a Dedicated Environment
Before installing any software, create a new Python virtual environment:
Linear Algebra Libraries¶
BLAS (Basic Linear Algebra Subprograms)¶
BLAS provides standard building blocks for performing basic vector and matrix operations.
Installation:
Version Information
Latest version: 2.307
LAPACK (Linear Algebra PACKage)¶
LAPACK is a library of high-performance linear algebra routines for solving systems of linear equations, eigenvalue problems, and singular value decomposition.
Installation:
Version Information
Latest version: 3.11.0
ScaLAPACK (Scalable LAPACK)¶
ScaLAPACK is a library of high-performance linear algebra routines for parallel distributed memory machines. It extends LAPACK to distributed-memory architectures.
Installation:
Version Information
Latest version: 2.2.0
Parallel Computing
ScaLAPACK requires MPI (Message Passing Interface) for parallel execution. Ensure your job script properly configures MPI before using ScaLAPACK.
Alternative Installation:
Interactive Computing¶
Jupyter¶
Jupyter is a metapackage that installs all Jupyter components including JupyterLab, Jupyter Notebook, and related tools for interactive computing.
Installation:
Version Information
Latest version: 1.1.1
Tip — Launch Jupyter on Compute Nodes
To use Jupyter on PERUN, submit an interactive job and launch Jupyter from within:
srun --partition=gpu --gres=gpu:1 --pty bash
source myproject/bin/activate
jupyter lab --no-browser --port=8888
Quantum Chemistry¶
Psi4¶
Psi4 is an open-source quantum chemistry package written in C++ and driven by Python, designed for efficient and accurate electronic structure calculations.
Installation:
Version Information
Latest version: 1.10
Example — Basic Psi4 Usage
import psi4
psi4.set_memory('8 GB')
psi4.set_num_threads(4)
# Define molecule
mol = psi4.geometry("""
O
H 1 0.96
H 1 0.96 2 104.5
""")
# Run calculation
energy = psi4.energy('scf/cc-pvdz')
Critical — Memory Requirements
Quantum chemistry calculations can be memory-intensive. Always specify appropriate memory limits in your SLURM job script:
Best Practices¶
Tip — Export Your Environment
Save your environment configuration for reproducibility:
Recreate the environment later:
bash
python3 -m venv myproject
source myproject/bin/activate
pip install -r requirements.txt
Environment Activation
Always activate your environment before running jobs:
#!/bin/bash
#SBATCH --job-name=my_job
source ~/myproject/bin/activate
# Your commands here
python my_script.py
Example — Complete Installation Workflow
# Create new environment
python3 -m venv scientific_computing
source scientific_computing/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install required packages
pip install PyScalapack
pip install lapack
pip install jupyter
# Verify installation
python -c "import numpy; print(numpy.show_config())"
Troubleshooting¶
Package Conflicts
If you encounter dependency conflicts during installation:
- Create a fresh environment
- Install packages in order of complexity (BLAS → LAPACK → ScaLAPACK)
- Use pip with verbose output for debugging:
pip install --verbose package_name
Check Installed Packages
List all packages in your current environment:
Search for specific packages:
bash
pip list | grep blas