44#ifndef EPETRA_MPIDISTRIBUTOR_H
45#define EPETRA_MPIDISTRIBUTOR_H
105 const int * ExportPIDs,
107 int & NumRemoteIDs );
134 const int * RemoteGIDs,
135 const int * RemotePIDs,
141#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
143 const long long * RemoteGIDs,
144 const int * RemotePIDs,
147 long long *& ExportGIDs,
181 const int * ExportPIDs,
182 const int & NumRemoteIDs,
183 const int * RemoteGIDs,
184 const int * RemotePIDs,
187#ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
189 const int * ExportPIDs,
190 const int & NumRemoteIDs,
191 const long long * RemoteGIDs,
192 const int * RemotePIDs,
203 int Do(
char * export_objs,
205 int & len_import_objs,
206 char *& import_objs );
211 int & len_import_objs,
212 char *& import_objs );
215 int DoPosts(
char * export_objs,
217 int & len_import_objs,
218 char *& import_objs );
225 int & len_import_objs,
226 char *& import_objs );
236 int Do(
char * export_objs,
239 int & len_import_objs,
240 char *& import_objs );
246 int & len_import_objs,
247 char *& import_objs );
250 int DoPosts(
char * export_objs,
253 int & len_import_objs,
254 char *& import_objs);
260 int & len_import_objs,
261 char *& import_objs );
305 void Print(std::ostream & os)
const;
310 const int & NumExportIDs,
311 const int * ExportPIDs);
315 const int * RemotePIDs);
321 template<
typename id_type>
323 const id_type *& import_ids,
324 const int *& import_procs,
326 id_type *& export_ids,
333 int Sort_ints_(
int *vals,
int *other,
int nvals );
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
Epetra_MpiComm: The Epetra MPI Communication Class.
MPI implementation of Epetra_Distributor.
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)
int MaxSendLength() const
Maximum number of values that this proc is sending to another single proc.
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.
Epetra_Distributor * Clone()
Clone method.
int Sort_ints_(int *vals, int *other, int nvals)
const Epetra_MpiComm * epComm_
Epetra_Distributor * ReverseClone()
Create and extract the reverse version of the distributor.
void Print(std::ostream &os) const
int ComputeRecvs_(int my_proc, int nprocs)
const int * ProcsFrom() const
A list of procs sending values to this proc.
const int * ProcsTo() const
A list of procs to which this proc is sending values.
virtual ~Epetra_MpiDistributor()
Destructor (declared virtual for memory safety).
int NumSends() const
The number of procs to which we will send data.
const int * LengthsTo() const
Number of values we're sending to each proc.
int DoReverseWaits()
Wait on a reverse set of posts.
void CreateReverseDistributor()
int CreateSendStructures_(int my_proc, int nprocs, const int &NumExportIDs, const int *ExportPIDs)
Epetra_MpiDistributor * comm_plan_reverse_
Epetra_MpiDistributor & operator=(const Epetra_MpiDistributor &src)
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 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.
int CreateFromSends(const int &NumExportIDs, const int *ExportPIDs, bool Deterministic, int &NumRemoteIDs)
Create a communication plan from send list.
int CreateRecvStructures_(const int &NumRemoteIDs, const int *RemotePIDs)
int TotalReceiveLength() const
Total number of values that this proc is receiving from other procs.
const int * LengthsFrom() const
Number of values we're receiving from each proc.
void GetLastDoStatistics(int &bytes_sent, int &bytes_recvd) const
Information on the last call to Do/DoReverse.
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.
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.
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)
int NumReceives() const
The number of procs from which we will receive data.
int DoWaits()
Wait on a set of posts.
Epetra_Object: The base Epetra class.