44 #ifndef EPETRA_MPIDISTRIBUTOR_H
45 #define EPETRA_MPIDISTRIBUTOR_H
47 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
49 #warning "The Epetra package is deprecated"
113 const int * ExportPIDs,
115 int & NumRemoteIDs );
142 const int * RemoteGIDs,
143 const int * RemotePIDs,
149 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
151 const long long * RemoteGIDs,
152 const int * RemotePIDs,
155 long long *& ExportGIDs,
189 const int * ExportPIDs,
190 const int & NumRemoteIDs,
191 const int * RemoteGIDs,
192 const int * RemotePIDs,
195 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
197 const int * ExportPIDs,
198 const int & NumRemoteIDs,
199 const long long * RemoteGIDs,
200 const int * RemotePIDs,
211 int Do(
char * export_objs,
213 int & len_import_objs,
214 char *& import_objs );
219 int & len_import_objs,
220 char *& import_objs );
223 int DoPosts(
char * export_objs,
225 int & len_import_objs,
226 char *& import_objs );
233 int & len_import_objs,
234 char *& import_objs );
244 int Do(
char * export_objs,
247 int & len_import_objs,
248 char *& import_objs );
254 int & len_import_objs,
255 char *& import_objs );
258 int DoPosts(
char * export_objs,
261 int & len_import_objs,
262 char *& import_objs);
268 int & len_import_objs,
269 char *& import_objs );
313 void Print(std::ostream & os)
const;
318 const int & NumExportIDs,
319 const int * ExportPIDs);
323 const int * RemotePIDs);
329 template<
typename id_type>
331 const id_type *& import_ids,
332 const int *& import_procs,
334 id_type *& export_ids,
341 int Sort_ints_(
int *vals,
int *other,
int nvals );
const int * LengthsFrom() const
Number of values we're receiving from each proc.
int CreateSendStructures_(int my_proc, int nprocs, const int &NumExportIDs, const int *ExportPIDs)
int ComputeSends_(int num_imports, const id_type *&import_ids, const int *&import_procs, int &num_exports, id_type *&export_ids, int *&export_procs, int my_proc)
int ComputeRecvs_(int my_proc, int nprocs)
Epetra_MpiDistributor & operator=(const Epetra_MpiDistributor &src)
int DoPosts(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)
Post buffer of export objects (can do other local work before executing Waits)
void CreateReverseDistributor()
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
int CreateFromRecvs(const int &NumRemoteIDs, const int *RemoteGIDs, const int *RemotePIDs, bool Deterministic, int &NumExportIDs, int *&ExportGIDs, int *&ExportPIDs)
Create a communication plan from receive list.
int NumReceives() const
The number of procs from which we will receive data.
int DoReverseWaits()
Wait on a reverse set of posts.
int CreateFromSendsAndRecvs(const int &NumExportIDs, const int *ExportPIDs, const int &NumRemoteIDs, const int *RemoteGIDs, const int *RemotePIDs, bool Deterministic)
Create a communication plan from send list and a recv list.
MPI implementation of Epetra_Distributor.
Epetra_MpiComm: The Epetra MPI Communication Class.
int CreateRecvStructures_(const int &NumRemoteIDs, const int *RemotePIDs)
int NumSends() const
The number of procs to which we will send data.
Epetra_Object: The base Epetra class.
int TotalReceiveLength() const
Total number of values that this proc is receiving from other procs.
virtual ~Epetra_MpiDistributor()
Destructor (declared virtual for memory safety).
int MaxSendLength() const
Maximum number of values that this proc is sending to another single proc.
int CreateFromSends(const int &NumExportIDs, const int *ExportPIDs, bool Deterministic, int &NumRemoteIDs)
Create a communication plan from send list.
int DoWaits()
Wait on a set of posts.
const int * ProcsTo() const
A list of procs to which this proc is sending values.
const int * LengthsTo() const
Number of values we're sending to each proc.
int DoReversePosts(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)
Do reverse post of buffer of export objects (can do other local work before executing Waits) ...
Epetra_Distributor * ReverseClone()
Create and extract the reverse version of the distributor.
Epetra_Distributor * Clone()
Clone method.
void Print(std::ostream &os) const
Epetra_MpiDistributor * comm_plan_reverse_
const int * ProcsFrom() const
A list of procs sending values to this proc.
int Sort_ints_(int *vals, int *other, int nvals)
int Do(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)
Execute plan on buffer of export objects in a single step.
Epetra_MpiDistributor(const Epetra_MpiComm &Comm)
Default constructor.
int DoReverse(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)
Execute reverse of plan on buffer of export objects in a single step.
const Epetra_MpiComm * epComm_
void GetLastDoStatistics(int &bytes_sent, int &bytes_recvd) const
Information on the last call to Do/DoReverse.