Interface between ns-3 and MPI. More...
#include <granted-time-window-mpi-interface.h>
Public Member Functions | |
virtual void | Destroy () |
Delete all buffers. More... | |
virtual void | Disable () |
Terminates the MPI environment by calling MPI_Finalize This function must be called after Destroy () It also resets m_initialized, m_enabled. More... | |
virtual void | Enable (int *pargc, char ***pargv) |
virtual uint32_t | GetSize () |
virtual uint32_t | GetSystemId () |
virtual bool | IsEnabled () |
virtual void | SendPacket (Ptr< Packet > p, const Time &rxTime, uint32_t node, uint32_t dev) |
Public Member Functions inherited from ns3::ParallelCommunicationInterface | |
virtual | ~ParallelCommunicationInterface () |
Destructor. More... | |
Static Public Member Functions | |
static uint32_t | GetRxCount () |
static uint32_t | GetTxCount () |
static TypeId | GetTypeId (void) |
static void | ReceiveMessages () |
Check for received messages complete. More... | |
static void | TestSendComplete () |
Check for completed sends. More... | |
Static Private Attributes | |
static bool | m_enabled = false |
static bool | m_initialized = false |
static std::list< SentBuffer > | m_pendingTx |
static char ** | m_pRxBuffers |
static MPI_Request * | m_requests |
static uint32_t | m_rxCount = 0 |
static uint32_t | m_sid = 0 |
static uint32_t | m_size = 1 |
static uint32_t | m_txCount = 0 |
Additional Inherited Members | |
Private Member Functions inherited from ns3::Object | |
Object () | |
virtual | ~Object () |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
Run the DoDispose methods of this object and all the objects aggregated to it. More... | |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
This method calls the virtual DoInitialize method on all the objects aggregated to this object. More... | |
Object (const Object &o) | |
virtual void | DoDispose (void) |
This method is called by Object::Dispose or by the object's destructor, whichever comes first. More... | |
virtual void | DoInitialize (void) |
This method is called only once by Object::Initialize. More... | |
virtual void | NotifyNewAggregate (void) |
This method is invoked whenever two sets of objects are aggregated together. More... | |
Private Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Private Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
This method is invoked once all member attributes have been initialized. More... | |
Static Private Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Private Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Noop. More... | |
Static Private Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Interface between ns-3 and MPI.
Implements the interface used by the singleton parallel controller to interface between NS3 and the communications layer being used for inter-task packet transfers.
Definition at line 91 of file granted-time-window-mpi-interface.h.
|
virtual |
Delete all buffers.
Implements ns3::ParallelCommunicationInterface.
Definition at line 102 of file granted-time-window-mpi-interface.cc.
References GetSize(), m_pendingTx, m_pRxBuffers, m_requests, and NS_LOG_FUNCTION.
|
virtual |
Terminates the MPI environment by calling MPI_Finalize This function must be called after Destroy () It also resets m_initialized, m_enabled.
Implements ns3::ParallelCommunicationInterface.
Definition at line 314 of file granted-time-window-mpi-interface.cc.
References m_enabled, m_initialized, NS_FATAL_ERROR, and NS_LOG_FUNCTION_NOARGS.
|
virtual |
pargc | number of command line arguments |
pargv | command line arguments |
Sets up MPI interface
Implements ns3::ParallelCommunicationInterface.
Definition at line 164 of file granted-time-window-mpi-interface.cc.
References GetSize(), m_enabled, m_initialized, m_pRxBuffers, m_requests, m_sid, m_size, ns3::MAX_MPI_MSG_SIZE, NS_FATAL_ERROR, and NS_LOG_FUNCTION.
|
static |
Definition at line 119 of file granted-time-window-mpi-interface.cc.
References m_rxCount.
Referenced by ns3::DistributedSimulatorImpl::Run().
|
virtual |
Implements ns3::ParallelCommunicationInterface.
Definition at line 142 of file granted-time-window-mpi-interface.cc.
References ns3::Simulator::GetImplementation(), m_initialized, and m_size.
Referenced by Destroy(), and Enable().
|
virtual |
Implements ns3::ParallelCommunicationInterface.
Definition at line 131 of file granted-time-window-mpi-interface.cc.
References ns3::Simulator::GetImplementation(), m_initialized, and m_sid.
|
static |
Definition at line 125 of file granted-time-window-mpi-interface.cc.
References m_txCount.
Referenced by ns3::DistributedSimulatorImpl::Run().
|
static |
Definition at line 93 of file granted-time-window-mpi-interface.cc.
References ns3::TypeId::SetParent().
|
virtual |
Implements ns3::ParallelCommunicationInterface.
Definition at line 153 of file granted-time-window-mpi-interface.cc.
References ns3::Simulator::GetImplementation(), m_enabled, and m_initialized.
|
static |
Check for received messages complete.
Definition at line 226 of file granted-time-window-mpi-interface.cc.
References ns3::Node::GetDevice(), ns3::Node::GetId(), ns3::Node::GetNDevices(), ns3::NodeList::GetNode(), ns3::MpiInterface::GetSize(), m_pRxBuffers, m_requests, m_rxCount, ns3::MAX_MPI_MSG_SIZE, ns3::Simulator::Now(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION_NOARGS, ns3::MpiReceiver::Receive(), and ns3::Simulator::ScheduleWithContext().
Referenced by ns3::DistributedSimulatorImpl::Run().
|
virtual |
p | packet to send |
rxTime | received time at destination node |
node | destination node |
dev | destination device |
Serialize and send a packet to the specified node and net device
Implements ns3::ParallelCommunicationInterface.
Definition at line 191 of file granted-time-window-mpi-interface.cc.
References ns3::Time::GetInteger(), ns3::NodeList::GetNode(), ns3::Packet::GetSerializedSize(), ns3::Node::GetSystemId(), ns3::Time::GetTimeStep(), m_pendingTx, m_txCount, NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::Packet::Serialize().
|
static |
Check for completed sends.
Definition at line 290 of file granted-time-window-mpi-interface.cc.
References current, m_pendingTx, NS_FATAL_ERROR, and NS_LOG_FUNCTION_NOARGS.
Referenced by ns3::DistributedSimulatorImpl::Run().
|
staticprivate |
Definition at line 161 of file granted-time-window-mpi-interface.h.
Referenced by Disable(), Enable(), and IsEnabled().
|
staticprivate |
Definition at line 160 of file granted-time-window-mpi-interface.h.
Referenced by Disable(), Enable(), GetSize(), GetSystemId(), and IsEnabled().
|
staticprivate |
Definition at line 170 of file granted-time-window-mpi-interface.h.
Referenced by Destroy(), SendPacket(), and TestSendComplete().
|
staticprivate |
Definition at line 167 of file granted-time-window-mpi-interface.h.
Referenced by Destroy(), Enable(), and ReceiveMessages().
|
staticprivate |
Definition at line 164 of file granted-time-window-mpi-interface.h.
Referenced by Destroy(), Enable(), and ReceiveMessages().
|
staticprivate |
Definition at line 156 of file granted-time-window-mpi-interface.h.
Referenced by GetRxCount(), and ReceiveMessages().
|
staticprivate |
Definition at line 152 of file granted-time-window-mpi-interface.h.
Referenced by Enable(), and GetSystemId().
|
staticprivate |
Definition at line 153 of file granted-time-window-mpi-interface.h.
|
staticprivate |
Definition at line 159 of file granted-time-window-mpi-interface.h.
Referenced by GetTxCount(), and SendPacket().