ns-3
ns3::MpiInterface Class Reference

#include <mpi-interface.h>

List of all members.

Static Public Member Functions

static void Destroy ()
static uint32_t GetSystemId ()
static uint32_t GetSize ()
static bool IsEnabled ()
static void Enable (int *pargc, char ***pargv)
static void Disable ()
static void SendPacket (Ptr< Packet > p, const Time &rxTime, uint32_t node, uint32_t dev)
static void ReceiveMessages ()
static void TestSendComplete ()
static uint32_t GetRxCount ()
static uint32_t GetTxCount ()

Detailed Description

Interface between ns-3 and MPI


Member Function Documentation

void ns3::MpiInterface::Destroy ( void  )
static

Delete all buffers

References GetSize().

void ns3::MpiInterface::Disable ( )
static

Terminates the MPI environment by calling MPI_Finalize This function must be called after Destroy () It also resets m_initialized, m_enabled

References NS_FATAL_ERROR.

void ns3::MpiInterface::Enable ( int *  pargc,
char ***  pargv 
)
static
Parameters:
pargcnumber of command line arguments
pargvcommand line arguments

Sets up MPI interface

References GetSize(), ns3::MAX_MPI_MSG_SIZE, and NS_FATAL_ERROR.

uint32_t ns3::MpiInterface::GetRxCount ( )
static
Returns:
received count in packets

Referenced by ns3::DistributedSimulatorImpl::Run().

uint32_t ns3::MpiInterface::GetSize ( )
static
Returns:
MPI size (number of systems)

Referenced by Destroy(), Enable(), and ReceiveMessages().

uint32_t ns3::MpiInterface::GetSystemId ( void  )
static
uint32_t ns3::MpiInterface::GetTxCount ( )
static
Returns:
transmitted count in packets

Referenced by ns3::DistributedSimulatorImpl::Run().

bool ns3::MpiInterface::IsEnabled ( )
static
Returns:
true if using MPI

Referenced by ns3::PointToPointHelper::Install().

void ns3::MpiInterface::SendPacket ( Ptr< Packet p,
const Time rxTime,
uint32_t  node,
uint32_t  dev 
)
static
Parameters:
ppacket to send
rxTimereceived time at destination node
nodedestination node
devdestination device

Serialize and send a packet to the specified node and net device

References ns3::Time::GetNanoSeconds(), ns3::NodeList::GetNode(), ns3::Packet::GetSerializedSize(), ns3::Node::GetSystemId(), and NS_FATAL_ERROR.

void ns3::MpiInterface::TestSendComplete ( )
static

Check for completed sends

References NS_FATAL_ERROR.

Referenced by ns3::DistributedSimulatorImpl::Run().


The documentation for this class was generated from the following files: