39 #ifndef vtkMPICommunicator_h 40 #define vtkMPICommunicator_h 42 #include "vtkParallelMPIModule.h" 48 class vtkMPICommunicatorOpaqueComm;
49 class vtkMPICommunicatorOpaqueRequest;
50 class vtkMPICommunicatorReceiveDataInfo;
66 vtkMPICommunicatorOpaqueRequest*
Req;
70 void PrintSelf(ostream& os,
vtkIndent indent)
override;
104 int remoteProcessId,
int tag)
override;
106 int remoteProcessId,
int tag)
override;
118 int NoBlockSend(
const int*
data,
int length,
int remoteProcessId,
int tag,
120 int NoBlockSend(
const unsigned long*
data,
int length,
int remoteProcessId,
122 int NoBlockSend(
const char*
data,
int length,
int remoteProcessId,
124 int NoBlockSend(
const unsigned char*
data,
int length,
int remoteProcessId,
126 int NoBlockSend(
const float*
data,
int length,
int remoteProcessId,
128 int NoBlockSend(
const double*
data,
int length,
int remoteProcessId,
130 #ifdef VTK_USE_64BIT_IDS 144 int NoBlockReceive(
int*
data,
int length,
int remoteProcessId,
146 int NoBlockReceive(
unsigned long*
data,
int length,
147 int remoteProcessId,
int tag,
Request& req);
148 int NoBlockReceive(
char*
data,
int length,
int remoteProcessId,
150 int NoBlockReceive(
unsigned char*
data,
int length,
int remoteProcessId,
152 int NoBlockReceive(
float*
data,
int length,
int remoteProcessId,
154 int NoBlockReceive(
double*
data,
int length,
int remoteProcessId,
156 #ifdef VTK_USE_64BIT_IDS 169 virtual void Barrier()
override;
171 int srcProcessId)
override;
172 virtual int GatherVoidArray(
const void *sendBuffer,
void *recvBuffer,
174 virtual int GatherVVoidArray(
const void *sendBuffer,
void *recvBuffer,
177 virtual int ScatterVoidArray(
const void *sendBuffer,
void *recvBuffer,
179 virtual int ScatterVVoidArray(
const void *sendBuffer,
void *recvBuffer,
182 int srcProcessId)
override;
183 virtual int AllGatherVoidArray(
const void *sendBuffer,
void *recvBuffer,
185 virtual int AllGatherVVoidArray(
const void *sendBuffer,
void *recvBuffer,
188 virtual int ReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
190 int operation,
int destProcessId)
override;
191 virtual int ReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
193 Operation *operation,
int destProcessId)
override;
194 virtual int AllReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
196 int operation)
override;
197 virtual int AllReduceVoidArray(
const void *sendBuffer,
void *recvBuffer,
212 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource);
213 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
215 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
217 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
219 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
221 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
229 int WaitAll(
const int count,
Request requests[]);
244 const int count,
Request requests[],
int &NCompleted,
int *completed )
VTK_SIZEHINT(requests, count);
251 int TestAll(
const int count,
Request requests[],
int& flag )
VTK_SIZEHINT(requests, count);
256 int TestAny(
const int count,
Request requests[],
int &idx,
int &flag )
VTK_SIZEHINT(requests, count);
264 int TestSome(
const int count,
Request requests[],
265 int& NCompleted,
int *completed)
VTK_SIZEHINT(requests, count);
271 return this->MPIComm;
274 int InitializeExternal(vtkMPICommunicatorOpaqueComm *comm);
276 static char* Allocate(
size_t size);
277 static void Free(
char* ptr);
285 vtkSetClampMacro(UseSsend,
int, 0, 1);
286 vtkGetMacro(UseSsend,
int);
287 vtkBooleanMacro(UseSsend,
int);
305 int InitializeNumberOfProcesses();
318 vtkSetMacro(KeepHandle,
int);
319 vtkBooleanMacro(KeepHandle,
int);
341 virtual int ReceiveDataInternal(
343 int remoteProcessId,
int tag,
344 vtkMPICommunicatorReceiveDataInfo*
info,
345 int useCopy,
int& senderId);
354 static int CheckForMPIError(
int err);
A custom operation to use in a reduce command.
vtkMPICommunicatorOpaqueRequest * Req
static vtkMPICommunicator * WorldCommunicator
Class for creating user defined MPI communicators.
vtkMPICommunicatorOpaqueComm * MPIComm
a simple class to control print indentation
int Test(int argc, char *argv[], const char *dfile, const InitializationCallback &initCallback)
A subgroup of processes from a communicator.
Process communication using MPI.
#define VTK_SIZEHINT(...)
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()