Epetra_MpiDistributor Class Reference

Epetra_MpiDistributor: The Epetra MPI implementation of the Epetra_Distributor Gather/Scatter Setup Class. More...

#include <Epetra_MpiDistributor.h>

Inheritance diagram for Epetra_MpiDistributor:

Inheritance graph
[legend]
List of all members.

Constructors/Destructor

 Epetra_MpiDistributor (const Epetra_MpiComm &Comm)
 Epetra_Comm Default Constructor.
 Epetra_MpiDistributor (const Epetra_MpiDistributor &Distributor)
 Epetra_Comm Copy Constructor.
Epetra_DistributorClone ()
 Clone method.
virtual ~Epetra_MpiDistributor ()
 Epetra_Comm Destructor.

Gather/Scatter Constructors

int CreateFromSends (const int &NumExportIDs, const int *ExportPIDs, bool Deterministic, int &NumRemoteIDs)
 Create Distributor object using list of process IDs to which we export.
int CreateFromRecvs (const int &NumRemoteIDs, const int *RemoteGIDs, const int *RemotePIDs, bool Deterministic, int &NumExportIDs, int *&ExportGIDs, int *&ExportPIDs)
 Create Distributor object using list of Remote global IDs and corresponding PIDs.

Execute Gather/Scatter Operations

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 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 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 DoWaits ()
 Wait on a set of posts.
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 DoReverseWaits ()
 Wait on a reverse set of posts.

Execute Gather/Scatter Operations (Non-constant size objects)

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).
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).
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).
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).

Print object to an output stream

void Print (ostream &os) const

Private Member Functions

int ComputeRecvs_ (int my_proc, int nprocs)
int ComputeSends_ (int num_imports, const int *&import_ids, const int *&import_procs, int &num_exports, int *&export_ids, int *&export_procs, int my_proc)
int Resize_ (int *sizes)
int Sort_ints_ (int *vals, int *other, int nvals)
Epetra_MpiDistributoroperator= (const Epetra_MpiDistributor &src)

Private Attributes

int * lengths_to_
int * procs_to_
int * indices_to_
int size_indices_to_
int * lengths_from_
int * procs_from_
int * indices_from_
int size_indices_from_
bool resized_
int * sizes_
int * sizes_to_
int * starts_to_
int * starts_to_ptr_
int * indices_to_ptr_
int * sizes_from_
int * starts_from_
int * starts_from_ptr_
int * indices_from_ptr_
int nrecvs_
int nsends_
int nexports_
int self_msg_
int max_send_length_
int total_recv_length_
int tag_
const Epetra_MpiCommepComm_
const MPI_Comm comm_
MPI_Request * request_
MPI_Status * status_
bool no_delete_
char * send_array_
int send_array_size_
Epetra_MpiDistributorcomm_plan_reverse_

Detailed Description

Epetra_MpiDistributor: The Epetra MPI implementation of the Epetra_Distributor Gather/Scatter Setup Class.

The Epetra_MpiDistributor class is an MPI implement of Epetra_Distributor that encapsulates the general information and services needed for other Epetra classes to perform gather/scatter operations on a parallel computer. An Epetra_MpiDistributor object is actually produced by calling a method in the Epetra_MpiComm class.

Definition at line 46 of file Epetra_MpiDistributor.h.


Constructor & Destructor Documentation

Epetra_MpiDistributor::Epetra_MpiDistributor ( const Epetra_MpiComm Comm  ) 

Epetra_Comm Default Constructor.

Definition at line 35 of file Epetra_MpiDistributor.cpp.

Epetra_MpiDistributor::Epetra_MpiDistributor ( const Epetra_MpiDistributor Distributor  ) 

Epetra_Comm Copy Constructor.

Definition at line 74 of file Epetra_MpiDistributor.cpp.

Epetra_MpiDistributor::~Epetra_MpiDistributor (  )  [virtual]

Epetra_Comm Destructor.

Definition at line 146 of file Epetra_MpiDistributor.cpp.


Member Function Documentation

Epetra_Distributor* Epetra_MpiDistributor::Clone (  )  [inline, virtual]

Clone method.

Implements Epetra_Distributor.

Definition at line 60 of file Epetra_MpiDistributor.h.

int Epetra_MpiDistributor::CreateFromSends ( const int &  NumExportIDs,
const int *  ExportPIDs,
bool  Deterministic,
int &  NumRemoteIDs 
) [virtual]

Create Distributor object using list of process IDs to which we export.

Take a list of Process IDs and construct a plan for efficiently scattering to these processes. Return the number of IDs being sent to me.

Parameters:
NumExportIDs In Number of IDs that need to be sent from this processor.
ExportPIDs In List of processors that will get the exported IDs.
Deterministic In No Op.
NumRemoteIDs Out Number of IDs this processor will be receiving.

Implements Epetra_Distributor.

Definition at line 182 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 Distributor object using list of Remote global IDs and corresponding PIDs.

Take a list of global IDs and construct a plan for efficiently scattering to these processes. Return the number and list of IDs being sent by me.

Parameters:
NumRemoteIDs In Number of IDs this processor will be receiving.
RemoteGIDs In List of IDs that this processor wants.
RemotePIDs In List of processors that will send the remote IDs.
Deterministic In No Op.
NumExportIDs Out Number of IDs that need to be sent from this processor.
ExportGIDs Out List of processors that will get the exported IDs.
ExportPIDs Out List of processors that will get the exported IDs.

Implements Epetra_Distributor.

Definition at line 340 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::Do ( char *  export_objs,
int  obj_size,
int &  len_import_objs,
char *&  import_objs 
) [virtual]

Execute plan on buffer of export objects in a single step.

Implements Epetra_Distributor.

Definition at line 558 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::DoReverse ( char *  export_objs,
int  obj_size,
int &  len_import_objs,
char *&  import_objs 
) [virtual]

Execute reverse of plan on buffer of export objects in a single step.

Implements Epetra_Distributor.

Definition at line 570 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::DoPosts ( char *  export_objs,
int  obj_size,
int &  len_import_objs,
char *&  import_objs 
) [virtual]

Post buffer of export objects (can do other local work before executing Waits).

Implements Epetra_Distributor.

Definition at line 584 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::DoWaits (  )  [virtual]

Wait on a set of posts.

Implements Epetra_Distributor.

Definition at line 716 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::DoReversePosts ( char *  export_objs,
int  obj_size,
int &  len_import_objs,
char *&  import_objs 
) [virtual]

Do reverse post of buffer of export objects (can do other local work before executing Waits).

Implements Epetra_Distributor.

Definition at line 727 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::DoReverseWaits (  )  [virtual]

Wait on a reverse set of posts.

Implements Epetra_Distributor.

Definition at line 786 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::Do ( char *  export_objs,
int  obj_size,
int *&  sizes,
int &  len_import_objs,
char *&  import_objs 
) [virtual]

Execute plan on buffer of export objects in a single step (object size may vary).

Implements Epetra_Distributor.

Definition at line 986 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::DoReverse ( char *  export_objs,
int  obj_size,
int *&  sizes,
int &  len_import_objs,
char *&  import_objs 
) [virtual]

Execute reverse of plan on buffer of export objects in a single step (object size may vary).

Implements Epetra_Distributor.

Definition at line 1001 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::DoPosts ( char *  export_objs,
int  obj_size,
int *&  sizes,
int &  len_import_objs,
char *&  import_objs 
) [virtual]

Post buffer of export objects (can do other local work before executing Waits).

Implements Epetra_Distributor.

Definition at line 1017 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::DoReversePosts ( char *  export_objs,
int  obj_size,
int *&  sizes,
int &  len_import_objs,
char *&  import_objs 
) [virtual]

Do reverse post of buffer of export objects (can do other local work before executing Waits).

Implements Epetra_Distributor.

Definition at line 1156 of file Epetra_MpiDistributor.cpp.

void Epetra_MpiDistributor::Print ( ostream &  os  )  const [virtual]

Implements Epetra_Distributor.

Definition at line 1213 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::ComputeRecvs_ ( int  my_proc,
int  nprocs 
) [private]

Definition at line 368 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::ComputeSends_ ( int  num_imports,
const int *&  import_ids,
const int *&  import_procs,
int &  num_exports,
int *&  export_ids,
int *&  export_procs,
int  my_proc 
) [private]

Definition at line 493 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::Resize_ ( int *  sizes  )  [private]

Definition at line 799 of file Epetra_MpiDistributor.cpp.

int Epetra_MpiDistributor::Sort_ints_ ( int *  vals,
int *  other,
int  nvals 
) [private]

Definition at line 1265 of file Epetra_MpiDistributor.cpp.

Epetra_MpiDistributor & Epetra_MpiDistributor::operator= ( const Epetra_MpiDistributor src  )  [private]

Definition at line 1320 of file Epetra_MpiDistributor.cpp.


Member Data Documentation

int* Epetra_MpiDistributor::lengths_to_ [private]

Definition at line 203 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::procs_to_ [private]

Definition at line 204 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::indices_to_ [private]

Definition at line 205 of file Epetra_MpiDistributor.h.

int Epetra_MpiDistributor::size_indices_to_ [private]

Definition at line 206 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::lengths_from_ [private]

Definition at line 208 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::procs_from_ [private]

Definition at line 209 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::indices_from_ [private]

Definition at line 210 of file Epetra_MpiDistributor.h.

int Epetra_MpiDistributor::size_indices_from_ [private]

Definition at line 211 of file Epetra_MpiDistributor.h.

bool Epetra_MpiDistributor::resized_ [private]

Definition at line 213 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::sizes_ [private]

Definition at line 214 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::sizes_to_ [private]

Definition at line 216 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::starts_to_ [private]

Definition at line 217 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::starts_to_ptr_ [private]

Definition at line 218 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::indices_to_ptr_ [private]

Definition at line 219 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::sizes_from_ [private]

Definition at line 221 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::starts_from_ [private]

Definition at line 222 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::starts_from_ptr_ [private]

Definition at line 223 of file Epetra_MpiDistributor.h.

int* Epetra_MpiDistributor::indices_from_ptr_ [private]

Definition at line 224 of file Epetra_MpiDistributor.h.

int Epetra_MpiDistributor::nrecvs_ [private]

Definition at line 226 of file Epetra_MpiDistributor.h.

int Epetra_MpiDistributor::nsends_ [private]

Definition at line 227 of file Epetra_MpiDistributor.h.

int Epetra_MpiDistributor::nexports_ [private]

Definition at line 228 of file Epetra_MpiDistributor.h.

int Epetra_MpiDistributor::self_msg_ [private]

Definition at line 230 of file Epetra_MpiDistributor.h.

int Epetra_MpiDistributor::max_send_length_ [private]

Definition at line 232 of file Epetra_MpiDistributor.h.

int Epetra_MpiDistributor::total_recv_length_ [private]

Definition at line 233 of file Epetra_MpiDistributor.h.

int Epetra_MpiDistributor::tag_ [private]

Definition at line 235 of file Epetra_MpiDistributor.h.

const Epetra_MpiComm* Epetra_MpiDistributor::epComm_ [private]

Definition at line 237 of file Epetra_MpiDistributor.h.

const MPI_Comm Epetra_MpiDistributor::comm_ [private]

Definition at line 238 of file Epetra_MpiDistributor.h.

MPI_Request* Epetra_MpiDistributor::request_ [private]

Definition at line 240 of file Epetra_MpiDistributor.h.

MPI_Status* Epetra_MpiDistributor::status_ [private]

Definition at line 241 of file Epetra_MpiDistributor.h.

bool Epetra_MpiDistributor::no_delete_ [private]

Definition at line 243 of file Epetra_MpiDistributor.h.

char* Epetra_MpiDistributor::send_array_ [private]

Definition at line 245 of file Epetra_MpiDistributor.h.

int Epetra_MpiDistributor::send_array_size_ [private]

Definition at line 246 of file Epetra_MpiDistributor.h.

Epetra_MpiDistributor* Epetra_MpiDistributor::comm_plan_reverse_ [private]

Definition at line 248 of file Epetra_MpiDistributor.h.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:41:08 2010 for Epetra Package Browser (Single Doxygen Collection) by  doxygen 1.4.7