Skip to content

Latest commit

 

History

History
154 lines (123 loc) · 4.85 KB

File metadata and controls

154 lines (123 loc) · 4.85 KB

Phase 3 Build & Test Guide

Quick Build Steps

Option 1: From OMNeT++ IDE

  1. Refresh Project: Right-click project → Refresh (F5)
  2. Clean Build: Project → Clean → Clean all projects → OK
  3. Build: Project → Build All (Ctrl+B)
  4. Verify: Check Console for "Build finished" with no errors

Option 2: From Command Line (Windows)

cd d:\omnetpp-6.2.0\samples\gpu_share\src
opp_makemake -f --deep
make clean
make -j16

Files to Build (New in Phase 3)

Source Files:

  • src/gpu/modules/Scheduler.ned
  • src/gpu/modules/Scheduler.cc
  • src/gpu/modules/JobClient.ned
  • src/gpu/modules/JobClient.cc

Test Files:

  • simulations/gpu_share_min/package.ned
  • simulations/gpu_share_min/GPUShareMin.ned
  • simulations/gpu_share_min/omnetpp.ini

Expected Build Output

Success indicators:

Creating executable: ../out/clang-release/src/gpu_share.exe
Build finished

Common errors to watch for:

  • Missing Lan_m.h: Message file not generated → Run opp_msgc or full build
  • Undefined symbols: Module not registered → Check Define_Module() at global scope
  • Gate connection errors: Mismatched gate names → Check .ned connections

Running the Test

From OMNeT++ IDE:

  1. Navigate to: simulations/gpu_share_min/omnetpp.ini
  2. Right-click → Run As → OMNeT++ Simulation
  3. Network: gpu_share.simulations.gpu_share_min.GPUShareMin
  4. Config: GPUShareMin_Basic
  5. Choose Qtenv (graphical) → Run
  6. Click Run button to start simulation
  7. Observe for 30 seconds of simulation time

What to Look For:

Timeline (first 5 seconds):

  • t=0.0s: All modules initialize
  • t=0.2-0.5s: Clients submit first jobs
  • t=0.5-1.0s: Hosts send first beacons
  • t=1.0s: Scheduler grants first leases
  • t=1.0s: Hosts start jobs, send JobStart
  • t=3-5s: First jobs complete, JobDone sent
  • t=5s+: More jobs arrive, cycle repeats

Event Log Messages:

  • ✅ "JobClient1 submitted job #1000"
  • ✅ "Scheduler100 received JobRequest"
  • ✅ "GPUHost1 sending beacon, freeSlots=2/2"
  • ✅ "Scheduler100 granted lease for job #1000 to host 2"
  • ✅ "GPUHost2 started job #1000, freeSlots now=3/4"
  • ✅ "JobClient1 job #1000 completed, JCT=3.6s"

Statistics Panel (Results):

  • scheduler.queueLen: Should show oscillating values (0-2)
  • client[0].jct: Should show ~3-6 second completion times
  • host[0].utilization: Should show ~0.3-0.6 average
  • host[1].utilization: Should show ~0.4-0.7 average

Verification Checklist

After running the simulation, verify:

  • Build succeeded without errors
  • Simulation ran for full 30 seconds
  • 10 jobs submitted total (5 from each client)
  • ~8-10 jobs completed (some may be in progress at end)
  • No error messages in event log
  • JCT values reasonable (3-7 seconds typical)
  • Queue length oscillates (0-2, not stuck at high value)
  • Host utilization >0 (shows jobs are executing)
  • Beacons sent periodically (~30 from host[0], ~20 from host[1])

Troubleshooting

Problem: Build fails with "Lan_m.h not found"

Solution:

cd src/gpu/messages
opp_msgc Lan.msg
cd ../..
make

Problem: "Scheduler module not found"

Solution: Check that Scheduler.ned has correct package:

package gpu_share.gpu.modules;

Problem: No jobs being granted

Solution: Check event log for:

  • Are beacons reaching scheduler? (Should see "received beacon from host X")
  • Are job requests reaching scheduler? (Should see "received JobRequest")
  • Check scheduler debug output is enabled in omnetpp.ini

Problem: JCT values seem wrong

Solution:

  • JCT = completionTime - submitTime (includes queue wait + execution)
  • Check if jobs are queuing (look at scheduler.queueLen statistic)
  • Verify job durations are ~3-4 seconds (from omnetpp.ini config)

Next Steps After Successful Test

Once you verify Phase 3 is working:

  1. ✅ Review statistics in Results panel
  2. ✅ Export result files (.vec, .sca) for analysis
  3. ✅ Optional: Run multiple repetitions to gather statistical data
  4. ✅ Proceed to Phase 4: Multi-VLAN + Router implementation

File Linkage Quick Reference

Message Flow:

  1. GPUHost → Beacon → Scheduler
  2. JobClient → JobRequest → Scheduler
  3. Scheduler → LeaseGrant → JobClient + GPUHost
  4. GPUHost → JobStart → (broadcast)
  5. GPUHost → JobDone → JobClient

Module Connections:

  • All modules connect to bus.port++ (VlanBus vector gate)
  • Connections use Lan channel (100Mbps datarate)
  • All modules on same VLAN (vlanId=10)

Statistics Recording:

  • Scheduler: queueLen, leaseGranted, hostCount
  • JobClient: submittedCount, completedCount, jct
  • GPUHost: utilization, beaconCount, jobCount
  • VlanBus: frameCount, broadcastCount, throughput

See PHASE3_README.md for complete documentation.