31 #ifndef _PANE_COMMUNICATOR_H
32 #define _PANE_COMMUNICATOR_H
89 const int *sizes=NULL,
const int *strds=NULL);
94 void init( COM::Attribute *att,
const COM::Attribute *my_pconn = NULL);
182 const int* ptr,
int& index,
const int n_items,
const int lpid);
190 std::vector<std::vector<bool> > *involved=NULL);
void begin_update_shared_nodes(std::vector< std::vector< bool > > *involved=NULL)
Initiates updating shared nodes by calling MPI_Isend and MPI_Irecv.
void update_ghost_values()
std::vector< void * > _ptrs
An array of pointers to the data for all local panes.
#define MAP_END_NAMESPACE
int COM_Type
Indices for derived data types.
std::vector< int > _sizes
The sizes of the arrays for all local panes.
#define COM_assertion(EX)
Error checking utility similar to the assert macro of the C language.
void end_update_ghost_nodes()
Finalizes ghost node updating by calling MPI_Waitall on all send requests.
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_COMM_WORLD
std::map< int, int > _lpaneid_map
Mapping from user-defined pane ids to internal IDs, which are unique and contiguous across all proces...
std::vector< std::vector< Pane_comm_buffers > > _gnr_buffs
Buffer for ghost nodes to receive.
void reduce_on_shared_nodes(MPI_Op)
Perform a reduction operation using locally cached values of the shared nodes, assuming begin_update_...
Buffers for outgoing and incoming messages of a specific pane to be communicated with another pane (e...
void reduce_average_on_shared_nodes()
Reduce to the average of values using locally cached values of the shared nodes, assuming begin_updat...
Pane_communicator(COM::Window *w, MPI_Comm c=MPI_COMM_WORLD)
Constructor from a communicator.
void reduce_diff_on_shared_nodes()
Compute difference of non-zero values of each shared node, assuming there are at most two non-zero va...
std::vector< int > _strds
The strides of the arrays for all local panes.
int owner_rank(const int pane_id) const
Obtain the process rank of a given pane.
void end_update()
Finalizes updating by calling MPI_Waitall on all send requests.
std::vector< std::vector< Pane_comm_buffers > > _rns_buffs
Buffer for real nodes to send.
void init_pane_comm_buffers(std::vector< Pane_comm_buffers > &pcb, const int *ptr, int &index, const int n_items, const int lpid)
Initialize a Pane_comm_buffers for ghost information.
Pane_communicator & operator=(const Pane_communicator &)
MPI_Comm mpi_comm() const
Obtain the MPI communicator for the object.
int total_npanes() const
Obtain the total number of panes on all processes.
std::vector< std::vector< Pane_comm_buffers > > _rcs_buffs
Buffer for real cells to send.
std::vector< std::vector< Pane_comm_buffers > > _shr_buffs
Shared node pane communication buffers.
std::vector< MPI_Request > _reqs_recv
std::vector< std::pair< int, int > > _reqs_indices
The indices in buffs for each pending nonblocking receive request.
std::vector< char > inbuf
void end_update_shared_nodes()
Finalizes shared node updating by calling MPI_Waitall on all send requests.
Contains declarations of MPI subroutines used in Roccom.
This file contains a set of routines for error assertion.
std::vector< COM::Pane * > & panes()
Obtains all the local panes.
std::vector< std::vector< Pane_comm_buffers > > _gcr_buffs
Buffer for ghost cells to receive.
std::vector< char > outbuf
std::vector< MPI_Request > _reqs_send
Arrays of pending nonblocking MPI requests. Same format as _shr_buffs.
Encapsulates information about distribution of panes on all processes and handles across pane communi...
int lpaneid(const int pane_id) const
For a given pane, obtain an internal pane ID which is unique and contiguous across processes...
int _type
The base data type, number of components, and the number of bytes of all components for the data to b...
void begin_update_ghost_nodes()
Initiates updating ghost nodes by calling MPI_Isend and MPI_Irecv.
void reduce_maxabs_on_shared_nodes()
Reduce to the value with the maximum absolute value using locally cached values of shared nodes...
void init(void **ptrs, COM_Type type, int ncomp, const int *sizes=NULL, const int *strds=NULL)
Initialize the communication buffers.
int _my_pconn_id
The id of the pconn being used.
#define MAP_BEGIN_NAMESPACE
const MPI_Comm _comm
MPI Communicator.
void begin_update(const Buff_type btype, std::vector< std::vector< bool > > *involved=NULL)
Initiates updating by calling MPI_Isend and MPI_Irecv.
void reduce_minabs_on_shared_nodes()
Reduce to the value with the maximum absolute value using locally cached values of shared nodes...
void begin_update_ghost_cells()
Initiates updating ghost nodes by calling MPI_Isend and MPI_Irecv.
void end_update_ghost_cells()
Finalizes ghost cell updating by calling MPI_Waitall on all send requests.
int _total_npanes
The total number of panes on all processes.
std::vector< COM::Pane * > _panes
Vector of all local panes.
COM::Window * _appl_window
Reference to the application window.