Skip to content

Commit bde9b2f

Browse files
authored
Merge pull request #22 from opensolvers/site-updates
Add Quantum ESPRESSO app page
2 parents 465c7ae + 4c6df5d commit bde9b2f

7 files changed

Lines changed: 79 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ OpenSolvers explores how open-source scientific software runs on real hardware
44

55
We benchmark **scientific libraries** and **applications** on consumer RISC-V boards through the [EESSI](https://www.eessi.io/) stack — from BLAS kernels up to full app runs — swapping fixed OpenBLAS builds via FlexiBLAS without rebuilding downstream code.
66

7-
Recent highlights on the Orange Pi RV2 (SpaceMiT X60, RVV): fixing an OpenBLAS `gemv_n` bug restores correctness across [BLAS](scientific-libs/blas.html), [LAPACK](scientific-libs/lapack.html), [ELPA](scientific-libs/elpa.html), and [HPL](apps/hpl.html) — with patched RVV reaching **10.53 GFLOP/s** on Linpack and **1.58×** on a dense eigensolve.
7+
Recent highlights on the Orange Pi RV2 (SpaceMiT X60, RVV): fixing an OpenBLAS `gemv_n` bug restores correctness across [BLAS](scientific-libs/blas.html), [LAPACK](scientific-libs/lapack.html), [ELPA](scientific-libs/elpa.html), [HPL](apps/hpl.html), and [Quantum ESPRESSO](apps/qe.html) — with patched RVV reaching **10.53 GFLOP/s** on Linpack, **1.58×** on a dense eigensolve, and **1.31×** on a 64-atom Si DFT SCF.
88

99
## Scientific libs
1010

@@ -21,6 +21,7 @@ Library-level probes — performance *and* numerical correctness:
2121
End-to-end application benchmarks on the same boards and EESSI toolchain:
2222

2323
- **[HPL](apps/hpl.html)** — High Performance Linpack; cross-board summary and A/B configs from [opensolvers/benchmarks](https://github.com/opensolvers/benchmarks)
24+
- **[Quantum ESPRESSO](apps/qe.html)** — plane-wave DFT SCF (`pw.x`); whole-application BLAS backend A/B with per-routine timers
2425

2526
## Boards
2627

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ navigation_boards:
1717
navigation_apps:
1818
- title: HPL
1919
url: /apps/hpl.html
20+
- title: Quantum ESPRESSO
21+
url: /apps/qe.html
2022

2123
navigation_scientific_libs:
2224
- title: BLAS

apps/qe.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Quantum ESPRESSO
2+
3+
[Quantum ESPRESSO](https://www.quantum-espresso.org/) `pw.x` plane-wave DFT SCF — a **whole-application** BLAS backend A/B. Swaps only the OpenBLAS implementation (via FlexiBLAS) under one unchanged `pw.x` binary; QE comes from the EESSI module (`QuantumESPRESSO/7.5-foss-2025b`).
4+
5+
Benchmark source: [opensolvers/benchmarks/qe](https://github.com/opensolvers/benchmarks/tree/main/qe) — inputs, a Si supercell generator, and `run-qe-ab.sh` / `run-perf-ab.sh` runners.
6+
7+
## Why QE as a probe
8+
9+
[`dgemm`](../scientific-libs/dgemm.html) isolates BLAS-3; [HPL](hpl.html) and [ELPA](../scientific-libs/elpa.html) probe single HPC solvers. A full DFT SCF mixes level-3 GEMM (`calbec`, subspace rotation), dense LAPACK diagonalization, latency-bound BLAS-2, MPI, **and a large FFT fraction** — so it shows both whether a buggy vector BLAS breaks a production code, and what fraction of a real run the RVV speedup actually moves.
10+
11+
## Correctness — stock RVV `gemv_n` breaks a real DFT SCF
12+
13+
`run-qe-ab.sh si-scf.in 4` on SpaceMiT X60 ([Banana Pi F3](../boards/F3.html)), same `pw.x`, backend swapped via FlexiBLAS:
14+
15+
| Backend | Result | Total energy |
16+
| ------- | ------ | ------------ |
17+
| Stock EESSI OpenBLAS 0.3.30, default RVV | `Error in routine inverse_s (1)` → MPI_ABORT | *(none)* |
18+
| Scalar (`RISCV64_GENERIC`) | converged, 7 iterations | **−14.57861334 Ry** |
19+
| Patched RVV (`gemv_n` fix) | converged, 7 iterations (identical trace) | **−14.57861334 Ry** |
20+
21+
The stock vector backend aborts in `inverse_s` (overlap-matrix inversion / Lowdin orthonormalization, which leans on `dgemv`) — the same OpenBLAS 0.3.30 RVV `gemv_n` bug that NaNs [HPL](hpl.html) and [ELPA](../scientific-libs/elpa.html). The patched vector build reproduces the scalar SCF bit-for-bit.
22+
23+
## Performance — 64-atom Si supercell
24+
25+
`run-perf-ab.sh si-super-64.in 4` — gamma-point, np=4, `-ndiag 1` (keeps subspace diagonalization on serial LAPACK→OpenBLAS). Measured on [Banana Pi F3](../boards/F3.html) (SpaceMiT X60, 3.7 GB RAM).
26+
27+
### High band count (`nbnd=272`)
28+
29+
| Routine | Scalar | Patched RVV | Speedup | Kind |
30+
| ------- | -----: | ----------: | ------: | ---- |
31+
| `calbec` (`<β\|ψ>`) | 6.25 s | 3.18 s | **1.97×** | DGEMM |
32+
| Subspace rotation (in `regterg`) | 33.2 s | 16.6 s | **2.0×** | DGEMM |
33+
| `rdiaghg` (dense diag) | 28.2 s | 18.0 s | **1.57×** | LAPACK→BLAS3 |
34+
| `vloc_psi` (apply V to bands) | 52.6 s | 52.4 s | 1.00× | **FFT (untouched)** |
35+
| `fftw` | 54.5 s | 53.8 s | 1.01× | **FFT (untouched)** |
36+
| **`PWSCF` total** | **144.8 s** | **110.3 s** | **1.31×** | whole SCF |
37+
38+
### Default band count (`nbnd=136`)
39+
40+
**67.6 s → 57.0 s = 1.19×** overall (`calbec` 1.90×, `rdiaghg` 1.53×). BLAS routines speed up ~1.5–2.0×; the FFT half of the run does not move (FlexiBLAS only swaps BLAS), which caps the whole-application number.
41+
42+
## Where QE sits on the BLAS-dilution spectrum
43+
44+
Same X60, patched RVV vs scalar:
45+
46+
| Probe | Speedup | Why |
47+
| ----- | ------: | --- |
48+
| [DGEMM](../scientific-libs/dgemm.html) (pure level-3) | ~2.3× | all BLAS-3 |
49+
| [HPL](hpl.html) (Linpack) | ~1.8× | BLAS-3 + `dgemv` panel factorization |
50+
| [ELPA](../scientific-libs/elpa.html) (eigensolver) | ~1.58× | BLAS-3 + BLAS-2 tridiagonalization |
51+
| **QE** (full DFT SCF) | **~1.2–1.3×** | BLAS + ~40–50% FFT + MPI |
52+
53+
Each step down adds more non-BLAS / latency-bound work, diluting the BLAS-3 peak. QE is the most realistic whole-application figure — and the reason a raw `dgemm` A/B *overstates* what a real code sees.
54+
55+
## Reproducing
56+
57+
```bash
58+
module load QuantumESPRESSO/7.5-foss-2025b
59+
curl -O https://pseudopotentials.quantum-espresso.org/upf_files/Si.pz-vbc.UPF
60+
61+
# Correctness (np=4)
62+
RVV_LIB=/path/to/patched/libopenblas.so ./run-qe-ab.sh si-scf.in 4
63+
64+
# Performance (np=4)
65+
RVV_LIB=/path/to/patched/libopenblas.so ./run-perf-ab.sh si-super-64.in 4
66+
```
67+
68+
**Toolchain:** QuantumESPRESSO 7.5 / foss-2025b (EESSI), FlexiBLAS 3.4.5, OpenBLAS 0.3.30. Patched vector backend = OpenBLAS 0.3.30 with the RISC-V `gemv_n` NaN fix backported — same build used by [DGEMM](../scientific-libs/dgemm.html), [HPL](hpl.html), and [ELPA](../scientific-libs/elpa.html).

boards/F3.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ See also the [HPL app overview](../apps/hpl.html).
3333
| [NumPy](../scientific-libs/numpy.html) DGEMM N=4096 | 4.91 GFLOP/s | 17.51 GFLOP/s | 3.6× |
3434
| [NumPy](../scientific-libs/numpy.html) `eigvalsh` N=2048 | 9.59 s | 5.94 s | 1.6× |
3535
| ELPA `na=3000` | 50.42 s | **34.83 s** | 1.45× |
36+
| [QE](../apps/qe.html) `si-super-64.in` (PWSCF, nbnd=272) | 144.8 s | **110.3 s** | 1.31× |
3637

37-
Stock unpatched RVV: HPL and ELPA fail (`nan`); NumPy `eigvalsh` raises `LinAlgError: Eigenvalues did not converge`.
38+
Stock unpatched RVV: HPL, ELPA, and [Quantum ESPRESSO](../apps/qe.html) fail (`nan` / SCF abort); NumPy `eigvalsh` raises `LinAlgError: Eigenvalues did not converge`.

scientific-libs/dgemm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Bit-identical on [Orange Pi RV2](../boards/RV2.html) and [Banana Pi F3](../board
3131
| Forced scalar | 0 | 0 | 42.06549 (reference) |
3232
| Patched RVV (`gemv_n` fix) | 0 | 0 | 42.06549 (matches) |
3333

34-
Fault is in **`dgemv` only** — plain `dgemm` looks fine on the broken build, which is why [HPL](../apps/hpl.html) can NaN while a GEMM micro-benchmark passes.
34+
Fault is in **`dgemv` only** — plain `dgemm` looks fine on the broken build, which is why [HPL](../apps/hpl.html) and [Quantum ESPRESSO](../apps/qe.html) can fail while a GEMM micro-benchmark passes.
3535

3636
## Performance — `bench_dgemm`
3737

scientific-libs/elpa.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Benchmark source: [opensolvers/benchmarks/elpa](https://github.com/opensolvers/b
1414
| Scalar (`RISCV64_GENERIC`) | 54.92 s | finite=1 |
1515
| Patched RVV (`gemv_n` fix) | **34.81 s** | finite=1 |
1616

17-
The stock vector backend is faster than scalar but **wrong** — the same OpenBLAS 0.3.30 `gemv_n` NaN bug that breaks [HPL](../apps/hpl.html). With the patch, RVV is **1.58×** faster than scalar (54.92 / 34.81) and numerically correct.
17+
The stock vector backend is faster than scalar but **wrong** — the same OpenBLAS 0.3.30 `gemv_n` NaN bug that breaks [HPL](../apps/hpl.html) and [Quantum ESPRESSO](../apps/qe.html). With the patch, RVV is **1.58×** faster than scalar (54.92 / 34.81) and numerically correct.
1818

1919
Speedup is smaller than pure `dgemm` (~2.3×) because tridiagonalization is latency-bound BLAS-2 — by design.
2020

website.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Context file for structural and content decisions on [opensolvers.com](https://w
1919

2020
1. **Home**
2121
2. **Boards** — VisionFive 2, OrangePi RV2, BananaPi F3
22-
3. **Apps** — HPL
22+
3. **Apps** — HPL, Quantum ESPRESSO
2323
4. **Scientific libs** — BLAS, DGEMM, NumPy, LAPACK, ELPA
2424

2525
Nav config: `_config.yml` (`navigation`, `navigation_boards`, `navigation_apps`, `navigation_scientific_libs`). Rendered in `_includes/header.html`. Cayman theme requires `_layouts/default.html` override to include the header.
@@ -28,7 +28,7 @@ Nav config: `_config.yml` (`navigation`, `navigation_boards`, `navigation_apps`,
2828

2929
| Source | Used for |
3030
|--------|----------|
31-
| [opensolvers/benchmarks](https://github.com/opensolvers/benchmarks) | BLAS verification (`dgemm/`), HPL configs (`hpl/`), ELPA (`elpa/`), NumPy/LAPACK (`numpy/`) |
31+
| [opensolvers/benchmarks](https://github.com/opensolvers/benchmarks) | BLAS verification (`dgemm/`), HPL configs (`hpl/`), ELPA (`elpa/`), QE (`qe/`), NumPy/LAPACK (`numpy/`) |
3232
| [EESSI/docs#818](https://github.com/EESSI/docs/pull/818) | VisionFive 2 / U74 OpenBLAS + HPL |
3333
| [EESSI/docs#819](https://github.com/EESSI/docs/pull/819) | Orange Pi RV2 / X60 RVV `gemv_n` fix + HPL |
3434
| [easyconfigs#26436](https://github.com/easybuilders/easybuild-easyconfigs/pull/26436) | U74 OpenBLAS package |
@@ -44,6 +44,7 @@ Nav config: `_config.yml` (`navigation`, `navigation_boards`, `navigation_apps`,
4444

4545
| Date | Decision |
4646
|------|----------|
47+
| 2026-07-14 | Add Quantum ESPRESSO app page from `opensolvers/benchmarks/qe` |
4748
| 2026-07-14 | IME (X60 `smt.vmadot`) section on RV2 and BPI-F3 board pages |
4849
| 2026-07-14 | Add dedicated DGEMM and NumPy scientific-lib pages from benchmarks repo |
4950
| 2026-07-14 | BPI-F3 results from `opensolvers/benchmarks`: HPL 11.52 GFLOP/s, 3.7 GB RAM limit |

0 commit comments

Comments
 (0)