A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
src
mpi
model
mpi-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
22
#ifndef NS3_MPI_INTERFACE_H
23
#define NS3_MPI_INTERFACE_H
24
25
#include <ns3/nstime.h>
26
#include <ns3/packet.h>
27
28
namespace
ns3
{
34
class
ParallelCommunicationInterface;
35
50
class
MpiInterface
51
{
52
public
:
56
static
void
Destroy
();
62
static
uint32_t
GetSystemId
();
68
static
uint32_t
GetSize
();
72
static
bool
IsEnabled
();
82
static
void
Enable
(
int
* pargc,
char
*** pargv);
87
static
void
Disable
();
96
static
void
SendPacket
(
Ptr<Packet>
p,
const
Time
&rxTime, uint32_t node, uint32_t dev);
97
private
:
98
102
static
ParallelCommunicationInterface
*
g_parallelCommunicationInterface
;
103
};
104
105
}
// namespace ns3
106
107
#endif
/* NS3_MPI_INTERFACE_H */
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:102
ns3::Ptr< Packet >
ns3::MpiInterface
Singleton used to interface to the communications infrastructure when running NS3 in parallel...
Definition:
mpi-interface.h:50
ns3::MpiInterface::Disable
static void Disable()
Terminates the parallel environment.
Definition:
mpi-interface.cc:120
ns3::ParallelCommunicationInterface
Pure virtual base class for the interface between ns-3 and the parallel communication layer being use...
Definition:
parallel-communication-interface.h:49
ns3::MpiInterface::Destroy
static void Destroy()
Deletes storage used by the parallel environment.
Definition:
mpi-interface.cc:38
ns3::MpiInterface::Enable
static void Enable(int *pargc, char ***pargv)
Sets up parallel communication interface.
Definition:
mpi-interface.cc:76
ns3::MpiInterface::IsEnabled
static bool IsEnabled()
Definition:
mpi-interface.cc:63
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::MpiInterface::SendPacket
static void SendPacket(Ptr< Packet > p, const Time &rxTime, uint32_t node, uint32_t dev)
Definition:
mpi-interface.cc:112
ns3::MpiInterface::GetSystemId
static uint32_t GetSystemId()
Definition:
mpi-interface.cc:45
ns3::MpiInterface::g_parallelCommunicationInterface
static ParallelCommunicationInterface * g_parallelCommunicationInterface
Static instance of the instantiated parallel controller.
Definition:
mpi-interface.h:102
ns3::MpiInterface::GetSize
static uint32_t GetSize()
Definition:
mpi-interface.cc:54
Generated on Wed Nov 7 2018 10:02:06 for ns-3 by
1.8.14