# maxsos/parprog2020 architecture

> Architecture diagram of the GitHub repository maxsos/parprog2020, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/maxsos/parprog2020
- Repository: https://github.com/maxsos/parprog2020

## Overview

##### Main Components Organization

a) Create three main categorical sections:
- Learning Materials (Lectures)
- Implementation Modules
- Testing Framework

b) Implementation Modules should be subdivided into:
- OpenMP Implementations (OpenMP1-5)
- MPI Implementation (CheckMPI)
- Loop Optimization Modules (Loop1-4)
- Computational Mathematics Modules (CompMath1-2)
- Environment Check Module (CheckENV)

##### Component Relationships

a) Top Level Structure:
- [Learning Materials] -----> [Implementation Modules] -----> [Testing Framework]

- Blue: Learning materials/documentation
- Green: OpenMP implementations
- Yellow: MPI implementations
- Orange: Loop optimization modules
- Purple: Computational mathematics modules
- Gray: Support modules (CheckENV)

##### Detailed Component Breakdown

For each implementation module, show:
- [Module Name]

- > [Source (src/)]
- > [Tests (tests/)]
- > [Configuration (run.sh)]
- > [Performance Metrics] (where applicable)

##### Testing Framework Structure
- [Tests]

- > [Input Files]
- > [Expected Output]
- > [Validation Logic]

##### Implementation Details

Use the following symbols and conventions:
- Double lines for module boundaries

##### Additional Elements

a) A version control indicator (Git)
b) Build/execution flow:
- [Source Files] -> [Compilation] -> [Execution] -> [Testing] -> [Performance Analysis]

##### Notes for Implementation

- Each OpenMP module should show its parallel regions
- Loop optimization modules should indicate optimization strategies
- MPI module should show communication patterns
- Reference to lecture materials where relevant

##### The performance measurement capabilities

Remember to include version information and any specific hardware/software requirements that might affect the parallel execution environment.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Legend
        L1[Module]:::module
        L2[(Database)]:::database
        L3[/"API Gateway"\]:::api
        L4{{Process}}:::process
        L5[Documentation]:::docs
    end

    subgraph "Learning Materials"
        LM[Learning Resources]:::docs
        OD[OpenMP Documentation]:::docs
        OE[OpenMP Examples]:::docs
        LG[Loop Optimization Guide]:::docs
        
        LM --> OD
        LM --> OE
        LM --> LG
    end

    subgraph "Implementation Modules"
        subgraph "OpenMP Implementations"
            OMP1[OpenMP Basic]:::openmp
            OMP2[OpenMP Advanced 2]:::openmp
            OMP3[OpenMP Advanced 3]:::openmp
            OMP4[OpenMP Advanced 4]:::openmp
            OMP5[OpenMP Advanced 5]:::openmp
            VIS[Visualization Tool]:::tool
            
            OMP1 --> VIS
        end

        subgraph "MPI Implementation"
            MPI[CheckMPI]:::mpi
            MPIS[MPI Source]:::mpi
            
            MPI --> MPIS
        end

        subgraph "Loop Optimization"
            L1M[Loop Module 1]:::loop
            L2M[Loop Module 2]:::loop
            L3M[Loop Module 3]:::loop
            L4M[Loop Module 4]:::loop
            
            L1M --> PT1[(Performance Data 1)]:::database
            L2M --> PT2[(Performance Data 2)]:::database
            L3M --> PT3[(Performance Data 3)]:::database
            L4M --> PT4[(Performance Data 4)]:::database
        end

        subgraph "Computational Mathematics"
            CM1[CompMath Module 1]:::math
            CM2[CompMath Module 2]:::math
        end

        ENV[Environment Check]:::support
    end

    subgraph "Testing Framework"
        TF[Test Suite]:::test
        TI[Test Input]:::test
        TO[Test Output]:::test
        VL[Validation Logic]:::test
        
        TF --> TI
        TF --> TO
        TF --> VL
    end

    LM --> OMP1
    LM --> MPI
    LM --> L1M
    
    OMP1 & OMP2 & OMP3 & OMP4 & OMP5 & MPI & L1M & L2M & L3M & L4M & CM1 & CM2 --> TF
    ENV --> TF

    %% Click events for component mapping
    click LM "https://github.com/maxsos/ParProg2020/tree/master/lectures"
    click OD "https://github.com/maxsos/ParProg2020/blob/master/lectures/OpenMP 2020.pdf"
    click OE "https://github.com/maxsos/ParProg2020/blob/master/lectures/OpenMP Examples.cpp"
    click LG "https://github.com/maxsos/ParProg2020/blob/master/lectures/Циклы 2020.pdf"
    click OMP1 "https://github.com/maxsos/ParProg2020/tree/master/OpenMP1"
    click VIS "https://github.com/maxsos/ParProg2020/blob/master/OpenMP1/parrprog_heatmap.ipynb"
    click MPI "https://github.com/maxsos/ParProg2020/tree/master/CheckMPI"
    click MPIS "https://github.com/maxsos/ParProg2020/blob/master/CheckMPI/src/main.cpp"
    click L1M "https://github.com/maxsos/ParProg2020/tree/master/Loop1"
    click L2M "https://github.com/maxsos/ParProg2020/tree/master/Loop2"
    click L3M "https://github.com/maxsos/ParProg2020/tree/master/Loop3"
    click L4M "https://github.com/maxsos/ParProg2020/tree/master/Loop4"
    click CM1 "https://github.com/maxsos/ParProg2020/tree/master/CompMath1"
    click CM2 "https://github.com/maxsos/ParProg2020/tree/master/CompMath2"
    click ENV "https://github.com/maxsos/ParProg2020/tree/master/CheckENV"
    click TF "https://github.com/maxsos/ParProg2020/tree/master/*/tests"

    classDef module fill:#f9f,stroke:#333,stroke-width:2px
    classDef database fill:#adf,stroke:#333,stroke-width:2px
    classDef api fill:#fda,stroke:#333,stroke-width:2px
    classDef process fill:#ad5,stroke:#333,stroke-width:2px
    classDef docs fill:#9cf,stroke:#333,stroke-width:2px
    classDef openmp fill:#90EE90,stroke:#333,stroke-width:2px
    classDef mpi fill:#FFD700,stroke:#333,stroke-width:2px
    classDef loop fill:#FFA500,stroke:#333,stroke-width:2px
    classDef math fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef support fill:#A9A9A9,stroke:#333,stroke-width:2px
    classDef test fill:#20B2AA,stroke:#333,stroke-width:2px
    classDef tool fill:#FFB6C1,stroke:#333,stroke-width:2px
```
