An OMNeT++ 6.2.0 simulation project modeling GPU resource sharing across VLAN-like networks. This project implements a control plane for GPU sharing without using the INET framework, building L2/L3 emulation from scratch using cSimpleModule.
- Project Overview
- Quick Start
- Project Status
- Architecture
- Documentation
- Available Simulations
- Development Environment
- Contributing
GPUShare simulates a distributed GPU scheduling system where:
- GPU hosts periodically advertise availability via beacon messages
- A central scheduler grants short-term leases to incoming jobs
- Job clients generate requests and measure Job Completion Time (JCT)
- Two VLAN-like LANs bridged by a simple Router enable cross-VLAN resource sharing
- Background traffic flows simulate realistic network congestion
- Metrics track GPU utilization, JCT, and system performance
Key Features:
- Pure OMNeT++ implementation (no INET framework)
- VLAN-based network segmentation with custom routing
- Lease-based GPU scheduling with configurable policies
- Background traffic simulation for network realism
- Comprehensive signal-based instrumentation
Navigate to the src directory and build with parallel jobs:
cd d:\omnetpp-6.2.0\samples\gpu_share\src
make clean
opp_makemake -f --deep -I.
make -j16From OMNeT++ IDE:
- Right-click project → Refresh (F5)
- Project → Clean → Clean all projects
- Project → Build All (Ctrl+B)
Latest Test (Phase 6 - With Background Traffic):
cd d:\omnetpp-6.2.0\samples\gpu_share\simulations\gpu_share_background
..\..\src\gpu_share.exe -f omnetpp.ini -c NoBackground -u QtenvFrom OMNeT++ IDE:
- Navigate to
simulations/gpu_share_background/omnetpp.ini - Right-click → Run As → OMNeT++ Simulation
- Select configuration (NoBackground, LightBackground, MediumBackground, HeavyBackground)
- Choose Qtenv (graphical) or Cmdenv (batch)
- Click Run
cd d:\omnetpp-6.2.0\samples\gpu_share\src
make clean| Phase | Feature | Status |
|---|---|---|
| Phase 0 | Project scaffold & build system | ✅ Complete |
| Phase 1 | VLAN bus implementation with serialization delays | ✅ Complete |
| Phase 2 | GPUHost with periodic beacons | ✅ Complete |
| Phase 3 | Central Scheduler & JobClient (end-to-end job lifecycle) | ✅ Complete |
| Phase 4 | Two VLANs + Router (cross-VLAN routing) | ✅ Complete |
| Phase 5 | Background TCP-like flows (network congestion) | ✅ Complete |
| Phase 6 | Instrumentation & metrics analysis | ✅ Complete |
| Phase 7 | No-sharing baseline comparison | ⏳ Planned |
| Phase 8 | Optional DHCP/DNS/RIP/OSPF/NAT stubs | ⏳ Planned |
Current Implementation: Full multi-VLAN GPU scheduling system with background traffic simulation and comprehensive metrics collection.
gpu_share/ # Root package
├── src/
│ ├── gpu/ # Core GPU sharing subsystem
│ │ ├── messages/ # Protocol message definitions (.msg)
│ │ │ └── Lan.msg # LanFrame, Beacon, JobRequest, LeaseGrant, etc.
│ │ └── modules/ # Module implementations (.ned, .cc)
│ │ ├── VlanBus.ned/cc # VLAN broadcast bus with serialization
│ │ ├── GPUHost.ned/cc # GPU resource provider
│ │ ├── Scheduler.ned/cc # Central job scheduler
│ │ ├── JobClient.ned/cc # Job request generator
│ │ ├── Router.ned/cc # Cross-VLAN routing
│ │ └── BackgroundFlow.ned/cc # Network traffic generator
│ └── package.ned # Root package declaration
└── simulations/ # Test scenarios
├── scaffold_test/ # Phase 0: Basic connectivity
├── vlan_smoke/ # Phase 1: VLAN broadcast test
├── gpu_host_test/ # Phase 2: Beacon generation
├── gpu_share_min/ # Phase 3: End-to-end job scheduling
├── gpu_share_two_vlan/ # Phase 4: Multi-VLAN routing
└── gpu_share_background/ # Phase 5+6: With background traffic
All network communication uses LanFrame base class (defined in Lan.msg):
| Message Type | Type ID | Size | Purpose |
|---|---|---|---|
| Beacon | 1 | ~64 bytes | GPU host availability advertisements |
| JobRequest | 2 | ~96 bytes | Client job submissions |
| LeaseGrant | 3 | ~80 bytes | Scheduler lease approvals |
| JobStart | 4 | ~72 bytes | Job execution start notifications |
| JobDone | 5 | ~72 bytes | Job completion notifications |
| DataPkt | 6 | Variable | Background traffic packets |
- VlanBus: Hub-like broadcast bus with serialization delays
- GPUHost: GPU resource provider with beacon generation
- Scheduler: Central job scheduler with lease management
- JobClient: Job request generator with JCT tracking
- Router: Cross-VLAN packet forwarding
- BackgroundFlow: Network traffic generator
Each phase has detailed implementation documentation:
- PHASE0_README.md - Project scaffold setup
- PHASE1_README.md - VLAN bus implementation
- PHASE2_README.md - GPUHost with beacons
- PHASE3_README.md - Scheduler & JobClient
- PHASE4_README.md - Two VLANs + Router
- PHASE5_README.md - Background traffic flows
- PHASE6_README.md - Instrumentation & metrics
- HOW_TO_RUN_VLAN_TEST.md - VLAN smoke test guide
- PACKAGE_VERIFICATION.md - Package structure verification
- PHASE4_VALIDATION.md - Multi-VLAN validation
- PHASE5_VALIDATION.md - Background traffic validation
- PHASE6_TESTING_GUIDE.md - Comprehensive testing procedures
- run.md - Quick reference for build and run commands
- BUILD_PHASE3.md - Phase 3 specific build instructions
- Instructions.md - Original project specification
- CLAUDE.md - AI assistant project context
- PHASE4_SUMMARY.md - Phase 4 implementation summary
- PHASE5_SUMMARY.md - Phase 5 implementation summary
- PHASE6_SUMMARY.md - Phase 6 implementation summary
- PHASE3_FIX.md - Phase 3 bug fixes
- PHASE3_FIX2.md - Additional Phase 3 fixes
- PHASE5_BUGFIX.md - Phase 5 bug fixes
- ANSWERS.md - Project questions and analysis
cd simulations\gpu_share_background
# Baseline (no background traffic)
..\..\src\gpu_share.exe -f omnetpp.ini -c NoBackground -u Qtenv
# Light background traffic
..\..\src\gpu_share.exe -f omnetpp.ini -c LightBackground -u Qtenv
# Medium background traffic
..\..\src\gpu_share.exe -f omnetpp.ini -c MediumBackground -u Qtenv
# Heavy background traffic (near saturation)
..\..\src\gpu_share.exe -f omnetpp.ini -c HeavyBackground -u Qtenv
# Batch mode (all configurations, all repetitions)
..\..\src\gpu_share.exe -f omnetpp.ini -u Cmdenvcd simulations\gpu_share_background
..\..\src\gpu_share.exe -f omnetpp.ini -u Qtenvcd simulations\gpu_share_two_vlan
..\..\src\gpu_share.exe -f omnetpp.ini -c TwoVlan_Basic -u Qtenvcd simulations\gpu_share_min
..\..\src\gpu_share.exe -f omnetpp.ini -c GPUShareMin_Basic -u Qtenvcd simulations\gpu_host_test
..\..\src\gpu_share.exe -f omnetpp.ini -c GPUHost_Basic -u Qtenvcd simulations\vlan_smoke
..\..\src\gpu_share.exe -f omnetpp.ini -c VlanSmoke_Basic -u QtenvRequirements:
- OMNeT++ 6.2.0
- Windows 11 (primary development platform)
- C++ compiler (MinGW/MSVC via OMNeT++ installation)
- Git (for version control)
Project Configuration:
- No INET Framework - Pure OMNeT++ implementation
- Signal-based metrics - All statistics use OMNeT++ signals
- Package naming - Uses underscores (gpu_share), not hyphens
- Build system - Standard OMNeT++ makefile generation
This project follows a phased development approach:
- Each phase must be fully verified before proceeding to the next
- All code must compile without warnings or errors
- Verification checklist (per phase):
- ✅ Build succeeds without errors
- ✅ All
.msgfiles generate_m.h/_m.cccorrectly - ✅ Simulation runs for specified duration
- ✅ Expected event log messages appear
- ✅ Statistics signals emit correct values
- ✅ Result files (
.vec,.sca) contain expected data - ✅ Numbers match expectations (e.g., frame counts, delays)
Code Conventions:
- Module registration:
Define_Module(ClassName)at global scope - Debug logging:
EV << "message" << endl - Parameter access:
par("paramName")ininitialize() - Memory management: Always
deletemessages after processing - Serialization delay: Calculate before
sendDelayed()
This project is an educational simulation for Computer Networks coursework.
Built with OMNeT++ 6.2.0 discrete event simulation framework.