Skip to content

Hyperion101010/omp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenMP vs Rust Rayon: Concurrency Benchmark Suite

This repository contains a benchmark suite comparing OpenMP (C) and Rayon (Rust) across various concurrency dimensions including performance, scalability, thread overhead, and programmability.

Directory Structure

.
├── README.md
├── c_program/                       # C programs for OpenMP report (takes input)
├── rust_code/                       # Rust Rayon programs (some take input, some benchmarked with fixed sizes)
└── scalability_and_performance_c/  # C programs with predefined input/thread settings (benchmark-only)

How to Build and Run

C (OpenMP) Programs

Build

Navigate to the respective folder and use make:

cd c_program
make
# or
cd scalability_and_performance_c
make

Run

  • Programs in c_program/ take input arguments such as input size, thread count, or execution mode.
  • Programs in scalability_and_performance_c/ are benchmark variants with fixed/predefined settings.

Executables by Evaluation Criteria

1. Programmability

  • programmability_mandelbrot

2. Amount of Control

  • amount_of_control_charfreq
  • amount_of_control_task

3. Thread Overhead

  • overhead_create_delete
  • overhead_sync

4. Performance

  • performance_pi
  • performance_mergesort

5. Scalability

  • scalability_factorial
  • scalability_heatdist

Rust (Rayon) Programs

Build

cd rust_code
cargo build

Run

You can:

  • Use cargo run for argument-based binaries:
    cargo run --bin performance_merge_sort -- 1000000 32 parallel
  • Or run prebuilt binaries directly:
    cd target/debug
    ./benchmark4_perf_msort

Rust Program Categories

** Benchmark Programs** (predefined inputs, no command-line arguments):

  • benchmark1_scale_pi
  • benchmark2_scale_heatdist
  • benchmark3_perf_factorial
  • benchmark4_perf_msort

** Input-Driven Programs** (require arguments: input size, thread count, execution mode):

  • programmability_mandelbrot
  • amount_of_control_charfreq
  • amount_of_control_task
  • overhead_create_delete
  • overhead_sync
  • performance_factorial
  • performance_merge_sort
  • scalability_pi
  • scalability_jacobi

Example:

cargo run --bin scalability_pi -- 100000000 32 2

Notes

  • Requires a compiler that supports OpenMP (e.g., gcc-14) for all C programs.
  • I have run this program using cargo v1.86.0 and gcc-14.
  • Rust benchmarks use the Rayon crate.
  • Programs in scalability_and_performance_c/ are equivalent to the Rust benchmark binaries — they don’t take arguments and run preset test cases.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors