A Discrete-Event Network Simulator
API
simple-distributed.cc File Reference

TestDistributed creates a dumbbell topology and logically splits it in half. More...

#include "mpi-test-fixtures.h"
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/mpi-interface.h"
#include "ns3/ipv4-global-routing-helper.h"
#include "ns3/point-to-point-helper.h"
#include "ns3/internet-stack-helper.h"
#include "ns3/nix-vector-helper.h"
#include "ns3/ipv4-address-helper.h"
#include "ns3/on-off-helper.h"
#include "ns3/packet-sink-helper.h"
#include <mpi.h>
#include <iomanip>
+ Include dependency graph for simple-distributed.cc:

Go to the source code of this file.

Detailed Description

TestDistributed creates a dumbbell topology and logically splits it in half.

The left half is placed on logical processor 0 and the right half is placed on logical processor 1.

            -------   -------
             RANK 0    RANK 1
            ------- | -------
                    |

n0 ------—| | |-------— n6 | | | n1 ----—\ | | | /----— n7 n4 -------—|-------— n5 n2 ----—/ | | | ----— n8 | | | n3 ------—| | |-------— n9

OnOff clients are placed on each left leaf node. Each right leaf node is a packet sink for a left leaf node. As a packet travels from one logical processor to another (the link between n4 and n5), MPI messages are passed containing the serialized packet. The message is then deserialized into a new packet and sent on as normal.

One packet is sent from each left leaf node. The packet sinks on the right leaf nodes output logging information when they receive the packet.

Definition in file simple-distributed.cc.