VTK
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
vtkMPICommunicator Class Reference

Class for creating user defined MPI communicators. More...

#include <vtkMPICommunicator.h>

Inheritance diagram for vtkMPICommunicator:
[legend]
Collaboration diagram for vtkMPICommunicator:
[legend]

Classes

class  Request
 

Public Types

typedef vtkCommunicator Superclass
 
- Public Types inherited from vtkCommunicator
enum  Tags {
  BROADCAST_TAG = 10, GATHER_TAG = 11, GATHERV_TAG = 12, SCATTER_TAG = 13,
  SCATTERV_TAG = 14, REDUCE_TAG = 15, BARRIER_TAG = 16
}
 
enum  StandardOperations {
  MAX_OP, MIN_OP, SUM_OP, PRODUCT_OP,
  LOGICAL_AND_OP, BITWISE_AND_OP, LOGICAL_OR_OP, BITWISE_OR_OP,
  LOGICAL_XOR_OP, BITWISE_XOR_OP
}
 
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkMPICommunicatorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
int Initialize (vtkProcessGroup *group)
 Used to initialize the communicator (i.e. More...
 
int SplitInitialize (vtkCommunicator *oldcomm, int color, int key)
 Used to initialize the communicator (i.e. More...
 
virtual int SendVoidArray (const void *data, vtkIdType length, int type, int remoteProcessId, int tag) override
 Performs the actual communication. More...
 
virtual int ReceiveVoidArray (void *data, vtkIdType length, int type, int remoteProcessId, int tag) override
 Subclasses have to supply this method to receive various arrays of data. More...
 
int NoBlockSend (const int *data, int length, int remoteProcessId, int tag, Request &req)
 This method sends data to another process (non-blocking). More...
 
int NoBlockSend (const unsigned long *data, int length, int remoteProcessId, int tag, Request &req)
 
int NoBlockSend (const char *data, int length, int remoteProcessId, int tag, Request &req)
 
int NoBlockSend (const unsigned char *data, int length, int remoteProcessId, int tag, Request &req)
 
int NoBlockSend (const float *data, int length, int remoteProcessId, int tag, Request &req)
 
int NoBlockSend (const double *data, int length, int remoteProcessId, int tag, Request &req)
 
int NoBlockReceive (int *data, int length, int remoteProcessId, int tag, Request &req)
 This method receives data from a corresponding send (non-blocking). More...
 
int NoBlockReceive (unsigned long *data, int length, int remoteProcessId, int tag, Request &req)
 
int NoBlockReceive (char *data, int length, int remoteProcessId, int tag, Request &req)
 
int NoBlockReceive (unsigned char *data, int length, int remoteProcessId, int tag, Request &req)
 
int NoBlockReceive (float *data, int length, int remoteProcessId, int tag, Request &req)
 
int NoBlockReceive (double *data, int length, int remoteProcessId, int tag, Request &req)
 
virtual void Barrier () override
 More efficient implementations of collective operations that use the equivalent MPI commands. More...
 
virtual int BroadcastVoidArray (void *data, vtkIdType length, int type, int srcProcessId) override
 Subclasses should reimplement these if they have a more efficient implementation. More...
 
virtual int GatherVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int destProcessId) override
 
virtual int GatherVVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int type, int destProcessId) override
 
virtual int ScatterVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int srcProcessId) override
 
virtual int ScatterVVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int type, int srcProcessId) override
 
virtual int AllGatherVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type) override
 
virtual int AllGatherVVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int type) override
 
virtual int ReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int operation, int destProcessId) override
 
virtual int ReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, Operation *operation, int destProcessId) override
 
virtual int AllReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, int operation) override
 
virtual int AllReduceVoidArray (const void *sendBuffer, void *recvBuffer, vtkIdType length, int type, Operation *operation) override
 
int Iprobe (int source, int tag, int *flag, int *actualSource)
 Nonblocking test for a message. More...
 
int Iprobe (int source, int tag, int *flag, int *actualSource, int *type, int *size)
 
int Iprobe (int source, int tag, int *flag, int *actualSource, unsigned long *type, int *size)
 
int Iprobe (int source, int tag, int *flag, int *actualSource, const char *type, int *size)
 
int Iprobe (int source, int tag, int *flag, int *actualSource, float *type, int *size)
 
int Iprobe (int source, int tag, int *flag, int *actualSource, double *type, int *size)
 
int WaitAll (const int count, Request requests[])
 Given the request objects of a set of non-blocking operations (send and/or receive) this method blocks until all requests are complete. More...
 
int WaitAny (const int count, Request requests[], int &idx)
 Blocks until one of the specified requests in the given request array completes. More...
 
int WaitSome (const int count, Request requests[], int &NCompleted, int *completed)
 Blocks until one or more of the specified requests in the given request request array completes. More...
 
int TestAll (const int count, Request requests[], int &flag)
 Checks if the given communication request objects are complete. More...
 
int TestAny (const int count, Request requests[], int &idx, int &flag)
 Check if at least one of the specified requests has completed. More...
 
int TestSome (const int count, Request requests[], int &NCompleted, int *completed)
 Checks the status of all the given request communication object handles. More...
 
vtkMPICommunicatorOpaqueComm * GetMPIComm ()
 
int InitializeExternal (vtkMPICommunicatorOpaqueComm *comm)
 
virtual void SetUseSsend (int)
 When set to 1, all MPI_Send calls are replaced by MPI_Ssend calls. More...
 
virtual int GetUseSsend ()
 
virtual void UseSsendOn ()
 
virtual void UseSsendOff ()
 
void CopyFrom (vtkMPICommunicator *source)
 Copies all the attributes of source, deleting previously stored data. More...
 
- Public Member Functions inherited from vtkCommunicator
vtkCommunicatorNewInstance () const
 
virtual void SetNumberOfProcesses (int num)
 Set the number of processes you will be using. More...
 
virtual int GetNumberOfProcesses ()
 
virtual int GetLocalProcessId ()
 Tells you which process [0, NumProcess) you are in. More...
 
int Send (vtkDataObject *data, int remoteHandle, int tag)
 This method sends a data object to a destination. More...
 
int Send (vtkDataArray *data, int remoteHandle, int tag)
 This method sends a data array to a destination. More...
 
int Send (const int *data, vtkIdType length, int remoteHandle, int tag)
 Convenience methods for sending data arrays. More...
 
int Send (const unsigned int *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const short *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const unsigned short *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const long *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const unsigned long *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const unsigned char *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const char *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const signed char *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const float *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const double *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const long long *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const unsigned long long *data, vtkIdType length, int remoteHandle, int tag)
 
int Send (const vtkMultiProcessStream &stream, int remoteId, int tag)
 
int Receive (vtkDataObject *data, int remoteHandle, int tag)
 This method receives a data object from a corresponding send. More...
 
vtkDataObjectReceiveDataObject (int remoteHandle, int tag)
 The caller does not have to know the data type before this call is made. More...
 
int Receive (vtkDataArray *data, int remoteHandle, int tag)
 This method receives a data array from a corresponding send. More...
 
int Receive (int *data, vtkIdType maxlength, int remoteHandle, int tag)
 Convenience methods for receiving data arrays. More...
 
int Receive (unsigned int *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (short *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (unsigned short *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (long *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (unsigned long *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (unsigned char *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (char *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (signed char *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (float *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (double *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (long long *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (unsigned long long *data, vtkIdType maxlength, int remoteHandle, int tag)
 
int Receive (vtkMultiProcessStream &stream, int remoteId, int tag)
 
virtual vtkIdType GetCount ()
 Returns the number of words received by the most recent Receive(). More...
 
int Broadcast (int *data, vtkIdType length, int srcProcessId)
 Broadcast sends the array in the process with id srcProcessId to all of the other processes. More...
 
int Broadcast (unsigned int *data, vtkIdType length, int srcProcessId)
 
int Broadcast (short *data, vtkIdType length, int srcProcessId)
 
int Broadcast (unsigned short *data, vtkIdType length, int srcProcessId)
 
int Broadcast (long *data, vtkIdType length, int srcProcessId)
 
int Broadcast (unsigned long *data, vtkIdType length, int srcProcessId)
 
int Broadcast (unsigned char *data, vtkIdType length, int srcProcessId)
 
int Broadcast (char *data, vtkIdType length, int srcProcessId)
 
int Broadcast (signed char *data, vtkIdType length, int srcProcessId)
 
int Broadcast (float *data, vtkIdType length, int srcProcessId)
 
int Broadcast (double *data, vtkIdType length, int srcProcessId)
 
int Broadcast (long long *data, vtkIdType length, int srcProcessId)
 
int Broadcast (unsigned long long *data, vtkIdType length, int srcProcessId)
 
int Broadcast (vtkDataObject *data, int srcProcessId)
 
int Broadcast (vtkDataArray *data, int srcProcessId)
 
int Broadcast (vtkMultiProcessStream &stream, int srcProcessId)
 
int Gather (const int *sendBuffer, int *recvBuffer, vtkIdType length, int destProcessId)
 Gather collects arrays in the process with id destProcessId. More...
 
int Gather (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const short *sendBuffer, short *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const long *sendBuffer, long *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const char *sendBuffer, char *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const float *sendBuffer, float *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const double *sendBuffer, double *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int destProcessId)
 
int Gather (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
 
int Gather (vtkDataObject *sendBuffer, std::vector< vtkSmartPointer< vtkDataObject > > &recvBuffer, int destProcessId)
 Gathers vtkDataObject (sendBuffer) from all ranks to the destProcessId. More...
 
int GatherV (const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 GatherV is the vector variant of Gather. More...
 
int GatherV (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const short *sendBuffer, short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const long *sendBuffer, long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const long long *sendBuffer, long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 
int GatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId)
 For the first GatherV variant, recvLengths and offsets known on destProcessId and are passed in as parameters For the second GatherV variant, recvLengths and offsets are not known on destProcessId. More...
 
int GatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdTypeArray *recvLengths, vtkIdTypeArray *offsets, int destProcessId)
 
int GatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId)
 
int GatherV (vtkDataObject *sendData, vtkSmartPointer< vtkDataObject > *recvData, int destProcessId)
 Collects data objects in the process with id destProcessId. More...
 
int Scatter (const int *sendBuffer, int *recvBuffer, vtkIdType length, int srcProcessId)
 Scatter takes an array in the process with id srcProcessId and distributes it. More...
 
int Scatter (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const short *sendBuffer, short *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const long *sendBuffer, long *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const char *sendBuffer, char *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const float *sendBuffer, float *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const double *sendBuffer, double *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int srcProcessId)
 
int Scatter (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int srcProcessId)
 
int ScatterV (const int *sendBuffer, int *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 ScatterV is the vector variant of Scatter. More...
 
int ScatterV (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const short *sendBuffer, short *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const long *sendBuffer, long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const char *sendBuffer, char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const float *sendBuffer, float *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const double *sendBuffer, double *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const long long *sendBuffer, long long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int ScatterV (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId)
 
int AllGather (const int *sendBuffer, int *recvBuffer, vtkIdType length)
 Same as gather except that the result ends up on all processes. More...
 
int AllGather (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length)
 
int AllGather (const short *sendBuffer, short *recvBuffer, vtkIdType length)
 
int AllGather (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length)
 
int AllGather (const long *sendBuffer, long *recvBuffer, vtkIdType length)
 
int AllGather (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length)
 
int AllGather (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length)
 
int AllGather (const char *sendBuffer, char *recvBuffer, vtkIdType length)
 
int AllGather (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length)
 
int AllGather (const float *sendBuffer, float *recvBuffer, vtkIdType length)
 
int AllGather (const double *sendBuffer, double *recvBuffer, vtkIdType length)
 
int AllGather (const long long *sendBuffer, long long *recvBuffer, vtkIdType length)
 
int AllGather (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length)
 
int AllGather (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
 
int AllGatherV (const int *sendBuffer, int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 Same as GatherV except that the result is placed in all processes. More...
 
int AllGatherV (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const short *sendBuffer, short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const long *sendBuffer, long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const char *sendBuffer, char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const float *sendBuffer, float *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const double *sendBuffer, double *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const long long *sendBuffer, long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType sendLength, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets)
 
int AllGatherV (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer)
 
int Reduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation, int destProcessId)
 Reduce an array to the given destination process. More...
 
int Reduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int operation, int destProcessId)
 
int Reduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation, int destProcessId)
 
int Reduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 Reduce an array to the given destination process. More...
 
int Reduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId)
 
int Reduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, Operation *operation, int destProcessId)
 
int AllReduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, int operation)
 Same as Reduce except that the result is placed in all of the processes. More...
 
int AllReduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int operation)
 
int AllReduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation)
 
int AllReduce (const int *sendBuffer, int *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const unsigned int *sendBuffer, unsigned int *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const short *sendBuffer, short *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const unsigned short *sendBuffer, unsigned short *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const long *sendBuffer, long *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const unsigned long *sendBuffer, unsigned long *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const unsigned char *sendBuffer, unsigned char *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const char *sendBuffer, char *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const signed char *sendBuffer, signed char *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const float *sendBuffer, float *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const double *sendBuffer, double *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const long long *sendBuffer, long long *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, Operation *operation)
 
int AllReduce (vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, Operation *operation)
 
virtual int ComputeGlobalBounds (int processorId, int numProcesses, vtkBoundingBox *bounds, int *rightHasBounds=nullptr, int *leftHasBounds=nullptr, int hasBoundsTag=288402, int localBoundsTag=288403, int globalBoundsTag=288404)
 Determine the global bounds for a set of processes. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time. More...
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
void PrintRevisions (ostream &)
 Legacy. More...
 

Static Public Member Functions

static vtkTypeBool IsTypeOf (const char *type)
 
static vtkMPICommunicatorSafeDownCast (vtkObjectBase *o)
 
static vtkMPICommunicatorNew ()
 Creates an empty communicator. More...
 
static vtkMPICommunicatorGetWorldCommunicator ()
 Returns the singleton which behaves as the global communicator (MPI_COMM_WORLD) More...
 
static char * Allocate (size_t size)
 
static void Free (char *ptr)
 
- Static Public Member Functions inherited from vtkCommunicator
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkCommunicatorSafeDownCast (vtkObjectBase *o)
 
static void SetUseCopy (int useCopy)
 
static int GetParentProcessor (int pid)
 Some helper functions when dealing with heap tree - based algorithms - we don't need a function for getting the right processor since it is 1 + theLeftProcessor. More...
 
static int GetLeftChildProcessor (int pid)
 
static int MarshalDataObject (vtkDataObject *object, vtkCharArray *buffer)
 Convert a data object into a string that can be transmitted and vice versa. More...
 
static int UnMarshalDataObject (vtkCharArray *buffer, vtkDataObject *object)
 
static vtkSmartPointer< vtkDataObjectUnMarshalDataObject (vtkCharArray *buffer)
 Same as UnMarshalDataObject(vtkCharArray*, vtkDataObject*) except that this method doesn't need to know the type of the data object a priori. More...
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkMPICommunicator ()
 
 ~vtkMPICommunicator ()
 
int InitializeNumberOfProcesses ()
 
virtual void SetKeepHandle (int)
 KeepHandle is normally off. More...
 
virtual void KeepHandleOn ()
 
virtual void KeepHandleOff ()
 
void InitializeCopy (vtkMPICommunicator *source)
 
void Duplicate (vtkMPICommunicator *source)
 Copies all the attributes of source, deleting previously stored data EXCEPT the MPI communicator handle which is duplicated with MPI_Comm_dup(). More...
 
virtual int ReceiveDataInternal (char *data, int length, int sizeoftype, int remoteProcessId, int tag, vtkMPICommunicatorReceiveDataInfo *info, int useCopy, int &senderId)
 Implementation for receive data. More...
 
- Protected Member Functions inherited from vtkCommunicator
int WriteDataArray (vtkDataArray *object)
 
int ReadDataArray (vtkDataArray *object)
 
 vtkCommunicator ()
 
 ~vtkCommunicator () override
 
int SendElementalDataObject (vtkDataObject *data, int remoteHandle, int tag)
 
int GatherV (vtkDataArray *sendArray, vtkDataArray *recvArray, vtkSmartPointer< vtkDataArray > *recvArrays, int destProcessId)
 GatherV collects arrays in the process with id destProcessId. More...
 
int GatherVElementalDataObject (vtkDataObject *sendData, vtkSmartPointer< vtkDataObject > *receiveData, int destProcessId)
 
int ReceiveDataObject (vtkDataObject *data, int remoteHandle, int tag, int type=-1)
 
int ReceiveElementalDataObject (vtkDataObject *data, int remoteHandle, int tag)
 
int ReceiveMultiBlockDataSet (vtkMultiBlockDataSet *data, int remoteHandle, int tag)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Static Protected Member Functions

static int CheckForMPIError (int err)
 

Protected Attributes

vtkMPICommunicatorOpaqueComm * MPIComm
 
int Initialized
 
int KeepHandle
 
int LastSenderId
 
int UseSsend
 
- Protected Attributes inherited from vtkCommunicator
int MaximumNumberOfProcesses
 
int NumberOfProcesses
 
int LocalProcessId
 
vtkIdType Count
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Static Protected Attributes

static vtkMPICommunicatorWorldCommunicator
 
- Static Protected Attributes inherited from vtkCommunicator
static int UseCopy
 

Friends

class vtkMPIController
 

Detailed Description

Class for creating user defined MPI communicators.

This class can be used to create user defined MPI communicators. The actual creation (with MPI_Comm_create) occurs in Initialize which takes as arguments a super-communicator and a group of process ids. The new communicator is created by including the processes contained in the group. The global communicator (equivalent to MPI_COMM_WORLD) can be obtained using the class method GetWorldCommunicator. It is important to note that this communicator should not be used on the processes not contained in the group. For example, if the group contains processes 0 and 1, controller->SetCommunicator(communicator) would cause an MPI error on any other process.

See also
vtkMPIController vtkProcessGroup
Tests:
vtkMPICommunicator (Tests)

Definition at line 52 of file vtkMPICommunicator.h.

Member Typedef Documentation

◆ Superclass

Definition at line 69 of file vtkMPICommunicator.h.

Constructor & Destructor Documentation

◆ vtkMPICommunicator()

vtkMPICommunicator::vtkMPICommunicator ( )
protected

◆ ~vtkMPICommunicator()

vtkMPICommunicator::~vtkMPICommunicator ( )
protected

Member Function Documentation

◆ IsTypeOf()

static vtkTypeBool vtkMPICommunicator::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkMPICommunicator::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkCommunicator.

◆ SafeDownCast()

static vtkMPICommunicator* vtkMPICommunicator::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase* vtkMPICommunicator::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkCommunicator.

◆ NewInstance()

vtkMPICommunicator* vtkMPICommunicator::NewInstance ( ) const

◆ PrintSelf()

void vtkMPICommunicator::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Methods invoked by print to print information about the object including superclasses.

Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkCommunicator.

◆ New()

static vtkMPICommunicator* vtkMPICommunicator::New ( )
static

Creates an empty communicator.

◆ GetWorldCommunicator()

static vtkMPICommunicator* vtkMPICommunicator::GetWorldCommunicator ( )
static

Returns the singleton which behaves as the global communicator (MPI_COMM_WORLD)

◆ Initialize()

int vtkMPICommunicator::Initialize ( vtkProcessGroup group)

Used to initialize the communicator (i.e.

create the underlying MPI_Comm). The group must be associated with a valid vtkMPICommunicator.

◆ SplitInitialize()

int vtkMPICommunicator::SplitInitialize ( vtkCommunicator oldcomm,
int  color,
int  key 
)

Used to initialize the communicator (i.e.

create the underlying MPI_Comm) using MPI_Comm_split on the given communicator. Return values are 1 for success and 0 otherwise.

◆ SendVoidArray()

virtual int vtkMPICommunicator::SendVoidArray ( const void *  data,
vtkIdType  length,
int  type,
int  remoteProcessId,
int  tag 
)
overridevirtual

Performs the actual communication.

You will usually use the convenience Send functions defined in the superclass. Return values are 1 for success and 0 otherwise.

Implements vtkCommunicator.

◆ ReceiveVoidArray()

virtual int vtkMPICommunicator::ReceiveVoidArray ( void *  data,
vtkIdType  maxlength,
int  type,
int  remoteHandle,
int  tag 
)
overridevirtual

Subclasses have to supply this method to receive various arrays of data.

The type arg is one of the VTK type constants recognized by the vtkTemplateMacro (VTK_FLOAT, VTK_INT, etc.). maxlength is measured in number of values (as opposed to number of bytes) and is the maxmum length of the data to receive. If the maxlength is less than the length of the message sent by the sender, an error will be flagged. Once a message is received, use the GetCount() method to determine the actual size of the data received.

Implements vtkCommunicator.

◆ NoBlockSend() [1/6]

int vtkMPICommunicator::NoBlockSend ( const int data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

This method sends data to another process (non-blocking).

Tag eliminates ambiguity when multiple sends or receives exist in the same process. The last argument, vtkMPICommunicator::Request& req can later be used (with req.Test() ) to test the success of the message. Return values are 1 for success and 0 otherwise.

◆ NoBlockSend() [2/6]

int vtkMPICommunicator::NoBlockSend ( const unsigned long *  data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

◆ NoBlockSend() [3/6]

int vtkMPICommunicator::NoBlockSend ( const char *  data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

◆ NoBlockSend() [4/6]

int vtkMPICommunicator::NoBlockSend ( const unsigned char *  data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

◆ NoBlockSend() [5/6]

int vtkMPICommunicator::NoBlockSend ( const float data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

◆ NoBlockSend() [6/6]

int vtkMPICommunicator::NoBlockSend ( const double data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

◆ NoBlockReceive() [1/6]

int vtkMPICommunicator::NoBlockReceive ( int data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

This method receives data from a corresponding send (non-blocking).

The last argument, vtkMPICommunicator::Request& req can later be used (with req.Test() ) to test the success of the message. Return values are 1 for success and 0 otherwise.

◆ NoBlockReceive() [2/6]

int vtkMPICommunicator::NoBlockReceive ( unsigned long *  data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

◆ NoBlockReceive() [3/6]

int vtkMPICommunicator::NoBlockReceive ( char *  data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

◆ NoBlockReceive() [4/6]

int vtkMPICommunicator::NoBlockReceive ( unsigned char *  data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

◆ NoBlockReceive() [5/6]

int vtkMPICommunicator::NoBlockReceive ( float data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

◆ NoBlockReceive() [6/6]

int vtkMPICommunicator::NoBlockReceive ( double data,
int  length,
int  remoteProcessId,
int  tag,
Request req 
)

◆ Barrier()

virtual void vtkMPICommunicator::Barrier ( )
overridevirtual

More efficient implementations of collective operations that use the equivalent MPI commands.

Return values are 1 for success and 0 otherwise.

Reimplemented from vtkCommunicator.

◆ BroadcastVoidArray()

virtual int vtkMPICommunicator::BroadcastVoidArray ( void *  data,
vtkIdType  length,
int  type,
int  srcProcessId 
)
overridevirtual

Subclasses should reimplement these if they have a more efficient implementation.

Reimplemented from vtkCommunicator.

◆ GatherVoidArray()

virtual int vtkMPICommunicator::GatherVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
int  destProcessId 
)
overridevirtual

Reimplemented from vtkCommunicator.

◆ GatherVVoidArray()

virtual int vtkMPICommunicator::GatherVVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  sendLength,
vtkIdType recvLengths,
vtkIdType offsets,
int  type,
int  destProcessId 
)
overridevirtual

Reimplemented from vtkCommunicator.

◆ ScatterVoidArray()

virtual int vtkMPICommunicator::ScatterVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
int  srcProcessId 
)
overridevirtual

Reimplemented from vtkCommunicator.

◆ ScatterVVoidArray()

virtual int vtkMPICommunicator::ScatterVVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType sendLengths,
vtkIdType offsets,
vtkIdType  recvLength,
int  type,
int  srcProcessId 
)
overridevirtual

Reimplemented from vtkCommunicator.

◆ AllGatherVoidArray()

virtual int vtkMPICommunicator::AllGatherVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type 
)
overridevirtual

Reimplemented from vtkCommunicator.

◆ AllGatherVVoidArray()

virtual int vtkMPICommunicator::AllGatherVVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  sendLength,
vtkIdType recvLengths,
vtkIdType offsets,
int  type 
)
overridevirtual

Reimplemented from vtkCommunicator.

◆ ReduceVoidArray() [1/2]

virtual int vtkMPICommunicator::ReduceVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
int  operation,
int  destProcessId 
)
overridevirtual

Reimplemented from vtkCommunicator.

◆ ReduceVoidArray() [2/2]

virtual int vtkMPICommunicator::ReduceVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
Operation operation,
int  destProcessId 
)
overridevirtual

Reimplemented from vtkCommunicator.

◆ AllReduceVoidArray() [1/2]

virtual int vtkMPICommunicator::AllReduceVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
int  operation 
)
overridevirtual

Reimplemented from vtkCommunicator.

◆ AllReduceVoidArray() [2/2]

virtual int vtkMPICommunicator::AllReduceVoidArray ( const void *  sendBuffer,
void *  recvBuffer,
vtkIdType  length,
int  type,
Operation operation 
)
overridevirtual

Reimplemented from vtkCommunicator.

◆ Iprobe() [1/6]

int vtkMPICommunicator::Iprobe ( int  source,
int  tag,
int flag,
int actualSource 
)

Nonblocking test for a message.

Inputs are: source – the source rank or ANY_SOURCE; tag – the tag value. Outputs are: flag – True if a message matches; actualSource – the rank sending the message (useful if ANY_SOURCE is used) if flag is True and actualSource isn't nullptr; size – the length of the message in bytes if flag is true (only set if size isn't nullptr). The return value is 1 for success and 0 otherwise.

◆ Iprobe() [2/6]

int vtkMPICommunicator::Iprobe ( int  source,
int  tag,
int flag,
int actualSource,
int type,
int size 
)

◆ Iprobe() [3/6]

int vtkMPICommunicator::Iprobe ( int  source,
int  tag,
int flag,
int actualSource,
unsigned long *  type,
int size 
)

◆ Iprobe() [4/6]

int vtkMPICommunicator::Iprobe ( int  source,
int  tag,
int flag,
int actualSource,
const char *  type,
int size 
)

◆ Iprobe() [5/6]

int vtkMPICommunicator::Iprobe ( int  source,
int  tag,
int flag,
int actualSource,
float type,
int size 
)

◆ Iprobe() [6/6]

int vtkMPICommunicator::Iprobe ( int  source,
int  tag,
int flag,
int actualSource,
double type,
int size 
)

◆ WaitAll()

int vtkMPICommunicator::WaitAll ( const int  count,
Request  requests[] 
)

Given the request objects of a set of non-blocking operations (send and/or receive) this method blocks until all requests are complete.

◆ WaitAny()

int vtkMPICommunicator::WaitAny ( const int  count,
Request  requests[],
int idx 
)

Blocks until one of the specified requests in the given request array completes.

Upon return, the index in the array of the completed request object is returned through the argument list.

◆ WaitSome()

int vtkMPICommunicator::WaitSome ( const int  count,
Request  requests[],
int NCompleted,
int completed 
)

Blocks until one or more of the specified requests in the given request request array completes.

Upon return, the list of handles that have completed is stored in the completed vtkIntArray.

◆ TestAll()

int vtkMPICommunicator::TestAll ( const int  count,
Request  requests[],
int flag 
)

Checks if the given communication request objects are complete.

Upon return, flag evaluates to true iff all of the communication request objects are complete.

◆ TestAny()

int vtkMPICommunicator::TestAny ( const int  count,
Request  requests[],
int idx,
int flag 
)

Check if at least one of the specified requests has completed.

◆ TestSome()

int vtkMPICommunicator::TestSome ( const int  count,
Request  requests[],
int NCompleted,
int completed 
)

Checks the status of all the given request communication object handles.

Upon return, NCompleted holds the count of requests that have completed and the indices of the completed requests, w.r.t. the requests array is given the by the pre-allocated completed array.

◆ GetMPIComm()

vtkMPICommunicatorOpaqueComm* vtkMPICommunicator::GetMPIComm ( )
inline

Definition at line 269 of file vtkMPICommunicator.h.

◆ InitializeExternal()

int vtkMPICommunicator::InitializeExternal ( vtkMPICommunicatorOpaqueComm *  comm)

◆ Allocate()

static char* vtkMPICommunicator::Allocate ( size_t  size)
static

◆ Free()

static void vtkMPICommunicator::Free ( char *  ptr)
static

◆ SetUseSsend()

virtual void vtkMPICommunicator::SetUseSsend ( int  )
virtual

When set to 1, all MPI_Send calls are replaced by MPI_Ssend calls.

Default is 0.

◆ GetUseSsend()

virtual int vtkMPICommunicator::GetUseSsend ( )
virtual

◆ UseSsendOn()

virtual void vtkMPICommunicator::UseSsendOn ( )
virtual

◆ UseSsendOff()

virtual void vtkMPICommunicator::UseSsendOff ( )
virtual

◆ CopyFrom()

void vtkMPICommunicator::CopyFrom ( vtkMPICommunicator source)

Copies all the attributes of source, deleting previously stored data.

The MPI communicator handle is also copied. Normally, this should not be needed. It is used during the construction of a new communicator for copying the world communicator, keeping the same context.

◆ InitializeNumberOfProcesses()

int vtkMPICommunicator::InitializeNumberOfProcesses ( )
protected

◆ SetKeepHandle()

virtual void vtkMPICommunicator::SetKeepHandle ( int  )
protectedvirtual

KeepHandle is normally off.

This means that the MPI communicator handle will be freed at the destruction of the object. However, if the handle was copied from another object (via CopyFrom() not Duplicate()), this has to be turned on otherwise the handle will be freed multiple times causing MPI failure. The alternative to this is using reference counting but it is unnecessarily complicated for this case.

◆ KeepHandleOn()

virtual void vtkMPICommunicator::KeepHandleOn ( )
protectedvirtual

◆ KeepHandleOff()

virtual void vtkMPICommunicator::KeepHandleOff ( )
protectedvirtual

◆ InitializeCopy()

void vtkMPICommunicator::InitializeCopy ( vtkMPICommunicator source)
protected

◆ Duplicate()

void vtkMPICommunicator::Duplicate ( vtkMPICommunicator source)
protected

Copies all the attributes of source, deleting previously stored data EXCEPT the MPI communicator handle which is duplicated with MPI_Comm_dup().

Therefore, although the processes in the communicator remain the same, a new context is created. This prevents the two communicators from intefering with each other during message send/receives even if the tags are the same.

◆ ReceiveDataInternal()

virtual int vtkMPICommunicator::ReceiveDataInternal ( char *  data,
int  length,
int  sizeoftype,
int  remoteProcessId,
int  tag,
vtkMPICommunicatorReceiveDataInfo *  info,
int  useCopy,
int senderId 
)
protectedvirtual

Implementation for receive data.

◆ CheckForMPIError()

static int vtkMPICommunicator::CheckForMPIError ( int  err)
staticprotected

Friends And Related Function Documentation

◆ vtkMPIController

friend class vtkMPIController
friend

Definition at line 267 of file vtkMPICommunicator.h.

Member Data Documentation

◆ WorldCommunicator

vtkMPICommunicator* vtkMPICommunicator::WorldCommunicator
staticprotected

Definition at line 319 of file vtkMPICommunicator.h.

◆ MPIComm

vtkMPICommunicatorOpaqueComm* vtkMPICommunicator::MPIComm
protected

Definition at line 347 of file vtkMPICommunicator.h.

◆ Initialized

int vtkMPICommunicator::Initialized
protected

Definition at line 349 of file vtkMPICommunicator.h.

◆ KeepHandle

int vtkMPICommunicator::KeepHandle
protected

Definition at line 350 of file vtkMPICommunicator.h.

◆ LastSenderId

int vtkMPICommunicator::LastSenderId
protected

Definition at line 352 of file vtkMPICommunicator.h.

◆ UseSsend

int vtkMPICommunicator::UseSsend
protected

Definition at line 353 of file vtkMPICommunicator.h.


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