MPI implementation of Epetra_Distributor.
More...
#include <Epetra_MpiDistributor.h>
|
int | CreateSendStructures_ (int my_proc, int nprocs, const int &NumExportIDs, const int *ExportPIDs) |
|
int | CreateRecvStructures_ (const int &NumRemoteIDs, const int *RemotePIDs) |
|
int | ComputeRecvs_ (int my_proc, int nprocs) |
|
template<typename id_type > |
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 | Resize_ (int *sizes) |
|
int | Sort_ints_ (int *vals, int *other, int nvals) |
|
Epetra_MpiDistributor & | operator= (const Epetra_MpiDistributor &src) |
|
void | CreateReverseDistributor () |
|
|
int | CreateFromSends (const int &NumExportIDs, const int *ExportPIDs, bool Deterministic, int &NumRemoteIDs) |
| Create a communication plan from send list. More...
|
|
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. More...
|
|
int | CreateFromRecvs (const int &NumRemoteIDs, const long long *RemoteGIDs, const int *RemotePIDs, bool Deterministic, int &NumExportIDs, long long *&ExportGIDs, int *&ExportPIDs) |
|
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. More...
|
|
int | CreateFromSendsAndRecvs (const int &NumExportIDs, const int *ExportPIDs, const int &NumRemoteIDs, const long long *RemoteGIDs, const int *RemotePIDs, bool Deterministic) |
|
|
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. More...
|
|
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. More...
|
|
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) More...
|
|
int | DoWaits () |
| Wait on a set of posts. More...
|
|
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) More...
|
|
int | DoReverseWaits () |
| Wait on a reverse set of posts. More...
|
|
|
int | Do (char *export_objs, int obj_size, int *&sizes, int &len_import_objs, char *&import_objs) |
| Execute plan on buffer of export objects in a single step (object size may vary) More...
|
|
int | DoReverse (char *export_objs, int obj_size, int *&sizes, int &len_import_objs, char *&import_objs) |
| Execute reverse of plan on buffer of export objects in a single step (object size may vary) More...
|
|
int | DoPosts (char *export_objs, int obj_size, int *&sizes, int &len_import_objs, char *&import_objs) |
| Post buffer of export objects (can do other local work before executing Waits) More...
|
|
int | DoReversePosts (char *export_objs, int obj_size, int *&sizes, int &len_import_objs, char *&import_objs) |
| Do reverse post of buffer of export objects (can do other local work before executing Waits) More...
|
|
|
int | NumReceives () const |
| The number of procs from which we will receive data. More...
|
|
int | NumSends () const |
| The number of procs to which we will send data. More...
|
|
int | MaxSendLength () const |
| Maximum number of values that this proc is sending to another single proc. More...
|
|
int | TotalReceiveLength () const |
| Total number of values that this proc is receiving from other procs. More...
|
|
const int * | ProcsFrom () const |
| A list of procs sending values to this proc. More...
|
|
const int * | ProcsTo () const |
| A list of procs to which this proc is sending values. More...
|
|
const int * | LengthsFrom () const |
| Number of values we're receiving from each proc. More...
|
|
const int * | LengthsTo () const |
| Number of values we're sending to each proc. More...
|
|
void | GetLastDoStatistics (int &bytes_sent, int &bytes_recvd) const |
| Information on the last call to Do/DoReverse. More...
|
|
|
void | Print (std::ostream &os) const |
|
MPI implementation of Epetra_Distributor.
This class is an MPI implementation of Epetra_Distributor
. It encapsulates the general information and services needed for other Epetra classes to perform gather/scatter operations on a parallel computer. An Epetra_MpiDistributor instance is actually produced by calling a method in the Epetra_MpiComm class.
Definition at line 67 of file Epetra_MpiDistributor.h.
Epetra_MpiDistributor::Epetra_MpiDistributor |
( |
const Epetra_MpiComm & |
Comm | ) |
|
Epetra_MpiDistributor::~Epetra_MpiDistributor |
( |
| ) |
|
|
virtual |
Create and extract the reverse version of the distributor.
This is not a const method since a reverse distributor might need to be created. This works like Clone, returning a new object the user must deallocate.
Implements Epetra_Distributor.
Definition at line 1589 of file Epetra_MpiDistributor.cpp.
int Epetra_MpiDistributor::CreateFromSends |
( |
const int & |
NumExportIDs, |
|
|
const int * |
ExportPIDs, |
|
|
bool |
Deterministic, |
|
|
int & |
NumRemoteIDs |
|
) |
| |
|
virtual |
Create a communication plan from send list.
Given a list of process IDs to which to send the given number of data IDs, construct a communication plan for efficiently scattering data to these processes.
- Returns
- The number of data IDs being sent to me.
- Parameters
-
NumExportIDs | [in] Number of data IDs that need to be sent from the calling process. |
ExportPIDs | [in] List of process IDs that will get the exported data IDs. |
Deterministic | [in] Currently has no effect. |
NumRemoteIDs | [out] Number of data IDs the calling process will be receiving. |
Implements Epetra_Distributor.
Definition at line 221 of file Epetra_MpiDistributor.cpp.
int Epetra_MpiDistributor::CreateFromRecvs |
( |
const int & |
NumRemoteIDs, |
|
|
const int * |
RemoteGIDs, |
|
|
const int * |
RemotePIDs, |
|
|
bool |
Deterministic, |
|
|
int & |
NumExportIDs, |
|
|
int *& |
ExportGIDs, |
|
|
int *& |
ExportPIDs |
|
) |
| |
|
virtual |
Create a communication plan from receive list.
Given a list of remote data IDs and corresponding process IDs from which to receive data, construct a communication plan for efficiently scattering data to these processes.
- Returns
- The number and list of data IDs being sent by me.
- Parameters
-
NumRemoteIDs | [in] Number of data IDs the calling process will be receiving. |
RemoteGIDs | [in] List of data IDs that the calling process wants to receive. |
RemotePIDs | [in] List of IDs of the processes that will send the remote data IDs to the calling process. |
Deterministic | [in] Currently has no effect. |
NumExportIDs | [out] Number of data IDs that need to be sent from the calling process. |
ExportGIDs | [out] List of data IDs that the calling process will send out. |
ExportPIDs | [out] List of IDs of the processes that will receive the data IDs sent by the calling process. |
- Note
- This method allocates the output arrays using
new
. The caller is responsible for deallocating them after use.
Implements Epetra_Distributor.
Definition at line 252 of file Epetra_MpiDistributor.cpp.
int Epetra_MpiDistributor::CreateFromRecvs |
( |
const int & |
NumRemoteIDs, |
|
|
const long long * |
RemoteGIDs, |
|
|
const int * |
RemotePIDs, |
|
|
bool |
Deterministic, |
|
|
int & |
NumExportIDs, |
|
|
long long *& |
ExportGIDs, |
|
|
int *& |
ExportPIDs |
|
) |
| |
|
virtual |
int Epetra_MpiDistributor::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.
Given a list of process IDs to which to send the given number of data IDs, and a list of remote data IDs and corresponding process IDs from which to receive data, construct a communication plan for efficiently scattering data to these processes.
Needless to say, knowing both of these at the same time is a pretty rare occurance. But if it happens, this routine will avoid a lot of communication that CreateFromSends or CreateFromRecvs would have to do.
- Returns
- zero if this worked.
- Parameters
-
NumExportIDs | [in] Number of data IDs that need to be sent from the calling process. |
ExportPIDs | [in] List of process IDs that will get the exported data IDs. |
NumRemoteIDs | [in] Number of data IDs the calling process will be receiving. |
RemoteGIDs | [in] List of data IDs that the calling process wants to receive. |
RemotePIDs | [in] List of IDs of the processes that will send the remote data IDs to the calling process. |
Deterministic | [in] Currently has no effect. |
Definition at line 313 of file Epetra_MpiDistributor.cpp.
int Epetra_MpiDistributor::CreateFromSendsAndRecvs |
( |
const int & |
NumExportIDs, |
|
|
const int * |
ExportPIDs, |
|
|
const int & |
NumRemoteIDs, |
|
|
const long long * |
RemoteGIDs, |
|
|
const int * |
RemotePIDs, |
|
|
bool |
Deterministic |
|
) |
| |
int Epetra_MpiDistributor::Do |
( |
char * |
export_objs, |
|
|
int |
obj_size, |
|
|
int & |
len_import_objs, |
|
|
char *& |
import_objs |
|
) |
| |
|
virtual |
int Epetra_MpiDistributor::DoReverse |
( |
char * |
export_objs, |
|
|
int |
obj_size, |
|
|
int & |
len_import_objs, |
|
|
char *& |
import_objs |
|
) |
| |
|
virtual |
int Epetra_MpiDistributor::DoPosts |
( |
char * |
export_objs, |
|
|
int |
obj_size, |
|
|
int & |
len_import_objs, |
|
|
char *& |
import_objs |
|
) |
| |
|
virtual |
int Epetra_MpiDistributor::DoWaits |
( |
| ) |
|
|
virtual |
int Epetra_MpiDistributor::DoReversePosts |
( |
char * |
export_objs, |
|
|
int |
obj_size, |
|
|
int & |
len_import_objs, |
|
|
char *& |
import_objs |
|
) |
| |
|
virtual |
int Epetra_MpiDistributor::DoReverseWaits |
( |
| ) |
|
|
virtual |
int Epetra_MpiDistributor::Do |
( |
char * |
export_objs, |
|
|
int |
obj_size, |
|
|
int *& |
sizes, |
|
|
int & |
len_import_objs, |
|
|
char *& |
import_objs |
|
) |
| |
|
virtual |
int Epetra_MpiDistributor::DoReverse |
( |
char * |
export_objs, |
|
|
int |
obj_size, |
|
|
int *& |
sizes, |
|
|
int & |
len_import_objs, |
|
|
char *& |
import_objs |
|
) |
| |
|
virtual |
int Epetra_MpiDistributor::DoPosts |
( |
char * |
export_objs, |
|
|
int |
obj_size, |
|
|
int *& |
sizes, |
|
|
int & |
len_import_objs, |
|
|
char *& |
import_objs |
|
) |
| |
|
virtual |
int Epetra_MpiDistributor::DoReversePosts |
( |
char * |
export_objs, |
|
|
int |
obj_size, |
|
|
int *& |
sizes, |
|
|
int & |
len_import_objs, |
|
|
char *& |
import_objs |
|
) |
| |
|
virtual |
int Epetra_MpiDistributor::NumReceives |
( |
| ) |
const |
|
inline |
int Epetra_MpiDistributor::NumSends |
( |
| ) |
const |
|
inline |
int Epetra_MpiDistributor::MaxSendLength |
( |
| ) |
const |
|
inline |
Maximum number of values that this proc is sending to another single proc.
Definition at line 282 of file Epetra_MpiDistributor.h.
int Epetra_MpiDistributor::TotalReceiveLength |
( |
| ) |
const |
|
inline |
const int* Epetra_MpiDistributor::ProcsFrom |
( |
| ) |
const |
|
inline |
const int* Epetra_MpiDistributor::ProcsTo |
( |
| ) |
const |
|
inline |
const int* Epetra_MpiDistributor::LengthsFrom |
( |
| ) |
const |
|
inline |
Number of values we're receiving from each proc.
We will receive LengthsFrom[i]
values from proc ProcsFrom[i]
.
Definition at line 295 of file Epetra_MpiDistributor.h.
const int* Epetra_MpiDistributor::LengthsTo |
( |
| ) |
const |
|
inline |
Number of values we're sending to each proc.
We will send LengthsTo[i]
values to procs ProcsTo[i]
.
Definition at line 299 of file Epetra_MpiDistributor.h.
void Epetra_MpiDistributor::GetLastDoStatistics |
( |
int & |
bytes_sent, |
|
|
int & |
bytes_recvd |
|
) |
| const |
|
inline |
Information on the last call to Do/DoReverse.
Returns the amount of data sent & recv'd on this processor in bytes
Definition at line 304 of file Epetra_MpiDistributor.h.
void Epetra_MpiDistributor::Print |
( |
std::ostream & |
os | ) |
const |
|
virtual |
int Epetra_MpiDistributor::CreateSendStructures_ |
( |
int |
my_proc, |
|
|
int |
nprocs, |
|
|
const int & |
NumExportIDs, |
|
|
const int * |
ExportPIDs |
|
) |
| |
|
private |
int Epetra_MpiDistributor::CreateRecvStructures_ |
( |
const int & |
NumRemoteIDs, |
|
|
const int * |
RemotePIDs |
|
) |
| |
|
private |
int Epetra_MpiDistributor::ComputeRecvs_ |
( |
int |
my_proc, |
|
|
int |
nprocs |
|
) |
| |
|
private |
template<typename id_type >
int Epetra_MpiDistributor::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 |
|
) |
| |
|
private |
int Epetra_MpiDistributor::Resize_ |
( |
int * |
sizes | ) |
|
|
private |
int Epetra_MpiDistributor::Sort_ints_ |
( |
int * |
vals, |
|
|
int * |
other, |
|
|
int |
nvals |
|
) |
| |
|
private |
void Epetra_MpiDistributor::CreateReverseDistributor |
( |
| ) |
|
|
private |
int* Epetra_MpiDistributor::lengths_to_ |
|
private |
int* Epetra_MpiDistributor::procs_to_ |
|
private |
int* Epetra_MpiDistributor::indices_to_ |
|
private |
int Epetra_MpiDistributor::size_indices_to_ |
|
private |
int* Epetra_MpiDistributor::lengths_from_ |
|
private |
int* Epetra_MpiDistributor::procs_from_ |
|
private |
int* Epetra_MpiDistributor::indices_from_ |
|
private |
int Epetra_MpiDistributor::size_indices_from_ |
|
private |
bool Epetra_MpiDistributor::resized_ |
|
private |
int* Epetra_MpiDistributor::sizes_ |
|
private |
int* Epetra_MpiDistributor::sizes_to_ |
|
private |
int* Epetra_MpiDistributor::starts_to_ |
|
private |
int* Epetra_MpiDistributor::starts_to_ptr_ |
|
private |
int* Epetra_MpiDistributor::indices_to_ptr_ |
|
private |
int* Epetra_MpiDistributor::sizes_from_ |
|
private |
int* Epetra_MpiDistributor::starts_from_ |
|
private |
int* Epetra_MpiDistributor::starts_from_ptr_ |
|
private |
int* Epetra_MpiDistributor::indices_from_ptr_ |
|
private |
int Epetra_MpiDistributor::nrecvs_ |
|
private |
int Epetra_MpiDistributor::nsends_ |
|
private |
int Epetra_MpiDistributor::nexports_ |
|
private |
int Epetra_MpiDistributor::self_msg_ |
|
private |
int Epetra_MpiDistributor::max_send_length_ |
|
private |
int Epetra_MpiDistributor::total_recv_length_ |
|
private |
int Epetra_MpiDistributor::tag_ |
|
private |
const MPI_Comm Epetra_MpiDistributor::comm_ |
|
private |
MPI_Request* Epetra_MpiDistributor::request_ |
|
private |
MPI_Status* Epetra_MpiDistributor::status_ |
|
private |
bool Epetra_MpiDistributor::no_delete_ |
|
private |
char* Epetra_MpiDistributor::send_array_ |
|
private |
int Epetra_MpiDistributor::send_array_size_ |
|
private |
int Epetra_MpiDistributor::lastRoundBytesSend_ |
|
private |
int Epetra_MpiDistributor::lastRoundBytesRecv_ |
|
private |
The documentation for this class was generated from the following files: