How kaityo256/pycpp-parallel-pipeline works
This repository demonstrates an end-to-end parallel simulation workflow: Python expands a shared YAML configuration into independent job inputs, C++ runs each bond-percolation simulation, and Python aggregates the per-seed results for plotting. The documented cps scheduler distributes generated tasks, while gnuplot renders the summary. The scheduler and plotting implementation are not sampled, so those documented capabilities are included at the directory/script level; their internal relationships are limited to those stated in the README.
Main entry points: generate_inputs.py Input generator · main.cpp Simulation entry · cps CPS scheduler · analyze_results.py Result analyzer
Components 16
Job preparation
- YAML configuration
input.yaml - Input generator
generate_inputs.py - Job input files
output - Task list
generate_inputs.py
Simulation
- Simulation entry
cpp/main.cpp - Parameter parser
cpp/param - Percolation engine
cpp/percolation.hpp - Per-job results
output
Parallel execution
- CPS scheduler
cps - MPI runtime
Results and plotting
- Result analyzer
analyze_results.py - Summary data
output - Plot definition
plot.plt - Gnuplot
- Result figure
fig
Other components
- Workflow user
Connections 17
- Workflow user → Input generator: runs
README.md - YAML configuration → Input generator: configures
README.md - Input generator → Job input files: writes inputs
generate_inputs.py - Input generator → Task list: writes tasks
generate_inputs.py - Task list → CPS scheduler: schedules commands
README.md - MPI runtime → CPS scheduler: runs scheduler
README.md - CPS scheduler → Simulation entry: dispatches jobs
README.md - Job input files → Simulation entry: provides input
README.md - Simulation entry → Parameter parser: parses parameters
cpp/main.cpp - Simulation entry → Percolation engine: runs task
cpp/main.cpp - Percolation engine → Per-job results: writes result
cpp/percolation.hpp - Per-job results → Result analyzer: provides results
README.md - YAML configuration → Result analyzer: sets aggregation range
analyze_results.py - Result analyzer → Summary data: writes statistics
analyze_results.py - Summary data → Gnuplot: provides plot data
README.md - Plot definition → Gnuplot: configures plot
README.md - Gnuplot → Result figure: renders figure
README.md