00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00052
#ifndef __vtkMPIController_h
00053
#define __vtkMPIController_h
00054
00055
#include "vtkMultiProcessController.h"
00056
00057
00058
00059
#include "vtkMPICommunicator.h"
00060
00061 class VTK_PARALLEL_EXPORT vtkMPIController :
public vtkMultiProcessController
00062 {
00063
00064
public:
00065
00066
static vtkMPIController *
New();
00067 vtkTypeRevisionMacro(vtkMPIController,
vtkMultiProcessController);
00068
void PrintSelf(ostream& os,
vtkIndent indent);
00069
00071
00079 virtual void Initialize(
int* argc,
char*** argv)
00080 { this->
Initialize(argc, argv, 0); }
00082
00083
virtual void Initialize(
int* vtkNotUsed(argc),
char*** vtkNotUsed(argv),
00084
int initializedExternally);
00085
00088 virtual void Finalize() { this->
Finalize(0); }
00089
00090
virtual void Finalize(
int finalizedExternally);
00091
00094
virtual void SingleMethodExecute();
00095
00099
virtual void MultipleMethodExecute();
00100
00103
void Barrier();
00104
00107
virtual void CreateOutputWindow();
00108
00111
static char* ErrorString(
int err);
00112
00113
00119
void SetCommunicator(
vtkMPICommunicator* comm);
00120
00121
00122
00124
00129 int NoBlockSend(
int* data,
int length,
int remoteProcessId,
int tag,
00130
vtkMPICommunicator::Request& req)
00131 {
return ((
vtkMPICommunicator*)this->Communicator)->NoBlockSend
00132 (data ,length, remoteProcessId, tag, req); }
00133 int NoBlockSend(
unsigned long* data,
int length,
int remoteProcessId,
00134
int tag,
vtkMPICommunicator::Request& req)
00135 {
return ((
vtkMPICommunicator*)this->Communicator)->NoBlockSend
00136 (data, length, remoteProcessId, tag, req); }
00137 int NoBlockSend(
char* data,
int length,
int remoteProcessId,
00138
int tag,
vtkMPICommunicator::Request& req)
00139 {
return ((
vtkMPICommunicator*)this->Communicator)->NoBlockSend
00140 (data, length, remoteProcessId, tag, req); }
00141 int NoBlockSend(
float* data,
int length,
int remoteProcessId,
00142
int tag,
vtkMPICommunicator::Request& req)
00143 {
return ((
vtkMPICommunicator*)this->Communicator)->NoBlockSend
00144 (data, length, remoteProcessId, tag, req); }
00146
00148
00152 int NoBlockReceive(
int* data,
int length,
int remoteProcessId,
00153
int tag,
vtkMPICommunicator::Request& req)
00154 {
return ((
vtkMPICommunicator*)this->Communicator)->NoBlockReceive
00155 (data, length, remoteProcessId, tag, req); }
00156 int NoBlockReceive(
unsigned long* data,
int length,
00157
int remoteProcessId,
int tag,
00158
vtkMPICommunicator::Request& req)
00159 {
return ((
vtkMPICommunicator*)this->Communicator)->NoBlockReceive
00160 (data, length, remoteProcessId, tag, req); }
00161 int NoBlockReceive(
char* data,
int length,
int remoteProcessId,
00162
int tag,
vtkMPICommunicator::Request& req)
00163 {
return ((
vtkMPICommunicator*)this->Communicator)->NoBlockReceive
00164 (data, length, remoteProcessId, tag, req); }
00165 int NoBlockReceive(
float* data,
int length,
int remoteProcessId,
00166
int tag,
vtkMPICommunicator::Request& req)
00167 {
return ((
vtkMPICommunicator*)this->Communicator)->NoBlockReceive
00168 (data, length, remoteProcessId, tag, req); }
00170
00171
00172
00173
static const char* GetProcessorName();
00174
00175
protected:
00176 vtkMPIController();
00177 ~vtkMPIController();
00178
00179
00180
00181
00182
00183
int InitializeNumberOfProcesses();
00184
00185
00186
void InitializeCommunicator(
vtkMPICommunicator* comm);
00187
00188
00189
void InitializeRMICommunicator();
00190
00191
00192
00193
00194
00195
00196 static vtkMPICommunicator* WorldRMICommunicator;
00197
00198
00199 static int Initialized;
00200
00201 static char ProcessorName[];
00202
00203
private:
00204 vtkMPIController(
const vtkMPIController&);
00205
void operator=(
const vtkMPIController&);
00206 };
00207
00208
00209
#endif
00210
00211