A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
parallel-communication-interface.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright 2013. Lawrence Livermore National Security, LLC.
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Steven Smith <smith84@llnl.gov>
19
*
20
*/
21
28
#ifndef NS3_PARALLEL_COMMUNICATION_INTERFACE_H
29
#define NS3_PARALLEL_COMMUNICATION_INTERFACE_H
30
31
#include <stdint.h>
32
#include <list>
33
34
#include <ns3/object.h>
35
#include <ns3/nstime.h>
36
#include <ns3/buffer.h>
37
#include <ns3/packet.h>
38
39
#include "mpi.h"
40
41
namespace
ns3
{
42
59
class
ParallelCommunicationInterface
60
{
61
public
:
65
virtual
~ParallelCommunicationInterface
() {}
69
virtual
void
Destroy
() = 0;
73
virtual
uint32_t
GetSystemId
() = 0;
77
virtual
uint32_t
GetSize
() = 0;
81
virtual
bool
IsEnabled
() = 0;
85
virtual
void
Enable
(
int
* pargc,
char
*** pargv) = 0;
89
virtual
void
Enable
(MPI_Comm communicator) = 0;
93
virtual
void
Disable
() = 0;
97
virtual
void
SendPacket
(
Ptr<Packet>
p,
const
Time
&rxTime, uint32_t node, uint32_t dev) = 0;
101
virtual
MPI_Comm
GetCommunicator
() = 0;
102
private
:
103
};
104
105
}
// namespace ns3
106
107
#endif
/* NS3_PARALLEL_COMMUNICATION_INTERFACE_H */
ns3::ParallelCommunicationInterface
Pure virtual base class for the interface between ns-3 and the parallel communication layer being use...
Definition:
parallel-communication-interface.h:60
ns3::ParallelCommunicationInterface::SendPacket
virtual void SendPacket(Ptr< Packet > p, const Time &rxTime, uint32_t node, uint32_t dev)=0
Send a packet to a remote node.
ns3::ParallelCommunicationInterface::Enable
virtual void Enable(int *pargc, char ***pargv)=0
Setup the parallel communication interface.
ns3::ParallelCommunicationInterface::Enable
virtual void Enable(MPI_Comm communicator)=0
Setup the parallel communication interface using the specified communicator.
ns3::ParallelCommunicationInterface::IsEnabled
virtual bool IsEnabled()=0
Returns enabled state of parallel environment.
ns3::ParallelCommunicationInterface::GetCommunicator
virtual MPI_Comm GetCommunicator()=0
Return the communicator used to run ns-3.
ns3::ParallelCommunicationInterface::GetSystemId
virtual uint32_t GetSystemId()=0
Get the id number of this rank.
ns3::ParallelCommunicationInterface::Destroy
virtual void Destroy()=0
Deletes storage used by the parallel environment.
ns3::ParallelCommunicationInterface::GetSize
virtual uint32_t GetSize()=0
Get the number of ranks used by ns-3.
ns3::ParallelCommunicationInterface::Disable
virtual void Disable()=0
Clean up the ns-3 parallel communications interface.
ns3::ParallelCommunicationInterface::~ParallelCommunicationInterface
virtual ~ParallelCommunicationInterface()
Destructor.
Definition:
parallel-communication-interface.h:65
ns3::Ptr< Packet >
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:103
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mpi
model
parallel-communication-interface.h
Generated on Tue Feb 6 2024 19:21:25 for ns-3 by
1.9.1