Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Communicator_impl Class Reference

MPI-realisation of communicator class implementation. More...

#include <communicator_mpi.h>

Classes

class  Base
 
class  Layout
 Layout class for logical organisation of parallel nodes. More...
 

Static Public Member Functions

static int init (int *pargc, char ***pargv)
 
static int finalize ()
 
static void abort ()
 
static int setup (int ninstance=1)
 
static int setup (const std::vector< int > &lattice_size, std::vector< int > &grid_size, int ninstance=1)
 
static bool is_primary ()
 
static int self ()
 
static int size ()
 
static MPI_Comm & world ()
 retrieves current communicator. More...
 
static int sync ()
 
static int sync_usleep ()
 
static double get_time ()
 
static int status ()
 
static int broadcast_string (int count, string &data, int sender)
 
static Channelsend_init (int count, int idir, int ipm)
 
static Channelrecv_init (int count, int idir, int ipm)
 

Private Member Functions

 Communicator_impl ()
 
 Communicator_impl (const Communicator_impl &)
 
Communicator_imploperator= (const Communicator_impl &)
 
 ~Communicator_impl ()
 

Static Private Attributes

static int m_grid_rank = 0
 
static int m_grid_size = 1
 
static MPI_Comm m_comm
 
static char default_grid_map [16] = "xyzt"
 

Detailed Description

MPI-realisation of communicator class implementation.

Communicator_impl class provides implementation of communication between parallel processes using MPI. Interface is basically the same as the abstract communicator class.

Definition at line 32 of file communicator_mpi.h.

Constructor & Destructor Documentation

Communicator_impl::Communicator_impl ( )
inlineprivate

Definition at line 99 of file communicator_mpi.h.

Communicator_impl::Communicator_impl ( const Communicator_impl )
inlineprivate

Definition at line 100 of file communicator_mpi.h.

Communicator_impl::~Communicator_impl ( )
inlineprivate

Definition at line 103 of file communicator_mpi.h.

Member Function Documentation

void Communicator_impl::abort ( )
static

Definition at line 159 of file communicator_mpi.cpp.

int Communicator_impl::broadcast_string ( int  count,
string &  data,
int  sender 
)
static

Definition at line 330 of file communicator_mpi.cpp.

int Communicator_impl::finalize ( )
static

Definition at line 78 of file communicator_mpi.cpp.

double Communicator_impl::get_time ( )
static

Definition at line 366 of file communicator_mpi.cpp.

int Communicator_impl::init ( int *  pargc,
char ***  pargv 
)
static

Definition at line 38 of file communicator_mpi.cpp.

bool Communicator_impl::is_primary ( )
static

Definition at line 169 of file communicator_mpi.cpp.

Communicator_impl& Communicator_impl::operator= ( const Communicator_impl )
private
Channel * Communicator_impl::recv_init ( int  count,
int  idir,
int  ipm 
)
static

Communicator::send_init() method creates a channel instance that wraps persistent communication object to receive data from neighbour node located at upward or downward (specified by ipm) in the direction idir. count represents size of buffer by number of elements (bytes).

Definition at line 65 of file channel.cpp.

int Communicator_impl::self ( )
static

Definition at line 176 of file communicator_mpi.cpp.

Channel * Communicator_impl::send_init ( int  count,
int  idir,
int  ipm 
)
static

Communicator::send_init() method creates a channel instance that wraps persistent communication object to send data to neighbour node located at upward or downward (specified by ipm) in the direction idir. count represents size of buffer by number of elements (bytes).

Definition at line 28 of file channel.cpp.

int Communicator_impl::setup ( int  ninstance = 1)
static

Definition at line 86 of file communicator_mpi.cpp.

int Communicator_impl::setup ( const std::vector< int > &  lattice_size,
std::vector< int > &  grid_size,
int  ninstance = 1 
)
static

Definition at line 121 of file communicator_mpi.cpp.

int Communicator_impl::size ( )
static

Definition at line 183 of file communicator_mpi.cpp.

int Communicator_impl::status ( )
static

Definition at line 374 of file communicator_mpi.cpp.

int Communicator_impl::sync ( )
static

Definition at line 216 of file communicator_mpi.cpp.

int Communicator_impl::sync_usleep ( )
static

Definition at line 224 of file communicator_mpi.cpp.

static MPI_Comm& Communicator_impl::world ( )
inlinestatic

retrieves current communicator.

Definition at line 60 of file communicator_mpi.h.

Member Data Documentation

char Communicator_impl::default_grid_map = "xyzt"
staticprivate

Definition at line 118 of file communicator_mpi.h.

MPI_Comm Communicator_impl::m_comm
staticprivate

Definition at line 116 of file communicator_mpi.h.

int Communicator_impl::m_grid_rank = 0
staticprivate

Definition at line 113 of file communicator_mpi.h.

int Communicator_impl::m_grid_size = 1
staticprivate

Definition at line 114 of file communicator_mpi.h.


The documentation for this class was generated from the following files: