C++11 multithreaded implementations of four workloads with per-thread timing and Slurm-ready builds. Focus: work partitioning, synchronization, cache locality, and false-sharing avoidance.
- Monte Carlo π (
pi_calculation_parallel.cpp
)
Parallel random-point generation (≈ n/T per thread), per-thread counts & timers, global reduction. - Triangle Counting (
triangle_counting_parallel.cpp
)
Vertex-range partitioning over CSR/CSC; thread-local counts → single reduction; unique triangles reported. - PageRank w/ Locks (
page_rank_parallel.cpp
)
Push model, double buffers, barrier between scatter/gather,std::mutex
for shared updates; per-thread time + PR sum. - PageRank w/ Atomics (
page_rank_parallel_atomic.cpp
)
Lock-free accumulation viastd::atomic
/CAS; same iteration/barrier structure and metrics.
- C++11
std::thread
,std::mutex
, CustomBarrier,std::atomic
- Thread-local stats, padded structs to mitigate false sharing
- CSR/CSC traversal for sequential memory access
- Fine-grained timers for total & per-thread regions
- Slurm-friendly CLI:
--nWorkers
,--nPoints/--nIterations
,--inputFile