PanNDE
All Classes Namespaces Functions Pages
Public Member Functions | List of all members
PanNDE::Communicator Class Referenceabstract

#include "modules/PanNDE/include/Communicator.hpp"

Inheritance diagram for PanNDE::Communicator:
NetMPI::MPICommunicator

Public Member Functions

virtual void Init (int &argc, char **&argv)=0
 
virtual void Init (int &argc, char **&argv, std::shared_ptr< PanNDE::Mesh > mesh)=0
 
virtual int getProcessId ()=0
 
virtual int getGlobalId ()=0
 
virtual int getNumberOfProcesses ()=0
 
virtual int getNumberOfAllProcesses ()=0
 
virtual void Finalize ()=0
 
virtual void determineExchangePattern (std::shared_ptr< PanNDE::Mesh > mesh)=0
 
virtual void setupDataLinks (std::string keyname, std::shared_ptr< PanNDE::Field > field)=0
 
virtual void setupDataLinks (std::shared_ptr< PanNDE::FieldBundle > fields)=0
 
virtual void startHaloExchange (std::string keyname)=0
 
virtual void waitUntilDone (std::string keyname)=0
 
virtual void sendArray (std::shared_ptr< PanNDE::Array< double >> array, int receiver)=0
 
virtual void sendArray (double *array, int N, int receiver)=0
 
virtual std::shared_ptr< PanNDE::Array< double > > recvArray (std::shared_ptr< PanNDE::ArrayFactory< double >> maker, int sender)=0
 
virtual void broadcastArray (std::shared_ptr< PanNDE::Array< double >> &array, int sender=0)=0
 
virtual void sendArray (std::shared_ptr< PanNDE::Array< int32_t >> array, int receiver)=0
 
virtual void sendArray (int32_t *array, int N, int receiver)=0
 
virtual std::shared_ptr< PanNDE::Array< int32_t > > recvArray (std::shared_ptr< PanNDE::ArrayFactory< int32_t >> maker, int sender)=0
 
virtual void broadcastArray (std::shared_ptr< PanNDE::Array< int32_t >> &array, int sender=0)=0
 
virtual void sendArray (std::shared_ptr< PanNDE::Array< int64_t >> array, int receiver)=0
 
virtual void sendArray (int64_t *array, int N, int receiver)=0
 
virtual std::shared_ptr< PanNDE::Array< int64_t > > recvArray (std::shared_ptr< PanNDE::ArrayFactory< int64_t >> maker, int sender)=0
 
virtual void broadcastArray (std::shared_ptr< PanNDE::Array< int64_t >> &array, int sender=0)=0
 
virtual void sendValue (double value, int receiver)=0
 
virtual void recvValue (double *value, int sender)=0
 
virtual void broadcastValue (double *value, int sender=0)=0
 
virtual std::shared_ptr< PanNDE::Array< double > > allGatherValue (double value, std::shared_ptr< PanNDE::ArrayFactory< double >> maker)=0
 
virtual void sendValue (int32_t value, int receiver)=0
 
virtual void recvValue (int32_t *value, int sender)=0
 
virtual void broadcastValue (int32_t *value, int sender=0)=0
 
virtual std::shared_ptr< PanNDE::Array< int32_t > > allGatherValue (int32_t value, std::shared_ptr< PanNDE::ArrayFactory< int32_t >> maker)=0
 
virtual void sendValue (int64_t value, int receiver)=0
 
virtual void recvValue (int64_t *value, int sender)=0
 
virtual void broadcastValue (int64_t *value, int sender=0)=0
 
virtual std::shared_ptr< PanNDE::Array< int64_t > > allGatherValue (int64_t value, std::shared_ptr< PanNDE::ArrayFactory< int64_t >> maker)=0
 
virtual void waitall ()=0
 
virtual void barrier ()=0
 

Detailed Description

Defines the data communcations methods for inter-process data exchange.

Member Function Documentation

◆ allGatherValue() [1/3]

virtual std::shared_ptr<PanNDE::Array<double> > PanNDE::Communicator::allGatherValue ( double  value,
std::shared_ptr< PanNDE::ArrayFactory< double >>  maker 
)
pure virtual

all broadcast value for placement in array by process index

Parameters
valuethe value to send
makerthe array factory to build the synthesized array

◆ allGatherValue() [2/3]

virtual std::shared_ptr<PanNDE::Array<int32_t> > PanNDE::Communicator::allGatherValue ( int32_t  value,
std::shared_ptr< PanNDE::ArrayFactory< int32_t >>  maker 
)
pure virtual

all broadcast value for placement in array by process index

Parameters
valuethe value to send
makerthe array factory to build the synthesized array

◆ allGatherValue() [3/3]

virtual std::shared_ptr<PanNDE::Array<int64_t> > PanNDE::Communicator::allGatherValue ( int64_t  value,
std::shared_ptr< PanNDE::ArrayFactory< int64_t >>  maker 
)
pure virtual

all broadcast value for placement in array by process index

Parameters
valuethe value to send
makerthe array factory to build the synthesized array

◆ barrier()

virtual void PanNDE::Communicator::barrier ( )
pure virtual

wait for all processes to arrive

Implemented in NetMPI::MPICommunicator.

◆ broadcastArray() [1/3]

virtual void PanNDE::Communicator::broadcastArray ( std::shared_ptr< PanNDE::Array< double >> &  array,
int  sender = 0 
)
pure virtual

broadcast array by process

Parameters
arraythe array to be either populated or sent
senderprocess which broadcasts the array

◆ broadcastArray() [2/3]

virtual void PanNDE::Communicator::broadcastArray ( std::shared_ptr< PanNDE::Array< int32_t >> &  array,
int  sender = 0 
)
pure virtual

broadcast array by process

Parameters
arraythe array to be either populated or sent
senderprocess which broadcasts the array

◆ broadcastArray() [3/3]

virtual void PanNDE::Communicator::broadcastArray ( std::shared_ptr< PanNDE::Array< int64_t >> &  array,
int  sender = 0 
)
pure virtual

broadcast array by process

Parameters
arraythe array to be either populated or sent
senderprocess which broadcasts the array

◆ broadcastValue() [1/3]

virtual void PanNDE::Communicator::broadcastValue ( double *  value,
int  sender = 0 
)
pure virtual

broadcast value to all processes

Parameters
valuethe address to which to write (if receiving) or send (if broadcasting)
senderprocess which sent the value

Implemented in NetMPI::MPICommunicator.

◆ broadcastValue() [2/3]

virtual void PanNDE::Communicator::broadcastValue ( int32_t *  value,
int  sender = 0 
)
pure virtual

broadcast value to all processes

Parameters
valuethe address to which to write (if receiving) or send (if broadcasting)
senderprocess which sent the value

Implemented in NetMPI::MPICommunicator.

◆ broadcastValue() [3/3]

virtual void PanNDE::Communicator::broadcastValue ( int64_t *  value,
int  sender = 0 
)
pure virtual

broadcast value to all processes

Parameters
valuethe address to which to write (if receiving) or send (if broadcasting)
senderprocess which sent the value

Implemented in NetMPI::MPICommunicator.

◆ determineExchangePattern()

virtual void PanNDE::Communicator::determineExchangePattern ( std::shared_ptr< PanNDE::Mesh mesh)
pure virtual

use the local mesh to determine the halo exchange pattern. Not recommended approach, but retained for backwards compatibility

Parameters
meshthe local mesh from which the communication pattern can be determined

◆ Finalize()

virtual void PanNDE::Communicator::Finalize ( )
pure virtual

release commmunicator assets

Implemented in NetMPI::MPICommunicator.

◆ getGlobalId()

virtual int PanNDE::Communicator::getGlobalId ( )
pure virtual

get the id number of the process in the global communicator

Implemented in NetMPI::MPICommunicator.

◆ getNumberOfAllProcesses()

virtual int PanNDE::Communicator::getNumberOfAllProcesses ( )
pure virtual

get the number of processes on the global communicator

Implemented in NetMPI::MPICommunicator.

◆ getNumberOfProcesses()

virtual int PanNDE::Communicator::getNumberOfProcesses ( )
pure virtual

get the number of processes on the local communicator

Implemented in NetMPI::MPICommunicator.

◆ getProcessId()

virtual int PanNDE::Communicator::getProcessId ( )
pure virtual

get the id number of the process in the local communicator

Implemented in NetMPI::MPICommunicator.

◆ Init() [1/2]

virtual void PanNDE::Communicator::Init ( int &  argc,
char **&  argv 
)
pure virtual

Initialize a communicator object. As many initializers (e.g. MPI, VTK, etc.) require the arguments to ‘int main()’, they are passed through here.

Parameters
argcnumber of arguments in argv
argvthe command line arguments provided to int main()

Implemented in NetMPI::MPICommunicator.

◆ Init() [2/2]

virtual void PanNDE::Communicator::Init ( int &  argc,
char **&  argv,
std::shared_ptr< PanNDE::Mesh mesh 
)
pure virtual

Initialize a communicator object. As many initializers (e.g. MPI, VTK, etc.) require the arguments to ‘int main()’, they are passed through here. The data exchange pattern can be determined for final configuration if the mesh is passed in

Parameters
argcnumber of arguments in argv
argvthe command line arguments provided to int main()
meshthe local mesh for simulation

◆ recvArray() [1/3]

virtual std::shared_ptr<PanNDE::Array<double> > PanNDE::Communicator::recvArray ( std::shared_ptr< PanNDE::ArrayFactory< double >>  maker,
int  sender 
)
pure virtual

Receive array from process

Parameters
makerthe array factory method required to build the array
senderprocess which sent the array

◆ recvArray() [2/3]

virtual std::shared_ptr<PanNDE::Array<int32_t> > PanNDE::Communicator::recvArray ( std::shared_ptr< PanNDE::ArrayFactory< int32_t >>  maker,
int  sender 
)
pure virtual

Receive array from process

Parameters
makerthe array factory method required to build the array
senderprocess which sent the array

◆ recvArray() [3/3]

virtual std::shared_ptr<PanNDE::Array<int64_t> > PanNDE::Communicator::recvArray ( std::shared_ptr< PanNDE::ArrayFactory< int64_t >>  maker,
int  sender 
)
pure virtual

Receive array from process

Parameters
makerthe array factory method required to build the array
senderprocess which sent the array

◆ recvValue() [1/3]

virtual void PanNDE::Communicator::recvValue ( double *  value,
int  sender 
)
pure virtual

receive value from process

Parameters
valuethe address to which to write
senderprocess which sent the value

Implemented in NetMPI::MPICommunicator.

◆ recvValue() [2/3]

virtual void PanNDE::Communicator::recvValue ( int32_t *  value,
int  sender 
)
pure virtual

receive value from process

Parameters
valuethe address to which to write
senderprocess which sent the value

Implemented in NetMPI::MPICommunicator.

◆ recvValue() [3/3]

virtual void PanNDE::Communicator::recvValue ( int64_t *  value,
int  sender 
)
pure virtual

receive value from process

Parameters
valuethe address to which to write
senderprocess which sent the value

Implemented in NetMPI::MPICommunicator.

◆ sendArray() [1/6]

virtual void PanNDE::Communicator::sendArray ( double *  array,
int  N,
int  receiver 
)
pure virtual

Send array to process

Parameters
arraythe array to send
Nthe length of the array
receiverprocess to receive the array

Implemented in NetMPI::MPICommunicator.

◆ sendArray() [2/6]

virtual void PanNDE::Communicator::sendArray ( int32_t *  array,
int  N,
int  receiver 
)
pure virtual

Send array to process

Parameters
arraythe array to send
Nthe length of the array
receiverprocess to receive the array

Implemented in NetMPI::MPICommunicator.

◆ sendArray() [3/6]

virtual void PanNDE::Communicator::sendArray ( int64_t *  array,
int  N,
int  receiver 
)
pure virtual

Send array to process

Parameters
arraythe array to send
Nthe length of the array
receiverprocess to receive the array

Implemented in NetMPI::MPICommunicator.

◆ sendArray() [4/6]

virtual void PanNDE::Communicator::sendArray ( std::shared_ptr< PanNDE::Array< double >>  array,
int  receiver 
)
pure virtual

Send array to process

Parameters
arraythe array to send
receiverprocess to receive the array

◆ sendArray() [5/6]

virtual void PanNDE::Communicator::sendArray ( std::shared_ptr< PanNDE::Array< int32_t >>  array,
int  receiver 
)
pure virtual

Send array to process

Parameters
arraythe array to send
receiverprocess to receive the array

◆ sendArray() [6/6]

virtual void PanNDE::Communicator::sendArray ( std::shared_ptr< PanNDE::Array< int64_t >>  array,
int  receiver 
)
pure virtual

Send array to process

Parameters
arraythe array to send
receiverprocess to receive the array

◆ sendValue() [1/3]

virtual void PanNDE::Communicator::sendValue ( double  value,
int  receiver 
)
pure virtual

send value to process

Parameters
valuethe value to send
receiverprocess to send value

Implemented in NetMPI::MPICommunicator.

◆ sendValue() [2/3]

virtual void PanNDE::Communicator::sendValue ( int32_t  value,
int  receiver 
)
pure virtual

send value to process

Parameters
valuethe value to send
receiverprocess to send value

Implemented in NetMPI::MPICommunicator.

◆ sendValue() [3/3]

virtual void PanNDE::Communicator::sendValue ( int64_t  value,
int  receiver 
)
pure virtual

send value to process

Parameters
valuethe value to send
receiverprocess to send value

Implemented in NetMPI::MPICommunicator.

◆ setupDataLinks() [1/2]

virtual void PanNDE::Communicator::setupDataLinks ( std::shared_ptr< PanNDE::FieldBundle fields)
pure virtual

Use the field bundle to determine the exchange pattern and register all fields contained for data exchange.

Parameters
fieldsthe field bundle to set up for halo exchange

◆ setupDataLinks() [2/2]

virtual void PanNDE::Communicator::setupDataLinks ( std::string  keyname,
std::shared_ptr< PanNDE::Field field 
)
pure virtual

after having determined the exchange pattern, use that pattern to configure the halo exchange for the specific field. Not recommended approach, but retained for backwards compatibility

Parameters
keynamefield name
fieldthe field data to be registered for halo exchange

◆ startHaloExchange()

virtual void PanNDE::Communicator::startHaloExchange ( std::string  keyname)
pure virtual

Start asynchronous halo exchange on field by name

Parameters
keynamefield name

Implemented in NetMPI::MPICommunicator.

◆ waitall()

virtual void PanNDE::Communicator::waitall ( )
pure virtual

wait for all transmissions/receptions to complete

Implemented in NetMPI::MPICommunicator.

◆ waitUntilDone()

virtual void PanNDE::Communicator::waitUntilDone ( std::string  keyname)
pure virtual

Wait for completion of halo exchange on field by name

Parameters
keynamefield name

Implemented in NetMPI::MPICommunicator.


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