Scientific Software Tools and Parallel Algorithms¶
PhD in High Performance Scientific Computing (HPSC)
Luca Heltai (luca
Academic Year: 2025–2026
Why SSPA?¶
Lessons learned from 25 years of development of the deal.II library¶
Modern, collaborative, workflows – Git, CI, containers, docs.
Reproducible research – code that runs everywhere.
Scalable simulations – get speed‑ups from 1 CPU → 1 k CPUs.
5‑Weeks¶
| Week | Focus | Key Tools |
|---|---|---|
| 1 | Unix shell + Slurm | Bash, SSH, Slurm |
| 2 | Version control | Git, GitHub |
| 3 | Documentation & testing | Doxygen, Sphinx, pytest / gtest |
| 4 | Containers & CI | Docker / Apptainer, GitHub Actions |
| 5 | Parallel algorithms | Amdahl/Gustafson, MPI/OpenMP |
What You’ll Build¶
| Outcome | How |
|---|---|
| Portable repo | Git, Dockerfile, CI pipeline |
| Automated docs | Sphinx → website |
| Robust tests | pytest / gtest + CI |
| Fast code | Parallel demo, profiling |
Hands‑On Labs¶
Bash scripts that launch jobs on a mini‑cluster.
Git PRs – merge‑conflict playground.
Docker build → run on an HPC node.
Parallel programming crash course – 1→8 cores for π Monte‑Carlo.
Preliminary steps¶
Tools to install¶
Quick start list – these are the essential tools you’ll need before the labs begin.
Visual Studio Code¶
Lightweight, highly extensible IDE
Install on Ubuntu:
sudo snap install --classic codeOr download from https://
code .visualstudio .com/
OpenSSH¶
Secure remote login to the cluster (and to Docker containers)
Install:
sudo apt install openssh-client openssh-serverGit¶
Version control, branch/PR workflow
Install:
sudo apt install gitDocker¶
Build & run containers locally and on the cluster
Install:
sudo apt install docker.ioOr follow the official guide: https://
docs .docker .com /engine /install/
Tip – Add your user to the docker group so you can run containers without sudo:
sudo usermod -aG docker $USERand then log‑out / back‑in.
Set Up a GitHub Account¶
Configure SSH‑Key Auth¶
No passwords, just key‑based login
Create a GitHub account – https://
github .com /join
Generate a new SSH key (leave the passphrase empty for painless CI)
ssh-keygen -t ed25519 -C "your_email@example.com"
# default: ~/.ssh/id_ed25519
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Add Your SSH Key to GitHub¶
Copy your public key
cat ~/.ssh/id_ed25519.pub
Copy the whole output to your clipboard.
Log in to GitHub
Open https://github.com and go to Settings → SSH and GPG keys.
Create a new key
Click New SSH key
Give it a descriptive title (e.g., Laptop – 2025)
Paste the key you copied into the Key field.
Save
Click Add SSH key – you may be asked to re‑enter your GitHub password.
Verify
ssh -T git@github.com
You should see:
Hi
your‑username! You’ve successfully authenticated, but GitHub does not provide shell access.
Optional – Force SSH for Git
git config --global url."git@github.com:".insteadOf "https://github.com/"
Configure git¶
Set your user identity
git config --global user.name "Your Full Name"
git config --global user.email "you@example.com"Choose a default editor (optional)
git config --global core.editor "code --wait"Enable color output
git config --global color.ui autoShow a friendly status prompt
git config --global status.showUntrackedFiles allVerify the config
git config --list --show-originTip:
• Usegit config --global --editto manually tweak the~/.gitconfig.
• If you work on multiple accounts, set a local config per repository (git config user.name …inside that repo).
With these settings, your Git history will always show the correct author, and the command line will feel a lot friendlier.
Check docker installation¶
docker --version
docker run hello-worldNext Steps¶
Clone the course repo:
git clone git@github.com:luca-heltai/sspa.gitExplore around