Namra-5's picture
Upload v1.0.0 benchmark dataset (1,868 runs, 206 configurations)
a832865 verified
|
Raw History Blame Contribute Delete
13.1 kB
metadata
license: cc-by-4.0
pretty_name: Parallel merge sort and matrix multiplication scaling measurements
tags:
  - benchmark
  - hpc
  - parallel-computing
  - openmp
  - mpi
  - pthreads
  - matrix-multiplication
  - merge-sort
  - performance
  - reproducibility
size_categories:
  - 1K<n<10K
configs:
  - config_name: configurations
    default: true
    data_files: data/benchmark_results.csv
  - config_name: runs
    data_files: data/raw_runs.csv
  - config_name: machines
    data_files: data/machines.csv

Parallel merge sort and matrix multiplication scaling measurements

Validated timing measurements of four execution models (Sequential, OpenMP, Pthreads, MPI) on two workloads (merge sort and dense matrix multiplication). 1868 recorded runs in 206 configurations from 2 machine(s). Every recorded run exited with status 0 and printed exactly the same output as the sequential program for the same input (SHA-256 comparison); runs that failed, timed out or disagreed are never aggregated, and a dataset containing any such run is refused by the build script.

Scope (exactly what was measured)

  • Matrix sizes (n × n, doubles): 500, 1000, 1500, 2000, 3000, 4000
  • Merge-sort sizes (integers): 50,000, 500,000, 5,000,000
  • Worker counts present: 1, 2, 3, 4, 8, 16 (OpenMP threads / Pthreads threads / MPI ranks; the sequential program has 1)
machine_id CPU (as reported) harness effective cores logical CPUs workers workloads (repetitions) collected (UTC) runs
laptop_i5-7200u_wsl2 (session 1) Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz 2 4 1 2 3 4 matrix: 5 reps, mergesort: 15 reps 2026-11-15 780
pc_i5-13500_wsl2 (session 1) 13th Gen Intel(R) Core(TM) i5-13500 10 20 1 2 4 8 16 matrix: 5 reps 2026-11-24 160
pc_i5-13500_wsl2 (session 2) 13th Gen Intel(R) Core(TM) i5-13500 10 20 1 2 4 8 16 mergesort: 15 reps 2026-11-24 720
pc_i5-13500_wsl2 (session 3) 13th Gen Intel(R) Core(TM) i5-13500 10 20 1 2 4 8 16 matrix: 5 reps 2026-11-24 80
pc_i5-13500_wsl2 (session 4) 13th Gen Intel(R) Core(TM) i5-13500 10 20 1 2 4 8 16 matrix: 5 reps 2026-11-24 80
pc_i5-13500_wsl2 (session 5) 13th Gen Intel(R) Core(TM) i5-13500 10 20 1 2 4 8 16 matrix: 3 reps 2026-11-26 48

The repetition counts in the table apply to the workloads listed for each session; sessions of one machine cover different sizes. Not every size and worker count exists on every machine: filter on machine_id and use scaling_valid (below). Nothing outside the sizes, worker counts and machines listed here was measured.

Files

Path Content
data/benchmark_results.csv One row per configuration: medians, spread, speedups, efficiencies, S_N, E_N, scaling_valid
data/raw_runs.csv One row per recorded run: timings, execution order, start time, load, exit code, output hash, status
data/machines.csv One row per machine and session: CPU, cores, memory, compiler, MPI, code commit, protocol, notes
machines/<machine_id>/session_<k>/ hardware_environment.json, inputs_manifest.json, lscpu excerpts, package versions, figures
machines/<machine_id>/CAVEATS.md Machine-specific limits (also reproduced below)
SHA256SUMS Checksums of every file in this repository (sha256sum -c SHA256SUMS)
tools/ The script that built these files from the raw result folders

Input files are not included (they are large); they are regenerated from a fixed seed by the measurement code, and inputs_manifest.json holds the SHA-256 of every input used.

Quick start

import pandas as pd

cfg = pd.read_csv("hf://datasets/Namra-5/hpc-parallel-matrix-sorting-benchmark/data/benchmark_results.csv")
# or: from datasets import load_dataset; cfg = load_dataset("Namra-5/hpc-parallel-matrix-sorting-benchmark", "configurations", split="train").to_pandas()

valid = cfg[cfg["scaling_valid"] & (cfg["model"] != "seq")]
big = valid[(valid["workload"] == "matrix") & (valid["size"] == valid[valid["workload"] == "matrix"]["size"].max())]
print(big[["machine_id", "model", "workers", "kernel_median_s", "S_N", "E_N"]].to_string(index=False))

Definitions of speedup and efficiency

For a workload, size and model (OpenMP, Pthreads or MPI) with N workers:

  • T_N = median over valid repetitions of kernel_s, the in-program compute time (reading the input file and printing the result are excluded; for MPI the broadcast/scatter, gather and final merge are included).
  • S_N = T_1 / T_N, with T_1 the median kernel time of the same model with one worker.
  • E_N = S_N / N.
  • The sequential program is a separate row (model = seq, S_N and E_N empty). The columns speedup_vs_seq and kernel_speedup_vs_seq compare with it, but the sequential program is a different implementation for matrices (the MPI matrix code uses flat arrays), so those columns mix implementation and parallelism. Use S_N for scaling claims.
  • Wall-time versions (speedup_vs_1worker, efficiency_vs_1worker) include serial parsing and printing and, for MPI, mpirun start-up; they show end-to-end behaviour and are capped by Amdahl's law.
  • kernel_speedup_vs_1worker_lo/_hi is a conservative, distribution-free interval for S_N built from the order statistics of the repetitions; it is empty when either side has fewer than 5 repetitions.
  • scaling_valid is true when the configuration has at least one valid run and its worker count does not exceed the number of cores the harness considered usable (effective_cores_used_by_harness in machines.csv). Configurations with more workers are kept but flagged oversubscribed and must not be read as scaling claims.

S_N and E_N were additionally recomputed from raw_runs.csv by the build script and agree with the stored values to within 1e-6 (the rounding of the stored columns).

Column reference

raw_runs.csv: machine_id, session, workload (matrix/mergesort), model (seq/omp/thread2/mpi; thread2 = Pthreads), size, workers, oversubscribed, rep, order (position inside the repetition; the order of configurations is shuffled with a fixed seed), start_utc, load1, wall_s (whole process), kernel_s (in-program compute), exit_code, output_sha256_16, status, stderr_head.

benchmark_results.csv: the configuration key (machine_id, session, workload, model, size, workers, oversubscribed), repetition accounting (n_runs, n_ok, n_failed, n_mismatch, n_timeout, n_no_reference), wall-time statistics (median_s, mean_s, std_s, min_s, max_s), kernel-time statistics (kernel_median_s, kernel_min_s, kernel_max_s, kernel_std_s, kernel_cv), baselines and ratios (seq_median_s, speedup_vs_seq, efficiency, speedup_vs_1worker, efficiency_vs_1worker, kernel_speedup_vs_seq, kernel_efficiency, kernel_speedup_vs_1worker (= S_N) and its interval), status, scaling_valid, and the derived S_N, E_N.

Measurement protocol

For every (workload, size): one untimed sequential run defines the expected output hash; every repetition runs all configurations once in a seeded random order, optionally preceded by an untimed warm-up run, with a cooldown between repetitions. The protocol actually used for each machine (worker counts, repetitions, cooldown, warm-up) is in machines.csv and in hardware_environment.json. A run is ok only if the process exited with 0 and its output hash equals the sequential output's hash.

Intended use and general limits

Intended for comparing parallelisation strategies and for studying measurement validity. It is not a hardware benchmark: the matrix kernel keeps a cache-unfriendly textbook loop order, and absolute times are far slower than a tuned library.

  • One input instance per size and one input distribution (integers uniform in [1, 10000]; matrix entries uniform in [0, 9999)); data patterns such as sorted or reversed input were not measured.
  • MPI ran on a single node over shared memory: network costs are not measured.
  • Timing noise is right-skewed; medians are reported with min, max, standard deviation and kernel_cv, and every repetition is in raw_runs.csv. Configurations with fewer repetitions have no interval.
  • Virtualised environments (WSL2) can differ from bare metal in timer, scheduler and memory behaviour; the CPU governor and frequency were not observable.

Machine-specific caveats

laptop_i5-7200u_wsl2

  • Two physical cores. Intel Core i5-7200U, 2 cores / 4 hardware threads. Valid scaling covers 1 → 2 workers only; the 36 configurations with 3 or 4 workers are oversubscribed, kept for completeness and excluded from scaling claims.
  • Virtualised (WSL2 on Windows). Timer, scheduler and memory behaviour can differ from bare metal; the CPU governor was not observable.
  • Small memory and cache: 3.77 GiB RAM and a 3 MiB L3 cache (per lscpu).
  • Hyper-thread behaviour (3 and 4 workers) is reported but not explained; no hardware counters were used.
  • Millisecond-scale kernels (the 50,000-element sort) are the most sensitive to CPU power state and scheduling.

pc_i5-13500_wsl2

  • Hybrid CPU, topology hidden by WSL2. The processor is an Intel Core i5-13500, which Intel specifies as 14 cores (6 performance cores with hyper-threading and 8 efficiency cores) and 20 threads. Inside WSL2, lscpu reported 10 cores x 2 threads, so the harness used 10 as the number of usable physical cores. That figure is a property of the virtual machine, not of the chip.
  • Placement is not observable. Which Windows logical processor runs which worker is decided by the host scheduler and was not recorded. Runs with more than 6 workers may therefore mix performance and efficiency cores or hyper-thread siblings. scaling_valid follows the harness figure of 10 cores and is not evidence of 10 identical cores; the cleanest scaling data are the 1-, 2- and 4-worker points.
  • Worker counts above 10 are flagged oversubscribed by the harness even where they do not exceed the 14 physical cores of the chip.
  • Virtualised (WSL2 on Windows): timer, scheduler and memory behaviour can differ from bare metal; the CPU governor was not observable. Host (Windows) load is not visible from inside WSL2.
  • Collected on two days, in five sessions, after two unplanned shutdowns. Sessions session_1 to session_4 were measured on 2026-11-24 and session_5 (matrix 4000) on 2026-11-26. On 2026-11-24 the machine was shut down twice while a session was running (the sessions with sorts and with matrix 3000); the cause was not recorded. The interrupted sessions were discarded and measured again from the start; their partial data are not part of this dataset. The driver log progress.txt in machines/<machine_id>/ records every start, end and restart.
  • Single-core speed was not clearly higher than that of the older laptop in the same dataset. Median sequential kernel time, PC against laptop, at the five (workload, size) pairs measured on both: matrix 1000 2.80 s against 2.53 s (PC 11% slower), matrix 1500 10.1 s against 17.5 s (PC faster), sort of 50,000 elements 4.2 ms against 4.8 ms (PC 11% faster), sort of 500,000 0.051 s against 0.049 s (PC 5% slower), sort of 5,000,000 0.554 s against 0.517 s (PC 7% slower). The cause was not identified. Windows power mode, CPU frequency and whether the WSL process ran in an efficiency mode were not recorded. Absolute times therefore describe this environment, not the processor's capability; speedups compare runs inside the same session. The laptop dataset was collected in the best-performance power mode (stated in its provenance); the power mode of this machine was not recorded, so the two datasets may differ in this respect.
  • Repetition counts differ by size. Matrix 1000 to 3000 have 5 repetitions per configuration, sorts 15, and matrix 4000 only 3 (one session took about 3.9 hours), so matrix 4000 has no speedup interval. One-worker runs at matrix 4000 vary by about +/-12% between repetitions (sequential 446 to 565 s), and at matrix 3000 the sequential program is about 9% slower in repetitions 4 and 5 than in repetitions 1 to 3.
  • Matrix 5000 and the 20,000,000-element sort were not measured.

Citation

@dataset{basharat_parallel_benchmark,
  author    = {Basharat, Namra},
  title     = {Parallel merge sort and matrix multiplication scaling measurements (Sequential, OpenMP, Pthreads, MPI)},
  year      = {2026},
  version   = {1.0.0},
  doi       = {10.5281/zenodo.24554982},
  url       = {https://huggingface.co/datasets/Namra-5/hpc-parallel-matrix-sorting-benchmark},
  note      = {Measurement code: https://github.com/Namra-5/parallel_sorting_and_matrix_benchmark}
}