36 #ifndef vtkMPICommunicator_h 37 #define vtkMPICommunicator_h 40 #include "vtkParallelMPIModule.h" 45 class vtkMPICommunicatorOpaqueComm;
46 class vtkMPICommunicatorOpaqueRequest;
47 class vtkMPICommunicatorReceiveDataInfo;
62 vtkMPICommunicatorOpaqueRequest*
Req;
66 void PrintSelf(ostream& os,
vtkIndent indent)
override;
98 virtual int SendVoidArray(
100 virtual int ReceiveVoidArray(
113 int NoBlockSend(
const int*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
115 const unsigned long*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
116 int NoBlockSend(
const char*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
118 const unsigned char*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
119 int NoBlockSend(
const float*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
120 int NoBlockSend(
const double*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
121 #ifdef VTK_USE_64BIT_IDS 134 int NoBlockReceive(
int*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
135 int NoBlockReceive(
unsigned long*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
136 int NoBlockReceive(
char*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
137 int NoBlockReceive(
unsigned char*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
138 int NoBlockReceive(
float*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
139 int NoBlockReceive(
double*
data,
int length,
int remoteProcessId,
int tag,
Request& req);
140 #ifdef VTK_USE_64BIT_IDS 151 virtual void Barrier()
override;
153 virtual int GatherVoidArray(
const void* sendBuffer,
void* recvBuffer,
vtkIdType length,
int type,
154 int destProcessId)
override;
155 virtual int GatherVVoidArray(
const void* sendBuffer,
void* recvBuffer,
vtkIdType sendLength,
157 virtual int ScatterVoidArray(
const void* sendBuffer,
void* recvBuffer,
vtkIdType length,
int type,
158 int srcProcessId)
override;
159 virtual int ScatterVVoidArray(
const void* sendBuffer,
void* recvBuffer,
vtkIdType* sendLengths,
161 virtual int AllGatherVoidArray(
163 virtual int AllGatherVVoidArray(
const void* sendBuffer,
void* recvBuffer,
vtkIdType sendLength,
165 virtual int ReduceVoidArray(
const void* sendBuffer,
void* recvBuffer,
vtkIdType length,
int type,
166 int operation,
int destProcessId)
override;
167 virtual int ReduceVoidArray(
const void* sendBuffer,
void* recvBuffer,
vtkIdType length,
int type,
168 Operation* operation,
int destProcessId)
override;
169 virtual int AllReduceVoidArray(
170 const void* sendBuffer,
void* recvBuffer,
vtkIdType length,
int type,
int operation)
override;
171 virtual int AllReduceVoidArray(
const void* sendBuffer,
void* recvBuffer,
vtkIdType length,
185 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource);
186 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
int*
type,
int*
size);
187 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
unsigned long*
type,
int*
size);
188 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
const char*
type,
int*
size);
189 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
float*
type,
int*
size);
190 int Iprobe(
int source,
int tag,
int* flag,
int* actualSource,
double*
type,
int*
size);
197 int WaitAll(
const int count,
Request requests[]);
211 int WaitSome(
const int count,
Request requests[],
int& NCompleted,
int* completed)
224 int TestAny(
const int count,
Request requests[],
int& idx,
int& flag)
233 int TestSome(
const int count,
Request requests[],
int& NCompleted,
int* completed)
238 vtkMPICommunicatorOpaqueComm*
GetMPIComm() {
return this->MPIComm; }
240 int InitializeExternal(vtkMPICommunicatorOpaqueComm* comm);
242 static char* Allocate(
size_t size);
243 static void Free(
char* ptr);
250 vtkSetClampMacro(UseSsend,
int, 0, 1);
251 vtkGetMacro(UseSsend,
int);
252 vtkBooleanMacro(UseSsend,
int);
270 int InitializeNumberOfProcesses();
283 vtkSetMacro(KeepHandle,
int);
284 vtkBooleanMacro(KeepHandle,
int);
305 virtual int ReceiveDataInternal(
char*
data,
int length,
int sizeoftype,
int remoteProcessId,
306 int tag, vtkMPICommunicatorReceiveDataInfo*
info,
int useCopy,
int& senderId);
315 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
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph *>::edge_descriptor e, vtkGraph *)
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(...)
Used to send/receive messages in a multiprocess environment.
vtkMPICommunicatorOpaqueComm * GetMPIComm()