# tesraga1/parallel_programming_matrix_multiplication architecture

> Architecture diagram of the GitHub repository tesraga1/parallel_programming_matrix_multiplication, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tesraga1/parallel_programming_matrix_multiplication
- Repository: https://github.com/tesraga1/parallel_programming_matrix_multiplication

## Overview

This repository is a collection of parallel matrix-multiplication implementations, not a single application. The principal workflow is to launch an MPI program with a matrix-size argument; a selected algorithm distributes matrix blocks, exchanges or broadcasts them among ranks, computes local products, and reports timing or a result check. The tree also shows CUDA and hybrid variants. Source excerpts confirm the MPI flows and some host-to-CUDA calls; implementations not excerpted are included as components where the tree supports them, but their internal relationships are left unspecified.

Main entry points: [`src/Fox/MPI_and_CUDA/fox_mpi_cuda.c`](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Fox/MPI_and_CUDA/fox_mpi_cuda.c) (Fox MPI CUDA), [`src/Cannon/MPI_cannon.c`](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/MPI_cannon.c) (MPI Cannon GPU), [`src/SUMMA/summa_mpi_cuda.c`](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/SUMMA/summa_mpi_cuda.c) (SUMMA MPI CUDA), [`src/Cannon/Cannon_MPI.c`](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/Cannon_MPI.c) (Cannon MPI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cannon["Cannon variants"]
  node_cannon_mpi["Cannon MPI<br/>[Cannon_MPI.c]"]
  node_cannon_cuda["Cannon CUDA<br/>[Cannon_CUDA.cu]"]
  node_cannon_hybrid["Cannon hybrid<br/>[Cannon_Hybrid.cu]"]
  node_mpi_cannon["MPI Cannon GPU<br/>[MPI_cannon.c]"]
  node_cannon_gpu_kernel["Cannon GPU multiply<br/>[Cuda_Cannon.cu]"]
end

subgraph group_fox["Fox variants"]
  node_fox_mpi["Fox MPI<br/>[fox_mpi.c]"]
  node_fox_mpi_cuda["Fox MPI CUDA<br/>[fox_mpi_cuda.c]"]
  node_fox_cuda_host["Fox CUDA support<br/>[fox_mpi_cuda.c]"]
  node_fox_cuda_kernel["Fox CUDA multiply<br/>[fox_mpi_cuda.cu]"]
end

subgraph group_summa["SUMMA variants"]
  node_summa_mpi["SUMMA MPI<br/>[summa_mpi.c]"]
  node_summa_mpi_cuda["SUMMA MPI CUDA<br/>[summa_mpi_cuda.c]"]
  node_summa_cuda["SUMMA CUDA<br/>[summa_cuda.cu]"]
  node_summa_cuda_kernel["SUMMA CUDA kernel"]
end

node_operator(("MPI operator"))

node_operator -->|"launches"| node_cannon_mpi
node_operator -->|"launches"| node_mpi_cannon
node_operator -->|"launches"| node_fox_mpi
node_operator -->|"launches"| node_fox_mpi_cuda
node_operator -->|"launches"| node_summa_mpi
node_operator -->|"launches"| node_summa_mpi_cuda
node_mpi_cannon -.->|"calls GPU multiply"| node_cannon_gpu_kernel
node_fox_mpi_cuda -->|"calls CUDA support"| node_fox_cuda_host
node_fox_mpi_cuda -->|"launches multiply"| node_fox_cuda_kernel
node_summa_mpi_cuda -.->|"calls CUDA multiply"| node_summa_cuda_kernel

click node_cannon_mpi "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/Cannon_MPI.c"
click node_cannon_cuda "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/Cannon_CUDA.cu"
click node_cannon_hybrid "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/Cannon_Hybrid.cu"
click node_mpi_cannon "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/MPI_cannon.c"
click node_cannon_gpu_kernel "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/Cuda_Cannon.cu"
click node_fox_mpi "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Fox/MPI_only/fox_mpi.c"
click node_fox_mpi_cuda "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Fox/MPI_and_CUDA/fox_mpi_cuda.c"
click node_fox_cuda_host "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Fox/MPI_and_CUDA/fox_mpi_cuda.c"
click node_fox_cuda_kernel "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Fox/MPI_and_CUDA/fox_mpi_cuda.cu"
click node_summa_mpi "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/SUMMA/summa_mpi.c"
click node_summa_mpi_cuda "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/SUMMA/summa_mpi_cuda.c"
click node_summa_cuda "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/SUMMA/summa_cuda.cu"
click node_summa_cuda_kernel "https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/SUMMA/summa_mpi_cuda_kernel.cu"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cannon_mpi,node_cannon_cuda,node_cannon_hybrid,node_mpi_cannon,node_cannon_gpu_kernel toneBlue
class node_fox_mpi,node_fox_mpi_cuda,node_fox_cuda_host,node_fox_cuda_kernel toneAmber
class node_summa_mpi,node_summa_mpi_cuda,node_summa_cuda,node_summa_cuda_kernel toneMint
class node_operator toneIndigo
```

## Components

### Cannon variants

- [Cannon MPI](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/Cannon_MPI.c): `src/Cannon/Cannon_MPI.c`
- [Cannon CUDA](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/Cannon_CUDA.cu): `src/Cannon/Cannon_CUDA.cu`
- [Cannon hybrid](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/Cannon_Hybrid.cu): `src/Cannon/Cannon_Hybrid.cu`
- [MPI Cannon GPU](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/MPI_cannon.c): `src/Cannon/MPI_cannon.c`
- [Cannon GPU multiply](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Cannon/Cuda_Cannon.cu): `src/Cannon/Cuda_Cannon.cu`

### Fox variants

- [Fox MPI](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Fox/MPI_only/fox_mpi.c): `src/Fox/MPI_only/fox_mpi.c`
- [Fox MPI CUDA](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Fox/MPI_and_CUDA/fox_mpi_cuda.c): `src/Fox/MPI_and_CUDA/fox_mpi_cuda.c`
- [Fox CUDA support](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Fox/MPI_and_CUDA/fox_mpi_cuda.c): `src/Fox/MPI_and_CUDA/fox_mpi_cuda.c`
- [Fox CUDA multiply](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/Fox/MPI_and_CUDA/fox_mpi_cuda.cu): `src/Fox/MPI_and_CUDA/fox_mpi_cuda.cu`

### SUMMA variants

- [SUMMA MPI](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/SUMMA/summa_mpi.c): `src/SUMMA/summa_mpi.c`
- [SUMMA MPI CUDA](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/SUMMA/summa_mpi_cuda.c): `src/SUMMA/summa_mpi_cuda.c`
- [SUMMA CUDA](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/SUMMA/summa_cuda.cu): `src/SUMMA/summa_cuda.cu`
- [SUMMA CUDA kernel](https://github.com/tesraga1/parallel_programming_matrix_multiplication/blob/main/src/SUMMA/summa_mpi_cuda_kernel.cu): `src/SUMMA/summa_mpi_cuda_kernel.cu`

### Other components

- **MPI operator**

## Connections

- MPI operator → Cannon MPI: launches (evidence: `src/Cannon/Cannon_MPI.c`)
- MPI operator → MPI Cannon GPU: launches (evidence: `src/Cannon/MPI_cannon.c`)
- MPI operator → Fox MPI: launches (evidence: `src/Fox/MPI_only/fox_mpi.c`)
- MPI operator → Fox MPI CUDA: launches (evidence: `src/Fox/MPI_and_CUDA/fox_mpi_cuda.c`)
- MPI operator → SUMMA MPI: launches (evidence: `src/SUMMA/summa_mpi.c`)
- MPI operator → SUMMA MPI CUDA: launches (evidence: `src/SUMMA/summa_mpi_cuda.c`)
- MPI Cannon GPU → Cannon GPU multiply: calls GPU multiply
- Fox MPI CUDA → Fox CUDA support: calls CUDA support (evidence: `src/Fox/MPI_and_CUDA/fox_mpi_cuda.c`)
- Fox MPI CUDA → Fox CUDA multiply: launches multiply (evidence: `src/Fox/MPI_and_CUDA/fox_mpi_cuda.c`)
- SUMMA MPI CUDA → SUMMA CUDA kernel: calls CUDA multiply
