Skip to content

Latest commit

 

History

History
302 lines (261 loc) · 9.65 KB

File metadata and controls

302 lines (261 loc) · 9.65 KB

Phase 5 Pre-Build Validation Checklist

✅ File Structure Validation

All Phase 5 files are in place and properly structured:

Source Files

Simulation Files

Documentation Files

✅ Code Quality Validation

BackgroundFlow.ned

simple BackgroundFlow {
    parameters:
        int vlanId, flowId, srcAddr, destAddr;
        double burstInterval, packetInterval, startTime;
        int burstSize, packetSize, maxBursts;
        bool debug;
        @signal[packetsSent](type=long);
        @signal[bytesSent](type=long);
        @signal[burstsCompleted](type=long);
    gates:
        inout port;
}

✅ All parameters properly typed ✅ All signals declared ✅ Statistics decorations present ✅ Gate defined

BackgroundFlow.cc

class BackgroundFlow : public cSimpleModule {
  protected:
    virtual void initialize() override;
    virtual void handleMessage(cMessage *msg) override;
    virtual void finish() override;
  private:
    // 13 parameters, 5 state variables, 3 signals
    void startNewBurst();
    void sendPacket();
    void scheduleNextPacketInBurst();
};
Define_Module(BackgroundFlow);

✅ Proper inheritance from cSimpleModule ✅ Override methods: initialize(), handleMessage(), finish() ✅ Module registration macro present ✅ Helper methods for burst/packet management ✅ Proper memory management (timer cleanup in finish())

GPUShareBackground.ned

network GPUShareBackground {
    submodules:
        bgFlow10[numBackgroundFlowsPerVlan]: BackgroundFlow {
            vlanId = parent.vlan10Id;
            flowId = index + 50;
            srcAddr = index + 50;
            destAddr = -1;  // Broadcast
        }
    connections:
        for i=0..numBackgroundFlowsPerVlan-1 {
            bgFlow10[i].port <--> Lan <--> bus10.port++;
        }
}

✅ Proper module instantiation with vector submodules ✅ Parameters use parent and index correctly ✅ For-loop connections properly structured ✅ Channel type Lan properly referenced

omnetpp.ini

[Config NoBackground]
*.numBackgroundFlowsPerVlan = 0

[Config LightBackground]
*.numBackgroundFlowsPerVlan = 2
*.bgFlow10[*].burstInterval = 2s
*.bgFlow10[*].burstSize = 5
*.bgFlow10[*].packetSize = 512B
...
**.bgFlow10[*].packetsSent.record = count
**.bgFlow10[*].bytesSent.record = sum,vector

✅ Proper configuration inheritance (extends) ✅ Wildcard patterns for vector submodules ([*]) ✅ Unit annotations (@unit) for timed parameters ✅ Statistics recording properly configured

✅ Integration Validation

Message Protocol

BackgroundFlow uses existing DataPkt message from Lan.msg:

message DataPkt extends LanFrame {
    frameType = 6;
    int bytes;          // ← Used by BackgroundFlow for variable packet sizes
    int seqNumber;      // ← Used by BackgroundFlow for packet ordering
    string payload;
}

✅ No changes needed to Lan.msg ✅ BackgroundFlow properly sets bytes field ✅ VlanBus properly handles DataPkt serialization delays

VlanBus Compatibility

VlanBus.cc already handles DataPkt correctly:

if (DataPkt *dataPkt = dynamic_cast<DataPkt*>(frame)) {
    frameBytes = dataPkt->getBytes();  // ← Uses BackgroundFlow-set bytes field
}
serializationDelay = (frameBytes * 8.0) / datarate;

✅ No changes needed to VlanBus ✅ Serialization delay automatically applied to background traffic

Network Topology

GPUShareBackground extends Phase 4 topology:

  • ✅ Reuses existing modules: VlanBus, Router, GPUHost, Scheduler, JobClient
  • ✅ Adds new BackgroundFlow modules without modifying existing structure
  • ✅ All connections properly terminated (no dangling gates)

✅ Build System Validation

Current Makefile Status

The current src/Makefile does NOT include BackgroundFlow.o yet:

OBJS = \
    $O/gpu/modules/DummyNode.o \
    $O/gpu/modules/GPUHost.o \
    $O/gpu/modules/JobClient.o \
    $O/gpu/modules/Router.o \
    $O/gpu/modules/Scheduler.o \
    $O/gpu/modules/TestModule.o \
    $O/gpu/modules/VlanBus.o
    # ← BackgroundFlow.o missing!

⚠️ CRITICAL: Makefile Must Be Regenerated

YOU MUST RUN THIS COMMAND BEFORE BUILDING:

cd d:\omnetpp-6.2.0\samples\gpu_share\src
opp_makemake -f --deep -I.

After running opp_makemake, the Makefile will include:

OBJS = \
    $O/gpu/modules/BackgroundFlow.o \  # ← NEW
    $O/gpu/modules/DummyNode.o \
    $O/gpu/modules/GPUHost.o \
    ...

Build Sequence

cd d:\omnetpp-6.2.0\samples\gpu_share\src
opp_makemake -f --deep -I.          # ← Regenerate Makefile
make clean                           # ← Clean old objects
make -j16                            # ← Build with 16 parallel jobs

Expected compilation order:

  1. Lan_m.cc (from Lan.msg) → Lan_m.o
  2. BackgroundFlow.ccBackgroundFlow.o ← NEW
  3. All .o files linked → gpu_share.exe

✅ Expected Build Output

Successful Build

Compiling gpu/messages/Lan_m.cc...
Compiling gpu/modules/BackgroundFlow.cc...   ← NEW
Compiling gpu/modules/VlanBus.cc...
Compiling gpu/modules/GPUHost.cc...
...
Linking gpu_share.exe...
Build complete: gpu_share.exe

Build Errors (if Makefile not regenerated)

/usr/bin/ld: cannot find gpu/modules/BackgroundFlow.o: No such file or directory
collect2: error: ld returned 1 exit status

Solution: Run opp_makemake -f --deep -I.

✅ Runtime Validation

Expected Module Instances (NoBackground config)

GPUShareBackground
├── bus10 (VlanBus)
├── bus20 (VlanBus)
├── router (Router)
├── host10[0], host10[1] (GPUHost)
├── host20[0], host20[1] (GPUHost)
├── scheduler (Scheduler)
├── client10[0], client10[1] (JobClient)
└── client20[0], client20[1] (JobClient)
Total: 10 modules

Expected Module Instances (LightBackground config)

GPUShareBackground
├── ... (same as above)
├── bgFlow10[0], bgFlow10[1] (BackgroundFlow)  ← NEW
└── bgFlow20[0], bgFlow20[1] (BackgroundFlow)  ← NEW
Total: 14 modules

Initialization Messages (debug=true)

t=0.000s: BackgroundFlow50 initialized: vlanId=10, srcAddr=50, destAddr=-1,
          burstInterval=2s, burstSize=5, packetSize=512 bytes, packetInterval=0.02s
t=0.421s: BackgroundFlow50 starting burst #1 at t=0.421
t=0.421s: BackgroundFlow50 sent packet 1 (burst 1, pkt 1/5), 512 bytes
t=0.441s: BackgroundFlow50 sent packet 2 (burst 1, pkt 2/5), 512 bytes
...

✅ Statistics Validation

Expected Scalar Statistics (.sca files)

scalar GPUShareBackground.bgFlow10[0] packetsSent:count 200
scalar GPUShareBackground.bgFlow10[0] bytesSent:sum 102400
scalar GPUShareBackground.bgFlow10[0] burstsCompleted:count 40
scalar GPUShareBackground.client10[0] jobCompletionTime:mean 4.83
scalar GPUShareBackground.bus10 throughput:sum 315672

Expected Vector Statistics (.vec files)

vector 23 GPUShareBackground.bgFlow10[0] bytesSent:vector ETV
23  1.523  512
23  1.543  1024
23  1.563  1536
...

vector 14 GPUShareBackground.client10[0] jobCompletionTime:vector ETV
14  4.234  3.451
14  9.876  5.123
...

✅ Final Pre-Flight Checklist

Before you build and test Phase 5, verify:

  • All source files exist in src/gpu/modules/
  • All simulation files exist in simulations/gpu_share_background/
  • BackgroundFlow.cc has proper #include "gpu/messages/Lan_m.h"
  • BackgroundFlow.cc has Define_Module(BackgroundFlow);
  • GPUShareBackground.ned imports BackgroundFlow
  • omnetpp.ini has all 4 configurations
  • Documentation files created (README, SUMMARY)
  • Ready to run opp_makemake -f --deep -I.

🚀 You Are Ready to Build!

Next steps:

  1. Run the build commands from run.md
  2. Run all 4 configurations
  3. Analyze results as described in PHASE5_README.md

Expected outcome:

  • ✅ Clean build with no errors
  • ✅ All 4 configs run to completion
  • ✅ JCT increases with background traffic load
  • ✅ 12 result files generated

If you encounter any issues, refer to the Troubleshooting sections in:

Good luck with your Phase 5 testing! 🎉