Skip to content

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:

    python3 -m venv myproject
    source myproject/bin/activate

Linear Algebra Libraries

BLAS (Basic Linear Algebra Subprograms)

BLAS provides standard building blocks for performing basic vector and matrix operations.

Installation:

pip install pyblas

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:

pip install lapack

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:

pip install PyScalapack

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:

pip install scalapack4py


Interactive Computing

Jupyter

Jupyter is a metapackage that installs all Jupyter components including JupyterLab, Jupyter Notebook, and related tools for interactive computing.

Installation:

pip install jupyter

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
Then set up SSH port forwarding to access it from your local machine.


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:

pip install psi4

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:

    #SBATCH --mem=32G

Best Practices

Tip — Export Your Environment

Save your environment configuration for reproducibility:

    pip freeze > requirements.txt
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:

  1. Create a fresh environment
  2. Install packages in order of complexity (BLAS → LAPACK → ScaLAPACK)
  3. Use pip with verbose output for debugging: pip install --verbose package_name

Check Installed Packages

List all packages in your current environment:

    pip list
Search for specific packages:

bash pip list | grep blas