# epcced/epcc-openmp-microbenchmarks architecture

> Architecture diagram of the GitHub repository epcced/epcc-openmp-microbenchmarks, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/epcced/epcc-openmp-microbenchmarks
- Repository: https://github.com/epcced/epcc-openmp-microbenchmarks

## Overview

##### Project type and purpose
- This is an open-source C microbenchmark suite for measuring OpenMP performance (EPCC OpenMP MicroBenchmark Suite).
- It provides two versions side by side:
- v3.1 (“classic” version) in `openmpbench_C_v31`
- v4.0 (enhanced version) in `openmpbench_C_v40`
- Each version builds a single CLI executable that runs a set of modular benchmarks (array, scheduling, synchronization, tasks).

##### File structure
- Top-level directories:
- `openmpbench_C_v31/`
- `openmpbench_C_v40/`
- In each version folder:
- Source modules: `arraybench.{c,h}`, `schedbench.{c,h}`, `syncbench.{c,h}`, `taskbench.{c,h}`
- Shared support code: `common.{c,h}`
- Build system: `Makefile`, `Makefile.defs*`, `Licence.txt`, `README.md`
- No frontend/backend split—this is a CLI tool with an internal modular structure.
- Build scripts detect various compilers (`gcc`, `intel`, `cray`, `aocc` in v4.0).

##### README for additional insights
- v4.0 adds user-control flags, improved defaults, extra statistics.
- Both versions run measurements under OpenMP: spawn threads, record timing, report results.

##### Final advice
- Be very detailed: break benchmarks into four modules, show the common library as the glue.
- Both build-time and run-time interactions.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Build System v3.1"
        BF31["Makefile"]:::build
        BD31["Makefile.defs"]:::build
    end
    subgraph "Build System v4.0"
        BF40["Makefile"]:::build
        BD40_GCC["Makefile.defs.gcc"]:::build
        BD40_INTEL["Makefile.defs.intel"]:::build
        BD40_CRAY["Makefile.defs.cray"]:::build
        BD40_AOCC["Makefile.defs.aocc"]:::build
    end
    Compiler["Compiler Toolchain"]:::build
    BF31 -->|compile| Compiler
    BD31 -->|compile| Compiler
    BF40 -->|compile| Compiler
    BD40_GCC -->|compile| Compiler
    BD40_INTEL -->|compile| Compiler
    BD40_CRAY -->|compile| Compiler
    BD40_AOCC -->|compile| Compiler
    Compiler -->|"build binary"| Binary["openmpbench CLI"]:::build

    subgraph "Runtime"
        CLI["User CLI"]:::runtime
        subgraph "Common Library"
            Common["common"]:::common
        end
        subgraph "Benchmark Modules"
            AB["ArrayBench"]:::runtime
            SB["SchedBench"]:::runtime
            SYB["SyncBench"]:::runtime
            TB["TaskBench"]:::runtime
        end
        OR[(OpenMP Runtime)]:::external
        Reporter["Output Reporter"]:::runtime
    end

    Binary -->|"invoke"| CLI
    CLI -->|"calls modules"| AB
    CLI -->|"calls modules"| SB
    CLI -->|"calls modules"| SYB
    CLI -->|"calls modules"| TB
    AB -->|"use common"| Common
    SB -->|"use common"| Common
    SYB -->|"use common"| Common
    TB -->|"use common"| Common
    AB -->|"spawn threads"| OR
    SB -->|"spawn threads"| OR
    SYB -->|"spawn threads"| OR
    TB -->|"spawn threads"| OR
    AB -->|"measurement data"| Reporter
    SB -->|"measurement data"| Reporter
    SYB -->|"measurement data"| Reporter
    TB -->|"measurement data"| Reporter
    Reporter -->|"stdout/files"| CLI

    click BF31 "https://github.com/epcced/epcc-openmp-microbenchmarks/tree/main/openmpbench_C_v31/Makefile"
    click BD31 "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v31/Makefile.defs"
    click BF40 "https://github.com/epcced/epcc-openmp-microbenchmarks/tree/main/openmpbench_C_v40/Makefile"
    click BD40_GCC "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/Makefile.defs.gcc"
    click BD40_INTEL "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/Makefile.defs.intel"
    click BD40_CRAY "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/Makefile.defs.cray"
    click BD40_AOCC "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/Makefile.defs.aocc"
    click Common "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v31/common.c"
    click Common "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v31/common.h"
    click Common "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/common.c"
    click Common "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/common.h"
    click AB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v31/arraybench.c"
    click AB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v31/arraybench.h"
    click AB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/arraybench.c"
    click AB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/arraybench.h"
    click SB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v31/schedbench.c"
    click SB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v31/schedbench.h"
    click SB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/schedbench.c"
    click SB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/schedbench.h"
    click SYB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v31/syncbench.c"
    click SYB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v31/syncbench.h"
    click SYB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/syncbench.c"
    click SYB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/syncbench.h"
    click TB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v31/taskbench.c"
    click TB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v31/taskbench.h"
    click TB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/taskbench.c"
    click TB "https://github.com/epcced/epcc-openmp-microbenchmarks/blob/main/openmpbench_C_v40/taskbench.h"

    classDef build fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef runtime fill:#90EE90,stroke:#000,stroke-width:1px
    classDef external fill:#FFA500,stroke:#000,stroke-width:1px
    classDef common fill:#90EE90,stroke:#000,stroke-width:2px,stroke-dasharray: 5 5
```
