38 #ifndef vtkMPICommunicator_h
39 #define vtkMPICommunicator_h
41 #include "vtkParallelMPIModule.h"
47 class vtkMPICommunicatorOpaqueComm;
48 class vtkMPICommunicatorOpaqueRequest;
49 class vtkMPICommunicatorReceiveDataInfo;
66 vtkMPICommunicatorOpaqueRequest*
Req;
72 void PrintSelf(ostream& os,
vtkIndent indent);
97 int remoteProcessId,
int tag);
99 int remoteProcessId,
int tag);
108 int NoBlockSend(
const int*
data,
int length,
int remoteProcessId,
int tag,
110 int NoBlockSend(
const unsigned long*
data,
int length,
int remoteProcessId,
112 int NoBlockSend(
const char*
data,
int length,
int remoteProcessId,
114 int NoBlockSend(
const unsigned char*
data,
int length,
int remoteProcessId,
116 int NoBlockSend(
const float*
data,
int length,
int remoteProcessId,
118 int NoBlockSend(
const double*
data,
int length,
int remoteProcessId,
120 #ifdef VTK_USE_64BIT_IDS
131 int NoBlockReceive(
int*
data,
int length,
int remoteProcessId,
133 int NoBlockReceive(
unsigned long*
data,
int length,
134 int remoteProcessId,
int tag,
Request& req);
135 int NoBlockReceive(
char*
data,
int length,
int remoteProcessId,
137 int NoBlockReceive(
unsigned char*
data,
int length,
int remoteProcessId,
139 int NoBlockReceive(
float*
data,
int length,
int remoteProcessId,
141 int NoBlockReceive(
double*
data,
int length,
int remoteProcessId,
143 #ifdef VTK_USE_64BIT_IDS
154 virtual void Barrier();
157 virtual int GatherVoidArray(
const void *sendBuffer,
void *recvBuffer,
159 virtual int GatherVVoidArray(
const void *sendBuffer,
void *recvBuffer,
162 virtual int ScatterVoidArray(
const void *sendBuffer,
void *recvBuffer,
164 virtual int ScatterVVoidArray(
const void *sendBuffer,
void *recvBuffer,
168 virtual int AllGatherVoidArray(
const void *sendBuffer,
void *recvBuffer,
170 virtual int AllGatherVVoidArray(
const void *sendBuffer,
void *recvBuffer,
173 virtual int ReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
175 int operation,
int destProcessId);
176 virtual int ReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
178 Operation *operation,
int destProcessId);
179 virtual int AllReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
182 virtual int AllReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
195 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource);
196 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
198 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
200 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
202 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
204 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
210 int WaitAll(
const int count,
Request requests[]);
215 int WaitAny(
const int count,
Request requests[],
int& idx);
222 const int count,
Request requests[],
int &NCompleted,
int *completed );
228 int TestAll(
const int count,
Request requests[],
int& flag );
231 int TestAny(
const int count,
Request requests[],
int &idx,
int &flag );
238 int TestSome(
const int count,
Request requests[],
239 int& NCompleted,
int *completed);
247 return this->MPIComm;
250 int InitializeExternal(vtkMPICommunicatorOpaqueComm *comm);
254 static char* Allocate(
size_t size);
255 static void Free(
char* ptr);
261 vtkSetClampMacro(UseSsend,
int, 0, 1);
262 vtkGetMacro(UseSsend,
int);
263 vtkBooleanMacro(UseSsend,
int);
279 int InitializeNumberOfProcesses();
289 vtkSetMacro(KeepHandle,
int);
290 vtkBooleanMacro(KeepHandle,
int);
308 virtual int ReceiveDataInternal(
310 int remoteProcessId,
int tag,
311 vtkMPICommunicatorReceiveDataInfo*
info,
312 int useCopy,
int& senderId);
322 static int CheckForMPIError(
int err);
vtkMPICommunicatorOpaqueRequest * Req
static vtkMPICommunicator * WorldCommunicator
Class for creating user defined MPI communicators.
vtkMPICommunicatorOpaqueComm * MPIComm
a simple class to control print indentation
A subgroup of processes from a communicator.
Process communication using MPI.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Used to send/receive messages in a multiprocess environment.
vtkMPICommunicatorOpaqueComm * GetMPIComm()