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

This test is equivalent to simple-distributed but tests boundary cases when one of the ranks has no Nodes on it. 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 dependency graph for simple-distributed-empty-node.cc:

Go to the source code of this file.

Detailed Description

This test is equivalent to simple-distributed but tests boundary cases when one of the ranks has no Nodes on it.

When run on two tasks rank 0 will have all the Nodes and rank 1 will be empty:

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

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

When run on three tasks rank 1 has the left half of the Nodes and rank 2 will be empty.

            -------   -------
             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-empty-node.cc.