Compare performance of various parallel techniques on HPC clusters to simulate an Abelian Sandpile.
Find a file
2026-01-11 14:39:54 +02:00
graphs Update graphs 2025-06-12 20:17:06 +02:00
pbs Move pbs scripts to dedicated directory 2025-06-12 17:49:05 +02:00
results Fix inverted proc/threads in Hybrid data 2025-06-12 16:51:40 +02:00
src Move .c files to dedicated directory 2025-06-12 17:57:35 +02:00
.gitignore Ignore .DS_Store files 2025-06-12 15:36:56 +02:00
automate_benchmarking.sh Cleanup automation 2025-06-12 18:03:04 +02:00
Makefile Add easy testing cmd to Makefile 2025-06-12 18:14:20 +02:00
Makefile.hpc Move .c files to dedicated directory 2025-06-12 17:57:35 +02:00
README.md Update README 2025-06-12 18:16:35 +02:00
Report.pdf Add report 2026-01-11 14:39:54 +02:00
set_modules.sh Make modules script executable 2025-06-11 23:26:19 +02:00

CSC4028Z Assignment

Description

Simulate an Abelian Sandpile. Serial and parallel (OpenMP, MPI, MPI+OpenMP) implementations are provided.

Specification

  • serial.c: serial implementation
  • omp.c: parallel implementation using OpenMP threads
  • mpi.c: parallel implementation using MPI processes
  • hybrid.c: hybrid parallel implementation using MPI processes and OpenMP threads

Installation

  1. Ensure gcc, openmpi-bin and libopenmpi-dev are installed when using Ubuntu.
  2. Run make to compile all implementations.

Usage

Run make test to easily test all 4 implementations. This will produce .ppm output files and print the execution time per implementation.

Run make benchmark to perform multiple runs of the program under different arguments. This uses the automate_benchmarking.sh script. You can also invoke each individual implementation as follows (example using 128x128 grid size and 8 threads where applicable):

  • Serial: ./serial -s 128 128
  • OpenMP: ./omp -s 128 128 -t 8
  • MPI: mpirun --bind-to none ./mpi -s 128 128
  • Hybrid: mpirun --bind-to none ./hybrid -s 128 128 -t 8

Run make clean when complete if you want to clean up binaries and output files.

Authors and acknowledgment

  • Unays Bhad (BHDUNA001)
  • Channing Bellamy (BLLCHA013)