# schnorr/starvz architecture

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

- Interactive diagram: https://gitdiagram.com/schnorr/starvz
- Repository: https://github.com/schnorr/starvz

## Overview

StarVZ is an R-based performance-analysis framework for task-based StarPU applications. Its documented user workflow converts FxT experiment data through Phase 1, reads the resulting data in R, and produces ggplot visualizations in Phase 2. The package also documents analysis capabilities for task DAGs, MPI, memory, resource imbalance, and performance metrics. Source excerpts show native helpers for DAG paths, resource separation, and time integration, plus a CSV splitter; unsampled R internals and their detailed call relationships are not inferred here.

Main entry points: [`inst/tools/phase1-workflow.R`](https://github.com/schnorr/starvz/blob/master/inst/tools/phase1-workflow.R) (Phase 1 conversion), [`src/RcppExports.cpp`](https://github.com/schnorr/starvz/blob/master/src/RcppExports.cpp) (Native registration), [`R/read_functions.R`](https://github.com/schnorr/starvz/blob/master/R/read_functions.R) (Data reader), [`R/phase2.R`](https://github.com/schnorr/starvz/blob/master/R/phase2.R) (Plot interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Workflow"]
  node_phase1["Phase 1 conversion<br/>[phase1-workflow.R]"]
  node_csv_split["PAJE CSV splitter<br/>[starvz_csv.c]"]
  node_phase2["Phase 2 workflow<br/>[phase2-workflow.R]"]
  node_read["Data reader<br/>[read_functions.R]"]
  node_data_model["StarVZ data<br/>[starvz_data.R]"]
end

subgraph group_analysis["Analysis"]
  node_analysis_api["Analysis interface<br/>[phase1.R]"]
  node_dag_analysis["DAG analysis<br/>[phase2_atree.R]"]
  node_performance["Performance metrics<br/>[phase2_metrics.R]"]
  node_mpi_analysis["MPI analysis<br/>[phase2_mpi.R]"]
  node_memory_analysis["Memory analysis<br/>[phase2_memory.R]"]
  node_imbalance["Imbalance analysis<br/>[phase2_imbalance.R]"]
end

subgraph group_visualization["Visualization"]
  node_plot_api["Plot interface<br/>[phase2.R]"]
  node_panels["Visualization panels"]
  node_themes["Plot themes<br/>[phase2_themes.R]"]
end

subgraph group_native["Native helpers"]
  node_native_registration["Native registration<br/>[RcppExports.cpp]"]
  node_last_path["Last-task paths<br/>[last.cpp]"]
  node_shortest_path["DAG shortest path<br/>[shortest_path.cpp]"]
  node_resource_split["Resource separation<br/>[separate_res.cpp]"]
  node_time_integral["Step integration<br/>[integrate_step.cpp]"]
end

node_analyst(("Analyst"))
node_fxt["FxT traces"]
node_fxt_tools["Trace tools"]

node_analyst -->|"starts workflow"| node_phase1
node_fxt -->|"provides traces"| node_phase1
node_phase1 -->|"uses tools"| node_fxt_tools
node_phase1 -->|"hands off"| node_phase2
node_analyst -->|"loads data"| node_read
node_read -->|"returns data"| node_data_model
node_analyst -->|"requests plot"| node_plot_api
node_plot_api -->|"returns ggplot"| node_analyst
node_phase1 -.->|"splits records"| node_csv_split
node_native_registration -->|"registers calls"| node_last_path
node_native_registration -->|"registers calls"| node_shortest_path
node_native_registration -->|"registers calls"| node_resource_split
node_native_registration -->|"registers calls"| node_time_integral

click node_phase1 "https://github.com/schnorr/starvz/blob/master/inst/tools/phase1-workflow.R"
click node_csv_split "https://github.com/schnorr/starvz/blob/master/inst/tools/starvz_csv.c"
click node_phase2 "https://github.com/schnorr/starvz/blob/master/inst/tools/phase2-workflow.R"
click node_read "https://github.com/schnorr/starvz/blob/master/R/read_functions.R"
click node_data_model "https://github.com/schnorr/starvz/blob/master/R/starvz_data.R"
click node_plot_api "https://github.com/schnorr/starvz/blob/master/R/phase2.R"
click node_analysis_api "https://github.com/schnorr/starvz/blob/master/R/phase1.R"
click node_dag_analysis "https://github.com/schnorr/starvz/blob/master/R/phase2_atree.R"
click node_performance "https://github.com/schnorr/starvz/blob/master/R/phase2_metrics.R"
click node_mpi_analysis "https://github.com/schnorr/starvz/blob/master/R/phase2_mpi.R"
click node_memory_analysis "https://github.com/schnorr/starvz/blob/master/R/phase2_memory.R"
click node_imbalance "https://github.com/schnorr/starvz/blob/master/R/phase2_imbalance.R"
click node_panels "https://github.com/schnorr/starvz/blob/master/R/phase2_var_panels.R"
click node_themes "https://github.com/schnorr/starvz/blob/master/R/phase2_themes.R"
click node_native_registration "https://github.com/schnorr/starvz/blob/master/src/RcppExports.cpp"
click node_last_path "https://github.com/schnorr/starvz/blob/master/src/last.cpp"
click node_shortest_path "https://github.com/schnorr/starvz/blob/master/src/shortest_path.cpp"
click node_resource_split "https://github.com/schnorr/starvz/blob/master/src/separate_res.cpp"
click node_time_integral "https://github.com/schnorr/starvz/blob/master/src/integrate_step.cpp"

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_phase1,node_csv_split,node_phase2,node_read,node_data_model toneBlue
class node_analysis_api,node_dag_analysis,node_performance,node_mpi_analysis,node_memory_analysis,node_imbalance toneAmber
class node_plot_api,node_panels,node_themes toneMint
class node_native_registration,node_last_path,node_shortest_path,node_resource_split,node_time_integral toneRose
class node_analyst,node_fxt,node_fxt_tools toneIndigo
```

## Components

### Workflow

- [Phase 1 conversion](https://github.com/schnorr/starvz/blob/master/inst/tools/phase1-workflow.R): `inst/tools/phase1-workflow.R`
- [PAJE CSV splitter](https://github.com/schnorr/starvz/blob/master/inst/tools/starvz_csv.c): `inst/tools/starvz_csv.c`
- [Phase 2 workflow](https://github.com/schnorr/starvz/blob/master/inst/tools/phase2-workflow.R): `inst/tools/phase2-workflow.R`
- [Data reader](https://github.com/schnorr/starvz/blob/master/R/read_functions.R): `R/read_functions.R`
- [StarVZ data](https://github.com/schnorr/starvz/blob/master/R/starvz_data.R): `R/starvz_data.R`

### Analysis

- [Analysis interface](https://github.com/schnorr/starvz/blob/master/R/phase1.R): `R/phase1.R`
- [DAG analysis](https://github.com/schnorr/starvz/blob/master/R/phase2_atree.R): `R/phase2_atree.R`
- [Performance metrics](https://github.com/schnorr/starvz/blob/master/R/phase2_metrics.R): `R/phase2_metrics.R`
- [MPI analysis](https://github.com/schnorr/starvz/blob/master/R/phase2_mpi.R): `R/phase2_mpi.R`
- [Memory analysis](https://github.com/schnorr/starvz/blob/master/R/phase2_memory.R): `R/phase2_memory.R`
- [Imbalance analysis](https://github.com/schnorr/starvz/blob/master/R/phase2_imbalance.R): `R/phase2_imbalance.R`

### Visualization

- [Plot interface](https://github.com/schnorr/starvz/blob/master/R/phase2.R): `R/phase2.R`
- [Visualization panels](https://github.com/schnorr/starvz/blob/master/R/phase2_var_panels.R): `R/phase2_var_panels.R`
- [Plot themes](https://github.com/schnorr/starvz/blob/master/R/phase2_themes.R): `R/phase2_themes.R`

### Native helpers

- [Native registration](https://github.com/schnorr/starvz/blob/master/src/RcppExports.cpp): `src/RcppExports.cpp`
- [Last-task paths](https://github.com/schnorr/starvz/blob/master/src/last.cpp): `src/last.cpp`
- [DAG shortest path](https://github.com/schnorr/starvz/blob/master/src/shortest_path.cpp): `src/shortest_path.cpp`
- [Resource separation](https://github.com/schnorr/starvz/blob/master/src/separate_res.cpp): `src/separate_res.cpp`
- [Step integration](https://github.com/schnorr/starvz/blob/master/src/integrate_step.cpp): `src/integrate_step.cpp`

### Other components

- **Analyst**
- **FxT traces**
- **Trace tools**

## Connections

- Analyst → Phase 1 conversion: starts workflow (evidence: `README.org`)
- FxT traces → Phase 1 conversion: provides traces (evidence: `README.org`)
- Phase 1 conversion → Trace tools: uses tools (evidence: `README.org`)
- Phase 1 conversion → Phase 2 workflow: hands off (evidence: `README.org`)
- Analyst → Data reader: loads data (evidence: `README.org`)
- Data reader → StarVZ data: returns data (evidence: `README.org`)
- Analyst → Plot interface: requests plot (evidence: `README.org`)
- Plot interface → Analyst: returns ggplot (evidence: `README.org`)
- Phase 1 conversion → PAJE CSV splitter: splits records
- Native registration → Last-task paths: registers calls (evidence: `src/RcppExports.cpp`)
- Native registration → DAG shortest path: registers calls (evidence: `src/RcppExports.cpp`)
- Native registration → Resource separation: registers calls (evidence: `src/RcppExports.cpp`)
- Native registration → Step integration: registers calls (evidence: `src/RcppExports.cpp`)
