27 #ifndef NS3_GRANTED_TIME_WINDOW_MPI_INTERFACE_H
28 #define NS3_GRANTED_TIME_WINDOW_MPI_INTERFACE_H
32 #include "ns3/buffer.h"
33 #include "ns3/nstime.h"
106 void Enable(
int* pargc,
char*** pargv)
override;
107 void Enable(MPI_Comm communicator)
override;
Distributed simulator implementation using lookahead.
Interface between ns-3 and MPI.
static void ReceiveMessages()
Check for received messages complete.
MPI_Comm GetCommunicator() override
Return the communicator used to run ns-3.
static uint32_t GetRxCount()
static bool g_freeCommunicator
Did ns-3 create the communicator? Have to free it.
uint32_t GetSystemId() override
Get the id number of this rank.
void Disable() override
Clean up the ns-3 parallel communications interface.
static void TestSendComplete()
Check for completed sends.
static bool g_mpiInitCalled
Has MPI Init been called by this interface.
void SendPacket(Ptr< Packet > p, const Time &rxTime, uint32_t node, uint32_t dev) override
Send a packet to a remote node.
static uint32_t g_size
Size of the MPI COM_WORLD group.
static bool g_enabled
Has this interface been enabled.
static uint32_t GetTxCount()
static std::list< SentBuffer > g_pendingTx
List of pending non-blocking sends.
void Enable(int *pargc, char ***pargv) override
Setup the parallel communication interface.
bool IsEnabled() override
Returns enabled state of parallel environment.
static MPI_Request * g_requests
Pending non-blocking receives.
static uint32_t g_rxCount
Total packets received.
uint32_t GetSize() override
Get the number of ranks used by ns-3.
static char ** g_pRxBuffers
Data buffers for non-blocking reads.
void Destroy() override
Deletes storage used by the parallel environment.
static uint32_t g_txCount
Total packets sent.
static MPI_Comm g_communicator
MPI communicator being used for ns-3 tasks.
static TypeId GetTypeId()
Register this type.
static uint32_t g_sid
System ID (rank) for this task.
A base class which provides memory management and object aggregation.
Pure virtual base class for the interface between ns-3 and the parallel communication layer being use...
Tracks non-blocking sends.
MPI_Request m_request
The MPI request handle.
uint8_t * m_buffer
The buffer.
void SetBuffer(uint8_t *buffer)
MPI_Request * GetRequest()
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
const uint32_t MAX_MPI_MSG_SIZE
maximum MPI message size for easy buffer creation
Declaration of class ns3::ParallelCommunicationInterface.