A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
mpi-interface.h
Go to the documentation of this file.
1
/*
2
* Copyright 2013. Lawrence Livermore National Security, LLC.
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Steven Smith <smith84@llnl.gov>
18
*/
19
26
#ifndef NS3_MPI_INTERFACE_H
27
#define NS3_MPI_INTERFACE_H
28
29
#include <ns3/nstime.h>
30
#include <ns3/packet.h>
31
32
#include <mpi.h>
33
34
namespace
ns3
35
{
46
class
ParallelCommunicationInterface;
47
62
class
MpiInterface
63
{
64
public
:
68
static
void
Destroy
();
76
static
uint32_t
GetSystemId
();
86
static
uint32_t
GetSize
();
92
static
bool
IsEnabled
();
119
static
void
Enable
(
int
* pargc,
char
*** pargv);
127
static
void
Enable
(MPI_Comm communicator);
134
static
void
Disable
();
145
static
void
SendPacket
(
Ptr<Packet>
p,
const
Time
& rxTime, uint32_t node, uint32_t dev);
146
156
static
MPI_Comm
GetCommunicator
();
157
158
private
:
162
static
void
SetParallelSimulatorImpl
();
163
167
static
ParallelCommunicationInterface
*
g_parallelCommunicationInterface
;
168
};
169
170
}
// namespace ns3
171
172
#endif
/* NS3_MPI_INTERFACE_H */
ns3::MpiInterface
Singleton used to interface to the communications infrastructure when running NS3 in parallel.
Definition:
mpi-interface.h:63
ns3::MpiInterface::g_parallelCommunicationInterface
static ParallelCommunicationInterface * g_parallelCommunicationInterface
Static instance of the instantiated parallel controller.
Definition:
mpi-interface.h:167
ns3::MpiInterface::GetCommunicator
static MPI_Comm GetCommunicator()
Return the communicator used to run ns-3.
Definition:
mpi-interface.cc:146
ns3::MpiInterface::SendPacket
static void SendPacket(Ptr< Packet > p, const Time &rxTime, uint32_t node, uint32_t dev)
Send a packet to a remote node.
Definition:
mpi-interface.cc:139
ns3::MpiInterface::IsEnabled
static bool IsEnabled()
Returns enabled state of parallel environment.
Definition:
mpi-interface.cc:76
ns3::MpiInterface::Destroy
static void Destroy()
Deletes storage used by the parallel environment.
Definition:
mpi-interface.cc:43
ns3::MpiInterface::GetSystemId
static uint32_t GetSystemId()
Get the id number of this rank.
Definition:
mpi-interface.cc:50
ns3::MpiInterface::GetSize
static uint32_t GetSize()
Get the number of ranks used by ns-3.
Definition:
mpi-interface.cc:63
ns3::MpiInterface::Disable
static void Disable()
Clean up the ns-3 parallel communications interface.
Definition:
mpi-interface.cc:153
ns3::MpiInterface::Enable
static void Enable(int *pargc, char ***pargv)
Setup the parallel communication interface.
Definition:
mpi-interface.cc:124
ns3::MpiInterface::SetParallelSimulatorImpl
static void SetParallelSimulatorImpl()
Common enable logic.
Definition:
mpi-interface.cc:89
ns3::ParallelCommunicationInterface
Pure virtual base class for the interface between ns-3 and the parallel communication layer being use...
Definition:
parallel-communication-interface.h:59
ns3::Ptr< Packet >
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:105
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
mpi
model
mpi-interface.h
Generated on Sun Mar 3 2024 17:11:05 for ns-3 by
1.9.1