Parallel communications in MOAB. More...
#include <ParallelComm.hpp>
Classes | |
class | Buffer |
struct | SharedEntityData |
Public Member Functions | |
ParallelComm (Interface *impl, MPI_Comm comm, int *pcomm_id_out=0) | |
constructor More... | |
ParallelComm (Interface *impl, std::vector< unsigned char > &tmp_buff, MPI_Comm comm, int *pcomm_id_out=0) | |
constructor taking packed buffer, for testing More... | |
int | get_id () const |
Get ID used to reference this PCOMM instance. More... | |
~ParallelComm () | |
destructor More... | |
ErrorCode | assign_global_ids (EntityHandle this_set, const int dimension, const int start_id=1, const bool largest_dim_only=true, const bool parallel=true, const bool owned_only=false) |
assign a global id space, for largest-dimension or all entities (and in either case for vertices too) More... | |
ErrorCode | assign_global_ids (Range entities[], const int dimension, const int start_id, const bool parallel, const bool owned_only) |
assign a global id space, for largest-dimension or all entities (and in either case for vertices too) More... | |
ErrorCode | check_global_ids (EntityHandle this_set, const int dimension, const int start_id=1, const bool largest_dim_only=true, const bool parallel=true, const bool owned_only=false) |
check for global ids; based only on tag handle being there or not; if it's not there, create them for the specified dimensions More... | |
ErrorCode | send_entities (const int to_proc, Range &orig_ents, const bool adjs, const bool tags, const bool store_remote_handles, const bool is_iface, Range &final_ents, int &incoming1, int &incoming2, TupleList &entprocs, std::vector< MPI_Request > &recv_remoteh_reqs, bool wait_all=true) |
send entities to another processor, optionally waiting until it's done More... | |
ErrorCode | send_entities (std::vector< unsigned int > &send_procs, std::vector< Range * > &send_ents, int &incoming1, int &incoming2, const bool store_remote_handles) |
ErrorCode | recv_entities (const int from_proc, const bool store_remote_handles, const bool is_iface, Range &final_ents, int &incomming1, int &incoming2, std::vector< std::vector< EntityHandle > > &L1hloc, std::vector< std::vector< EntityHandle > > &L1hrem, std::vector< std::vector< int > > &L1p, std::vector< EntityHandle > &L2hloc, std::vector< EntityHandle > &L2hrem, std::vector< unsigned int > &L2p, std::vector< MPI_Request > &recv_remoteh_reqs, bool wait_all=true) |
Receive entities from another processor, optionally waiting until it's done. More... | |
ErrorCode | recv_entities (std::set< unsigned int > &recv_procs, int incoming1, int incoming2, const bool store_remote_handles, const bool migrate=false) |
ErrorCode | recv_messages (const int from_proc, const bool store_remote_handles, const bool is_iface, Range &final_ents, int &incoming1, int &incoming2, std::vector< std::vector< EntityHandle > > &L1hloc, std::vector< std::vector< EntityHandle > > &L1hrem, std::vector< std::vector< int > > &L1p, std::vector< EntityHandle > &L2hloc, std::vector< EntityHandle > &L2hrem, std::vector< unsigned int > &L2p, std::vector< MPI_Request > &recv_remoteh_reqs) |
Receive messages from another processor in while loop. More... | |
ErrorCode | recv_remote_handle_messages (const int from_proc, int &incoming2, std::vector< EntityHandle > &L2hloc, std::vector< EntityHandle > &L2hrem, std::vector< unsigned int > &L2p, std::vector< MPI_Request > &recv_remoteh_reqs) |
ErrorCode | exchange_ghost_cells (int ghost_dim, int bridge_dim, int num_layers, int addl_ents, bool store_remote_handles, bool wait_all=true, EntityHandle *file_set=NULL) |
Exchange ghost cells with neighboring procs Neighboring processors are those sharing an interface with this processor. All entities of dimension ghost_dim within num_layers of interface, measured going through bridge_dim, are exchanged. See MeshTopoUtil::get_bridge_adjacencies for description of bridge adjacencies. If wait_all is false and store_remote_handles is true, MPI_Request objects are available in the sendReqs[2*MAX_SHARING_PROCS] member array, with inactive requests marked as MPI_REQUEST_NULL. If store_remote_handles or wait_all is false, this function returns after all entities have been received and processed. More... | |
ErrorCode | post_irecv (std::vector< unsigned int > &exchange_procs) |
Post "MPI_Irecv" before meshing. More... | |
ErrorCode | post_irecv (std::vector< unsigned int > &shared_procs, std::set< unsigned int > &recv_procs) |
ErrorCode | exchange_owned_meshs (std::vector< unsigned int > &exchange_procs, std::vector< Range * > &exchange_ents, std::vector< MPI_Request > &recv_ent_reqs, std::vector< MPI_Request > &recv_remoteh_reqs, bool store_remote_handles, bool wait_all=true, bool migrate=false, int dim=0) |
Exchange owned mesh for input mesh entities and sets This function should be called collectively over the communicator for this ParallelComm. If this version is called, all shared exchanged entities should have a value for this tag (or the tag should have a default value). More... | |
ErrorCode | exchange_owned_mesh (std::vector< unsigned int > &exchange_procs, std::vector< Range * > &exchange_ents, std::vector< MPI_Request > &recv_ent_reqs, std::vector< MPI_Request > &recv_remoteh_reqs, const bool recv_posted, bool store_remote_handles, bool wait_all, bool migrate=false) |
Exchange owned mesh for input mesh entities and sets This function is called twice by exchange_owned_meshs to exchange entities before sets. More... | |
ErrorCode | exchange_tags (const std::vector< Tag > &src_tags, const std::vector< Tag > &dst_tags, const Range &entities) |
Exchange tags for all shared and ghosted entities This function should be called collectively over the communicator for this ParallelComm. If this version is called, all ghosted/shared entities should have a value for this tag (or the tag should have a default value). If the entities vector is empty, all shared entities participate in the exchange. If a proc has no owned entities this function must still be called since it is collective. More... | |
ErrorCode | exchange_tags (const char *tag_name, const Range &entities) |
Exchange tags for all shared and ghosted entities This function should be called collectively over the communicator for this ParallelComm. If the entities vector is empty, all shared entities participate in the exchange. If a proc has no owned entities this function must still be called since it is collective. More... | |
ErrorCode | exchange_tags (Tag tagh, const Range &entities) |
Exchange tags for all shared and ghosted entities This function should be called collectively over the communicator for this ParallelComm. If the entities vector is empty, all shared entities participate in the exchange. If a proc has no owned entities this function must still be called since it is collective. More... | |
ErrorCode | reduce_tags (const std::vector< Tag > &src_tags, const std::vector< Tag > &dst_tags, const MPI_Op mpi_op, const Range &entities) |
Perform data reduction operation for all shared and ghosted entities This function should be called collectively over the communicator for this ParallelComm. If this version is called, all ghosted/shared entities should have a value for this tag (or the tag should have a default value). Operation is any MPI_Op, with result stored in destination tag. More... | |
ErrorCode | reduce_tags (const char *tag_name, const MPI_Op mpi_op, const Range &entities) |
Perform data reduction operation for all shared and ghosted entities Same as std::vector variant except for one tag specified by name. More... | |
ErrorCode | reduce_tags (Tag tag_handle, const MPI_Op mpi_op, const Range &entities) |
Perform data reduction operation for all shared and ghosted entities Same as std::vector variant except for one tag specified by handle. More... | |
ErrorCode | broadcast_entities (const int from_proc, Range &entities, const bool adjacencies=false, const bool tags=true) |
Broadcast all entities resident on from_proc to other processors This function assumes remote handles are not being stored, since (usually) every processor will know about the whole mesh. More... | |
ErrorCode | scatter_entities (const int from_proc, std::vector< Range > &entities, const bool adjacencies=false, const bool tags=true) |
Scatter entities on from_proc to other processors This function assumes remote handles are not being stored, since (usually) every processor will know about the whole mesh. More... | |
ErrorCode | send_recv_entities (std::vector< int > &send_procs, std::vector< std::vector< int > > &msgsizes, std::vector< std::vector< EntityHandle > > &senddata, std::vector< std::vector< EntityHandle > > &recvdata) |
Send and receives data from a set of processors. More... | |
ErrorCode | update_remote_data (EntityHandle entity, std::vector< int > &procs, std::vector< EntityHandle > &handles) |
ErrorCode | get_remote_handles (EntityHandle *local_vec, EntityHandle *rem_vec, int num_ents, int to_proc) |
ErrorCode | resolve_shared_ents (EntityHandle this_set, Range &proc_ents, int resolve_dim=-1, int shared_dim=-1, Range *skin_ents=NULL, const Tag *id_tag=0) |
Resolve shared entities between processors. More... | |
ErrorCode | resolve_shared_ents (EntityHandle this_set, int resolve_dim=3, int shared_dim=-1, const Tag *id_tag=0) |
Resolve shared entities between processors. More... | |
ErrorCode | resolve_shared_sets (EntityHandle this_set, const Tag *id_tag=0) |
ErrorCode | resolve_shared_sets (Range &candidate_sets, Tag id_tag) |
ErrorCode | augment_default_sets_with_ghosts (EntityHandle file_set) |
ErrorCode | get_pstatus (EntityHandle entity, unsigned char &pstatus_val) |
Get parallel status of an entity Returns the parallel status of an entity. More... | |
ErrorCode | get_pstatus_entities (int dim, unsigned char pstatus_val, Range &pstatus_ents) |
Get entities with the given pstatus bit(s) set Returns any entities whose pstatus tag value v satisfies (v & pstatus_val) More... | |
ErrorCode | get_owner (EntityHandle entity, int &owner) |
Return the rank of the entity owner. More... | |
ErrorCode | get_owner_handle (EntityHandle entity, int &owner, EntityHandle &handle) |
Return the owner processor and handle of a given entity. More... | |
ErrorCode | get_sharing_data (const EntityHandle entity, int *ps, EntityHandle *hs, unsigned char &pstat, unsigned int &num_ps) |
Get the shared processors/handles for an entity Get the shared processors/handles for an entity. Arrays must be large enough to receive data for all sharing procs. Does not include this proc if only shared with one other proc. More... | |
ErrorCode | get_sharing_data (const EntityHandle entity, int *ps, EntityHandle *hs, unsigned char &pstat, int &num_ps) |
Get the shared processors/handles for an entity Same as other version but with int num_ps. More... | |
ErrorCode | get_sharing_data (const EntityHandle *entities, int num_entities, std::set< int > &procs, int op=Interface::INTERSECT) |
Get the intersection or union of all sharing processors Get the intersection or union of all sharing processors. Processor set is cleared as part of this function. More... | |
ErrorCode | get_sharing_data (const Range &entities, std::set< int > &procs, int op=Interface::INTERSECT) |
Get the intersection or union of all sharing processors Same as previous variant but with range as input. More... | |
ErrorCode | get_shared_entities (int other_proc, Range &shared_ents, int dim=-1, const bool iface=false, const bool owned_filter=false) |
Get shared entities of specified dimension If other_proc is -1, any shared entities are returned. If dim is -1, entities of all dimensions on interface are returned. More... | |
ErrorCode | get_interface_procs (std::set< unsigned int > &iface_procs, const bool get_buffs=false) |
get processors with which this processor shares an interface More... | |
ErrorCode | get_comm_procs (std::set< unsigned int > &procs) |
get processors with which this processor communicates More... | |
ErrorCode | get_entityset_procs (EntityHandle entity_set, std::vector< unsigned > &ranks) const |
Get array of process IDs sharing a set. Returns zero and passes back NULL if set is not shared. More... | |
ErrorCode | get_entityset_owner (EntityHandle entity_set, unsigned &owner_rank, EntityHandle *remote_handle=0) const |
Get rank of the owner of a shared set. Returns this proc if set is not shared. Optionally returns handle on owning process for shared set. More... | |
ErrorCode | get_entityset_local_handle (unsigned owning_rank, EntityHandle remote_handle, EntityHandle &local_handle) const |
Given set owner and handle on owner, find local set handle. More... | |
ErrorCode | get_shared_sets (Range &result) const |
Get all shared sets. More... | |
ErrorCode | get_entityset_owners (std::vector< unsigned > &ranks) const |
Get ranks of all processes that own at least one set that is shared with this process. Will include the rank of this process if this process owns any shared set. More... | |
ErrorCode | get_owned_sets (unsigned owning_rank, Range &sets_out) const |
Get shared sets owned by process with specified rank. More... | |
const ProcConfig & | proc_config () const |
Get proc config for this communication object. More... | |
ProcConfig & | proc_config () |
Get proc config for this communication object. More... | |
unsigned | rank () const |
unsigned | size () const |
MPI_Comm | comm () const |
ErrorCode | get_shared_proc_tags (Tag &sharedp_tag, Tag &sharedps_tag, Tag &sharedh_tag, Tag &sharedhs_tag, Tag &pstatus_tag) |
return the tags used to indicate shared procs and handles More... | |
Range & | partition_sets () |
return partition, interface set ranges More... | |
const Range & | partition_sets () const |
Range & | interface_sets () |
const Range & | interface_sets () const |
Tag | sharedp_tag () |
return sharedp tag More... | |
Tag | sharedps_tag () |
return sharedps tag More... | |
Tag | sharedh_tag () |
return sharedh tag More... | |
Tag | sharedhs_tag () |
return sharedhs tag More... | |
Tag | pstatus_tag () |
return pstatus tag More... | |
Tag | partition_tag () |
return partitions set tag More... | |
Tag | part_tag () |
void | print_pstatus (unsigned char pstat, std::string &ostr) |
print contents of pstatus value in human-readable form More... | |
void | print_pstatus (unsigned char pstat) |
print contents of pstatus value in human-readable form to std::cut More... | |
ErrorCode | get_part_entities (Range &ents, int dim=-1) |
return all the entities in parts owned locally More... | |
EntityHandle | get_partitioning () const |
ErrorCode | set_partitioning (EntityHandle h) |
ErrorCode | get_global_part_count (int &count_out) const |
ErrorCode | get_part_owner (int part_id, int &owner_out) const |
ErrorCode | get_part_id (EntityHandle part, int &id_out) const |
ErrorCode | get_part_handle (int id, EntityHandle &handle_out) const |
ErrorCode | create_part (EntityHandle &part_out) |
ErrorCode | destroy_part (EntityHandle part) |
ErrorCode | collective_sync_partition () |
ErrorCode | get_part_neighbor_ids (EntityHandle part, int neighbors_out[MAX_SHARING_PROCS], int &num_neighbors_out) |
ErrorCode | get_interface_sets (EntityHandle part, Range &iface_sets_out, int *adj_part_id=0) |
ErrorCode | get_owning_part (EntityHandle entity, int &owning_part_id_out, EntityHandle *owning_handle=0) |
ErrorCode | get_sharing_parts (EntityHandle entity, int part_ids_out[MAX_SHARING_PROCS], int &num_part_ids_out, EntityHandle remote_handles[MAX_SHARING_PROCS]=0) |
ErrorCode | filter_pstatus (Range &ents, const unsigned char pstatus_val, const unsigned char op, int to_proc=-1, Range *returned_ents=NULL) |
ErrorCode | get_iface_entities (int other_proc, int dim, Range &iface_ents) |
Get entities on interfaces shared with another proc. More... | |
Interface * | get_moab () const |
ErrorCode | clean_shared_tags (std::vector< Range * > &exchange_ents) |
ErrorCode | pack_buffer (Range &orig_ents, const bool adjacencies, const bool tags, const bool store_remote_handles, const int to_proc, Buffer *buff, TupleList *entprocs=NULL, Range *allsent=NULL) |
public 'cuz we want to unit test these externally More... | |
ErrorCode | unpack_buffer (unsigned char *buff_ptr, const bool store_remote_handles, const int from_proc, const int ind, std::vector< std::vector< EntityHandle > > &L1hloc, std::vector< std::vector< EntityHandle > > &L1hrem, std::vector< std::vector< int > > &L1p, std::vector< EntityHandle > &L2hloc, std::vector< EntityHandle > &L2hrem, std::vector< unsigned int > &L2p, std::vector< EntityHandle > &new_ents, const bool created_iface=false) |
ErrorCode | pack_entities (Range &entities, Buffer *buff, const bool store_remote_handles, const int to_proc, const bool is_iface, TupleList *entprocs=NULL, Range *allsent=NULL) |
ErrorCode | unpack_entities (unsigned char *&buff_ptr, const bool store_remote_handles, const int from_ind, const bool is_iface, std::vector< std::vector< EntityHandle > > &L1hloc, std::vector< std::vector< EntityHandle > > &L1hrem, std::vector< std::vector< int > > &L1p, std::vector< EntityHandle > &L2hloc, std::vector< EntityHandle > &L2hrem, std::vector< unsigned int > &L2p, std::vector< EntityHandle > &new_ents, const bool created_iface=false) |
unpack entities in buff_ptr More... | |
ErrorCode | check_all_shared_handles (bool print_em=false) |
Call exchange_all_shared_handles, then compare the results with tag data on local shared entities. More... | |
ErrorCode | pack_shared_handles (std::vector< std::vector< SharedEntityData > > &send_data) |
ErrorCode | check_local_shared () |
ErrorCode | check_my_shared_handles (std::vector< std::vector< SharedEntityData > > &shents, const char *prefix=NULL) |
void | set_rank (unsigned int r) |
set rank for this pcomm; USED FOR TESTING ONLY! More... | |
void | set_size (unsigned int r) |
set rank for this pcomm; USED FOR TESTING ONLY! More... | |
int | get_buffers (int to_proc, bool *is_new=NULL) |
get (and possibly allocate) buffers for messages to/from to_proc; returns index of to_proc in buffProcs vector; if is_new is non-NULL, sets to whether new buffer was allocated PUBLIC ONLY FOR TESTING! More... | |
const std::vector< unsigned int > & | buff_procs () const |
get buff processor vector More... | |
ErrorCode | unpack_remote_handles (unsigned int from_proc, unsigned char *&buff_ptr, std::vector< EntityHandle > &L2hloc, std::vector< EntityHandle > &L2hrem, std::vector< unsigned int > &L2p) |
ErrorCode | pack_remote_handles (std::vector< EntityHandle > &L1hloc, std::vector< EntityHandle > &L1hrem, std::vector< int > &procs, unsigned int to_proc, Buffer *buff) |
ErrorCode | create_interface_sets (std::map< std::vector< int >, std::vector< EntityHandle > > &proc_nvecs) |
ErrorCode | create_interface_sets (EntityHandle this_set, int resolve_dim, int shared_dim) |
ErrorCode | tag_shared_verts (TupleList &shared_ents, std::map< std::vector< int >, std::vector< EntityHandle > > &proc_nvecs, Range &proc_verts, unsigned int i_extra=1) |
ErrorCode | list_entities (const EntityHandle *ents, int num_ents) |
ErrorCode | list_entities (const Range &ents) |
void | set_send_request (int n_request) |
void | set_recv_request (int n_request) |
void | reset_all_buffers () |
reset message buffers to their initial state More... | |
void | set_debug_verbosity (int verb) |
set the verbosity level of output from this pcomm More... | |
int | get_debug_verbosity () |
get the verbosity level of output from this pcomm More... | |
ErrorCode | gather_data (Range &gather_ents, Tag &tag_handle, Tag id_tag=0, EntityHandle gather_set=0, int root_proc_rank=0) |
ErrorCode | settle_intersection_points (Range &edges, Range &shared_edges_owned, std::vector< std::vector< EntityHandle > * > &extraNodesVec, double tolerance) |
ErrorCode | delete_entities (Range &to_delete) |
ErrorCode | correct_thin_ghost_layers () |
Static Public Member Functions | |
static ParallelComm * | get_pcomm (Interface *impl, const int index) |
get the indexed pcomm object from the interface More... | |
static ParallelComm * | get_pcomm (Interface *impl, EntityHandle partitioning, const MPI_Comm *comm=0) |
Get ParallelComm instance associated with partition handle Will create ParallelComm instance if a) one does not already exist and b) a valid value for MPI_Comm is passed. More... | |
static ErrorCode | get_all_pcomm (Interface *impl, std::vector< ParallelComm * > &list) |
static ErrorCode | exchange_ghost_cells (ParallelComm **pc, unsigned int num_procs, int ghost_dim, int bridge_dim, int num_layers, int addl_ents, bool store_remote_handles, EntityHandle *file_sets=NULL) |
Static version of exchange_ghost_cells, exchanging info through buffers rather than messages. More... | |
static ErrorCode | resolve_shared_ents (ParallelComm **pc, const unsigned int np, EntityHandle this_set, const int to_dim) |
static Tag | pcomm_tag (Interface *impl, bool create_if_missing=true) |
return pcomm tag; static because might not have a pcomm before going to look for one on the interface More... | |
static ErrorCode | check_all_shared_handles (ParallelComm **pcs, int num_pcs) |
Static Public Attributes | |
static unsigned char | PROC_SHARED |
static unsigned char | PROC_OWNER |
static const unsigned int | INITIAL_BUFF_SIZE = 1024 |
Private Member Functions | |
ErrorCode | reduce_void (int tag_data_type, const MPI_Op mpi_op, int num_ents, void *old_vals, void *new_vals) |
template<class T > | |
ErrorCode | reduce (const MPI_Op mpi_op, int num_ents, void *old_vals, void *new_vals) |
void | print_debug_isend (int from, int to, unsigned char *buff, int tag, int size) |
void | print_debug_irecv (int to, int from, unsigned char *buff, int size, int tag, int incoming) |
void | print_debug_recd (MPI_Status status) |
void | print_debug_waitany (std::vector< MPI_Request > &reqs, int tag, int proc) |
void | initialize () |
ErrorCode | set_sharing_data (EntityHandle ent, unsigned char pstatus, int old_nump, int new_nump, int *ps, EntityHandle *hs) |
ErrorCode | check_clean_iface (Range &allsent) |
void | define_mpe () |
ErrorCode | get_sent_ents (const bool is_iface, const int bridge_dim, const int ghost_dim, const int num_layers, const int addl_ents, Range *sent_ents, Range &allsent, TupleList &entprocs) |
ErrorCode | set_pstatus_entities (Range &pstatus_ents, unsigned char pstatus_val, bool lower_dim_ents=false, bool verts_too=true, int operation=Interface::UNION) |
Set pstatus values on entities. More... | |
ErrorCode | set_pstatus_entities (EntityHandle *pstatus_ents, int num_ents, unsigned char pstatus_val, bool lower_dim_ents=false, bool verts_too=true, int operation=Interface::UNION) |
Set pstatus values on entities (vector-based function) More... | |
int | estimate_ents_buffer_size (Range &entities, const bool store_remote_handles) |
estimate size required to pack entities More... | |
int | estimate_sets_buffer_size (Range &entities, const bool store_remote_handles) |
estimate size required to pack sets More... | |
ErrorCode | send_buffer (const unsigned int to_proc, Buffer *send_buff, const int msg_tag, MPI_Request &send_req, MPI_Request &ack_recv_req, int *ack_buff, int &this_incoming, int next_mesg_tag=-1, Buffer *next_recv_buff=NULL, MPI_Request *next_recv_req=NULL, int *next_incoming=NULL) |
send the indicated buffer, possibly sending size first More... | |
ErrorCode | recv_buffer (int mesg_tag_expected, const MPI_Status &mpi_status, Buffer *recv_buff, MPI_Request &recv_2nd_req, MPI_Request &ack_req, int &this_incoming, Buffer *send_buff, MPI_Request &send_req, MPI_Request &sent_ack_req, bool &done, Buffer *next_buff=NULL, int next_tag=-1, MPI_Request *next_req=NULL, int *next_incoming=NULL) |
process incoming message; if longer than the initial size, post recv for next part then send ack; if ack, send second part; else indicate that we're done and buffer is ready for processing More... | |
ErrorCode | pack_entity_seq (const int nodes_per_entity, const bool store_remote_handles, const int to_proc, Range &these_ents, std::vector< EntityHandle > &entities, Buffer *buff) |
pack a range of entities with equal # verts per entity, along with the range on the sending proc More... | |
ErrorCode | print_buffer (unsigned char *buff_ptr, int mesg_type, int from_proc, bool sent) |
ErrorCode | unpack_iface_entities (unsigned char *&buff_ptr, const int from_proc, const int ind, std::vector< EntityHandle > &recd_ents) |
for all the entities in the received buffer; for each, save entities in this instance which match connectivity, or zero if none found More... | |
ErrorCode | pack_sets (Range &entities, Buffer *buff, const bool store_handles, const int to_proc) |
ErrorCode | unpack_sets (unsigned char *&buff_ptr, std::vector< EntityHandle > &entities, const bool store_handles, const int to_proc) |
ErrorCode | pack_adjacencies (Range &entities, Range::const_iterator &start_rit, Range &whole_range, unsigned char *&buff_ptr, int &count, const bool just_count, const bool store_handles, const int to_proc) |
ErrorCode | unpack_adjacencies (unsigned char *&buff_ptr, Range &entities, const bool store_handles, const int from_proc) |
ErrorCode | unpack_remote_handles (unsigned int from_proc, const unsigned char *buff_ptr, std::vector< EntityHandle > &L2hloc, std::vector< EntityHandle > &L2hrem, std::vector< unsigned int > &L2p) |
ErrorCode | find_existing_entity (const bool is_iface, const int owner_p, const EntityHandle owner_h, const int num_ents, const EntityHandle *connect, const int num_connect, const EntityType this_type, std::vector< EntityHandle > &L2hloc, std::vector< EntityHandle > &L2hrem, std::vector< unsigned int > &L2p, EntityHandle &new_h) |
given connectivity and type, find an existing entity, if there is one More... | |
ErrorCode | build_sharedhps_list (const EntityHandle entity, const unsigned char pstatus, const int sharedp, const std::set< unsigned int > &procs, unsigned int &num_ents, int *tmp_procs, EntityHandle *tmp_handles) |
ErrorCode | get_tag_send_list (const Range &all_entities, std::vector< Tag > &all_tags, std::vector< Range > &tag_ranges) |
Get list of tags for which to exchange data. More... | |
ErrorCode | pack_tags (Range &entities, const std::vector< Tag > &src_tags, const std::vector< Tag > &dst_tags, const std::vector< Range > &tag_ranges, Buffer *buff, const bool store_handles, const int to_proc) |
Serialize entity tag data. More... | |
ErrorCode | packed_tag_size (Tag source_tag, const Range &entities, int &count_out) |
Calculate buffer size required to pack tag data. More... | |
ErrorCode | pack_tag (Tag source_tag, Tag destination_tag, const Range &entities, const std::vector< EntityHandle > &whole_range, Buffer *buff, const bool store_remote_handles, const int to_proc) |
Serialize tag data. More... | |
ErrorCode | unpack_tags (unsigned char *&buff_ptr, std::vector< EntityHandle > &entities, const bool store_handles, const int to_proc, const MPI_Op *const mpi_op=NULL) |
ErrorCode | tag_shared_verts (TupleList &shared_verts, Range *skin_ents, std::map< std::vector< int >, std::vector< EntityHandle > > &proc_nvecs, Range &proc_verts) |
ErrorCode | get_proc_nvecs (int resolve_dim, int shared_dim, Range *skin_ents, std::map< std::vector< int >, std::vector< EntityHandle > > &proc_nvecs) |
ErrorCode | create_iface_pc_links () |
ErrorCode | pack_range_map (Range &this_range, EntityHandle actual_start, HandleMap &handle_map) |
pack a range map with keys in this_range and values a contiguous series of handles starting at actual_start More... | |
bool | is_iface_proc (EntityHandle this_set, int to_proc) |
returns true if the set is an interface shared with to_proc More... | |
ErrorCode | update_iface_sets (Range &sent_ents, std::vector< EntityHandle > &remote_handles, int from_proc) |
for any remote_handles set to zero, remove corresponding sent_ents from iface_sets corresponding to from_proc More... | |
ErrorCode | get_ghosted_entities (int bridge_dim, int ghost_dim, int to_proc, int num_layers, int addl_ents, Range &ghosted_ents) |
for specified bridge/ghost dimension, to_proc, and number of layers, get the entities to be ghosted, and info on additional procs needing to communicate with to_proc More... | |
ErrorCode | add_verts (Range &sent_ents) |
add vertices adjacent to entities in this list More... | |
ErrorCode | exchange_all_shared_handles (std::vector< std::vector< SharedEntityData > > &send_data, std::vector< std::vector< SharedEntityData > > &result) |
Every processor sends shared entity handle data to every other processor that it shares entities with. Passed back map is all received data, indexed by processor ID. This function is intended to be used for debugging. More... | |
ErrorCode | get_remote_handles (const bool store_remote_handles, EntityHandle *from_vec, EntityHandle *to_vec_tmp, int num_ents, int to_proc, const std::vector< EntityHandle > &new_ents) |
replace handles in from_vec with corresponding handles on to_proc (by checking shared[p/h]_tag and shared[p/h]s_tag; if no remote handle and new_ents is non-null, substitute instead CREATE_HANDLE(MBMAXTYPE, index) where index is handle's position in new_ents More... | |
ErrorCode | get_remote_handles (const bool store_remote_handles, const Range &from_range, Range &to_range, int to_proc, const std::vector< EntityHandle > &new_ents) |
same as other version, except from_range and to_range should be different here More... | |
ErrorCode | get_remote_handles (const bool store_remote_handles, const Range &from_range, EntityHandle *to_vec, int to_proc, const std::vector< EntityHandle > &new_ents) |
same as other version, except packs range into vector More... | |
ErrorCode | get_local_handles (EntityHandle *from_vec, int num_ents, const Range &new_ents) |
goes through from_vec, and for any with type MBMAXTYPE, replaces with new_ents value at index corresponding to id of entity in from_vec More... | |
ErrorCode | get_local_handles (const Range &remote_handles, Range &local_handles, const std::vector< EntityHandle > &new_ents) |
same as above except puts results in range More... | |
ErrorCode | get_local_handles (EntityHandle *from_vec, int num_ents, const std::vector< EntityHandle > &new_ents) |
same as above except gets new_ents from vector More... | |
ErrorCode | update_remote_data (Range &local_range, Range &remote_range, int other_proc, const unsigned char add_pstat) |
ErrorCode | update_remote_data (const EntityHandle new_h, const int *ps, const EntityHandle *hs, const int num_ps, const unsigned char add_pstat) |
ErrorCode | update_remote_data_old (const EntityHandle new_h, const int *ps, const EntityHandle *hs, const int num_ps, const unsigned char add_pstat) |
ErrorCode | tag_iface_entities () |
Set pstatus tag interface bit on entities in sets passed in. More... | |
int | add_pcomm (ParallelComm *pc) |
add a pc to the iface instance tag PARALLEL_COMM More... | |
void | remove_pcomm (ParallelComm *pc) |
remove a pc from the iface instance tag PARALLEL_COMM More... | |
ErrorCode | check_sent_ents (Range &allsent) |
check entities to make sure there are no zero-valued remote handles where they shouldn't be More... | |
ErrorCode | assign_entities_part (std::vector< EntityHandle > &entities, const int proc) |
assign entities to the input processor part More... | |
ErrorCode | remove_entities_part (Range &entities, const int proc) |
remove entities to the input processor part More... | |
void | delete_all_buffers () |
reset message buffers to their initial state More... | |
Private Attributes | |
Interface * | mbImpl |
MB interface associated with this writer. More... | |
ProcConfig | procConfig |
Proc config object, keeps info on parallel stuff. More... | |
SequenceManager * | sequenceManager |
Sequence manager, to get more efficient access to entities. More... | |
Error * | errorHandler |
Error handler. More... | |
std::vector< Buffer * > | localOwnedBuffs |
more data buffers, proc-specific More... | |
std::vector< Buffer * > | remoteOwnedBuffs |
std::vector< MPI_Request > | sendReqs |
request objects, may be used if store_remote_handles is used More... | |
std::vector< MPI_Request > | recvReqs |
receive request objects More... | |
std::vector< MPI_Request > | recvRemotehReqs |
std::vector< unsigned int > | buffProcs |
processor rank for each buffer index More... | |
Range | partitionSets |
the partition, interface sets for this comm'n instance More... | |
Range | interfaceSets |
std::set< EntityHandle > | sharedEnts |
all local entities shared with others, whether ghost or ghosted More... | |
Tag | sharedpTag |
tags used to save sharing procs and handles More... | |
Tag | sharedpsTag |
Tag | sharedhTag |
Tag | sharedhsTag |
Tag | pstatusTag |
Tag | ifaceSetsTag |
Tag | partitionTag |
int | globalPartCount |
Cache of global part count. More... | |
EntityHandle | partitioningSet |
entity set containing all parts More... | |
std::ofstream | myFile |
int | pcommID |
int | ackbuff |
DebugOutput * | myDebug |
used to set verbosity level and to report output More... | |
SharedSetData * | sharedSetData |
Data about shared sets. More... | |
Friends | |
class | ParallelMergeMesh |
Parallel communications in MOAB.
This class implements methods to communicate mesh between processors
Definition at line 54 of file ParallelComm.hpp.
moab::ParallelComm::ParallelComm | ( | Interface * | impl, |
MPI_Comm | comm, | ||
int * | pcomm_id_out = 0 |
||
) |
constructor
Definition at line 313 of file ParallelComm.cpp.
References initialize(), pcommID, moab::ProcConfig::proc_rank(), procConfig, and sharedSetData.
Referenced by get_pcomm().
moab::ParallelComm::ParallelComm | ( | Interface * | impl, |
std::vector< unsigned char > & | tmp_buff, | ||
MPI_Comm | comm, | ||
int * | pcomm_id_out = 0 |
||
) |
constructor taking packed buffer, for testing
Definition at line 323 of file ParallelComm.cpp.
References initialize(), pcommID, moab::ProcConfig::proc_rank(), procConfig, and sharedSetData.
moab::ParallelComm::~ParallelComm | ( | ) |
destructor
Definition at line 333 of file ParallelComm.cpp.
References delete_all_buffers(), myDebug, remove_pcomm(), and sharedSetData.
|
private |
add a pc to the iface instance tag PARALLEL_COMM
Definition at line 374 of file ParallelComm.cpp.
References ErrorCode, MAX_SHARING_PROCS, MB_SUCCESS, MB_TAG_NOT_FOUND, mbImpl, pcomm_tag(), moab::Interface::tag_get_data(), and moab::Interface::tag_set_data().
Referenced by initialize().
add vertices adjacent to entities in this list
Definition at line 7502 of file ParallelComm.cpp.
References moab::Range::begin(), moab::Range::equal_range(), ErrorCode, moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::Interface::get_entities_by_type(), MB_CHK_SET_ERR, MB_SUCCESS, MBENTITYSET, mbImpl, MBPOLYHEDRON, MBVERTEX, moab::Range::subset_by_type(), and moab::Interface::UNION.
Referenced by broadcast_entities(), exchange_owned_mesh(), get_ghosted_entities(), scatter_entities(), and send_entities().
|
private |
assign entities to the input processor part
Definition at line 7297 of file ParallelComm.cpp.
References moab::Interface::add_entities(), entities, ErrorCode, get_part_handle(), MB_CHK_SET_ERR, MB_SUCCESS, and mbImpl.
Referenced by exchange_owned_mesh(), and recv_entities().
ErrorCode moab::ParallelComm::assign_global_ids | ( | EntityHandle | this_set, |
const int | dimension, | ||
const int | start_id = 1 , |
||
const bool | largest_dim_only = true , |
||
const bool | parallel = true , |
||
const bool | owned_only = false |
||
) |
assign a global id space, for largest-dimension or all entities (and in either case for vertices too)
Assign a global id space, for largest-dimension or all entities (and in either case for vertices too)
owned_only | If true, do not get global IDs for non-owned entities from remote processors. |
Definition at line 421 of file ParallelComm.cpp.
References dim, entities, ErrorCode, moab::Interface::get_entities_by_dimension(), moab::Range::insert(), MB_CHK_SET_ERR, mbImpl, PSTATUS_NOT_OWNED, pstatus_tag(), size(), moab::subtract(), and moab::Interface::tag_get_data().
Referenced by check_global_ids(), compute_dual_mesh(), moab::NCHelperDomain::create_mesh(), moab::NCHelperScrip::create_mesh(), main(), and resolve_shared_ents().
ErrorCode moab::ParallelComm::assign_global_ids | ( | Range | entities[], |
const int | dimension, | ||
const int | start_id, | ||
const bool | parallel, | ||
const bool | owned_only | ||
) |
assign a global id space, for largest-dimension or all entities (and in either case for vertices too)
Assign a global id space, for largest-dimension or all entities (and in either case for vertices too)
Definition at line 455 of file ParallelComm.cpp.
References dim, entities, ErrorCode, exchange_tags(), moab::Interface::globalId_tag(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), moab::ProcConfig::proc_size(), procConfig, size(), and moab::Interface::tag_set_data().
ErrorCode moab::ParallelComm::augment_default_sets_with_ghosts | ( | EntityHandle | file_set | ) |
extend shared sets with ghost entities After ghosting, ghost entities do not have yet information about the material set, partition set, Neumann or Dirichlet set they could belong to This method will assign ghosted entities to the those special entity sets In some case we might even have to create those sets, if they do not exist yet on the local processor
The special entity sets all have an unique identifier, in a form of an integer tag to the set. The shared sets data is not used, because we do not use the geometry sets, as they are not uniquely identified
file_set | : file set used per application |
Definition at line 4766 of file ParallelComm.cpp.
References moab::Interface::add_entities(), moab::Interface::contains_entities(), moab::Interface::create_meshset(), moab::ProcConfig::crystal_router(), DIRICHLET_SET_TAG_NAME, moab::TupleList::enableWriteAccess(), ErrorCode, get_debug_verbosity(), moab::Interface::get_entities_by_type_and_tag(), moab::TupleList::get_max(), moab::TupleList::get_n(), get_sharing_data(), moab::Interface::globalId_tag(), moab::TupleList::inc_n(), moab::TupleList::initialize(), MATERIAL_SET_TAG_NAME, MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_ANY, MB_TYPE_INTEGER, MBENTITYSET, mbImpl, MESHSET_SET, NEUMANN_SET_TAG_NAME, PARALLEL_PARTITION_TAG_NAME, moab::TupleList::print(), moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_size(), procConfig, PSTATUS_NOT_OWNED, rank(), moab::TupleList::resize(), sharedEnts, moab::Range::size(), size(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), moab::Interface::UNION, moab::TupleList::vi_rd, moab::TupleList::vi_wr, moab::TupleList::vul_rd, and moab::TupleList::vul_wr.
Referenced by moab::ReadParallel::load_file().
ErrorCode moab::ParallelComm::broadcast_entities | ( | const int | from_proc, |
Range & | entities, | ||
const bool | adjacencies = false , |
||
const bool | tags = true |
||
) |
Broadcast all entities resident on from_proc to other processors This function assumes remote handles are not being stored, since (usually) every processor will know about the whole mesh.
from_proc | Processor having the mesh to be broadcast |
entities | On return, the entities sent or received in this call |
adjacencies | If true, adjacencies are sent for equiv entities (currently unsupported) |
tags | If true, all non-default-valued tags are sent for sent entities |
Definition at line 536 of file ParallelComm.cpp.
References add_verts(), moab::ParallelComm::Buffer::buff_ptr, entities, ErrorCode, INITIAL_BUFF_SIZE, moab::MAX_BCAST_SIZE, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, moab::ParallelComm::Buffer::mem_ptr, pack_buffer(), moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, moab::ParallelComm::Buffer::reserve(), moab::ParallelComm::Buffer::reset_ptr(), moab::ParallelComm::Buffer::set_stored_size(), and unpack_buffer().
Referenced by moab::ReadParallel::load_file().
|
inline |
|
private |
Definition at line 1748 of file ParallelComm.cpp.
References ErrorCode, get_sharing_data(), list_entities(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, moab::ProcConfig::proc_rank(), procConfig, PSTATUS_MULTISHARED, PSTATUS_NOT_OWNED, and PSTATUS_SHARED.
Referenced by pack_entities().
ErrorCode moab::ParallelComm::check_all_shared_handles | ( | bool | print_em = false | ) |
Call exchange_all_shared_handles, then compare the results with tag data on local shared entities.
Definition at line 8541 of file ParallelComm.cpp.
References buffProcs, check_local_shared(), check_my_shared_handles(), ErrorCode, exchange_all_shared_handles(), MB_SUCCESS, mbImpl, pack_shared_handles(), moab::ProcConfig::proc_rank(), procConfig, and moab::Interface::write_mesh().
Referenced by exchange_ghost_cells(), main(), resolve_shared_ents(), and moab::ScdInterface::tag_shared_vertices().
|
static |
Definition at line 8715 of file ParallelComm.cpp.
References buffProcs, check_my_shared_handles(), ErrorCode, get_buffers(), MB_SUCCESS, and pack_shared_handles().
Definition at line 6256 of file ParallelComm.cpp.
References moab::Interface::add_entities(), moab::Range::begin(), moab::Interface::create_meshset(), moab::Interface::delete_entities(), moab::Range::erase(), ErrorCode, moab::Interface::get_number_entities_by_handle(), get_sharing_data(), moab::Range::insert(), interface_sets(), interfaceSets, MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, MESHSET_SET, proc_config(), moab::ProcConfig::proc_rank(), procConfig, moab::ProcList::procs, PSTATUS_INTERFACE, PSTATUS_MULTISHARED, PSTATUS_NOT_OWNED, PSTATUS_SHARED, pstatus_tag(), moab::Range::rbegin(), moab::Interface::remove_entities(), moab::Range::rend(), set_sharing_data(), sharedh_tag(), sharedhs_tag(), sharedp_tag(), sharedps_tag(), moab::Interface::tag_clear_data(), and moab::Interface::tag_set_data().
Referenced by exchange_ghost_cells().
ErrorCode moab::ParallelComm::check_global_ids | ( | EntityHandle | this_set, |
const int | dimension, | ||
const int | start_id = 1 , |
||
const bool | largest_dim_only = true , |
||
const bool | parallel = true , |
||
const bool | owned_only = false |
||
) |
check for global ids; based only on tag handle being there or not; if it's not there, create them for the specified dimensions
owned_only | If true, do not get global IDs for non-owned entities from remote processors. |
Definition at line 5532 of file ParallelComm.cpp.
References assign_global_ids(), moab::Range::empty(), ErrorCode, moab::Interface::get_entities_by_type_and_tag(), moab::Interface::globalId_tag(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, and MBVERTEX.
Referenced by moab::ReadParallel::load_file().
ErrorCode moab::ParallelComm::check_local_shared | ( | ) |
Definition at line 8588 of file ParallelComm.cpp.
References ErrorCode, moab::Interface::get_connectivity(), get_sharing_data(), list_entities(), MAX_SHARING_PROCS, MB_SUCCESS, MBENTITYSET, mbImpl, MBVERTEX, moab::ProcConfig::proc_rank(), procConfig, PSTATUS_MULTISHARED, PSTATUS_NOT_OWNED, PSTATUS_SHARED, sharedEnts, and moab::Interface::type_from_handle().
Referenced by check_all_shared_handles().
ErrorCode moab::ParallelComm::check_my_shared_handles | ( | std::vector< std::vector< SharedEntityData > > & | shents, |
const char * | prefix = NULL |
||
) |
Definition at line 8757 of file ParallelComm.cpp.
References buffProcs, moab::Range::empty(), moab::Range::end(), moab::Range::erase(), ErrorCode, get_pstatus(), get_remote_handles(), get_shared_entities(), moab::Range::insert(), list_entities(), MB_SUCCESS, MBPOLYHEDRON, moab::Range::merge(), PSTATUS_NOT_OWNED, rank(), sharedEnts, and moab::Range::upper_bound().
Referenced by check_all_shared_handles().
check entities to make sure there are no zero-valued remote handles where they shouldn't be
Definition at line 7323 of file ParallelComm.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::Range::insert(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, mbImpl, pstatus_tag(), sharedh_tag(), sharedhs_tag(), sharedp_tag(), sharedps_tag(), moab::Range::size(), and moab::Interface::tag_get_data().
Referenced by exchange_ghost_cells(), and exchange_owned_mesh().
Definition at line 8842 of file ParallelComm.cpp.
References moab::Range::begin(), ErrorCode, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, mbImpl, pstatus_tag(), sharedh_tag(), sharedp_tag(), moab::Range::size(), moab::Interface::tag_delete_data(), and moab::Interface::tag_get_data().
ErrorCode moab::ParallelComm::collective_sync_partition | ( | ) |
Definition at line 8268 of file ParallelComm.cpp.
References globalPartCount, MB_SUCCESS, partition_sets(), proc_config(), and moab::Range::size().
|
inline |
Definition at line 652 of file ParallelComm.hpp.
References moab::ProcConfig::proc_comm(), and proc_config().
Referenced by gather_data(), get_pcomm(), moab::ParallelMergeMesh::GetGlobalBox(), iMOAB_UpdateMeshInfo(), main(), perform_laplacian_smoothing(), perform_lloyd_relaxation(), moab::LloydSmoother::perform_smooth(), moab::ParallelMergeMesh::PerformMerge(), moab::ParCommGraph::receive_comm_graph(), moab::ParCommGraph::send_graph_partition(), ToolContext::timer_pop(), and RuntimeContext::timer_pop().
ErrorCode moab::ParallelComm::correct_thin_ghost_layers | ( | ) |
Definition at line 9346 of file ParallelComm.cpp.
References buffProcs, ErrorCode, exchange_all_shared_handles(), get_buffers(), get_sharing_data(), moab::DebugOutput::get_verbosity(), moab::ParallelComm::SharedEntityData::local, MAX_SHARING_PROCS, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, myDebug, moab::ParallelComm::SharedEntityData::owner, PSTATUS_MULTISHARED, PSTATUS_NOT_OWNED, pstatus_tag(), rank(), moab::ParallelComm::SharedEntityData::remote, sharedEnts, sharedh_tag(), sharedhs_tag(), sharedp_tag(), sharedps_tag(), and moab::Interface::tag_set_data().
Referenced by moab::ReadParallel::load_file().
|
private |
Definition at line 5093 of file ParallelComm.cpp.
References moab::Interface::add_parent_child(), moab::Range::begin(), moab::Range::clear(), moab::Interface::dimension_from_handle(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Interface::get_adjacencies(), moab::Interface::get_entities_by_handle(), interfaceSets, MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_HANDLE, mbImpl, moab::Range::rbegin(), moab::Range::size(), moab::Interface::tag_delete(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by resolve_shared_ents(), and moab::ParallelMergeMesh::TagSharedElements().
ErrorCode moab::ParallelComm::create_interface_sets | ( | EntityHandle | this_set, |
int | resolve_dim, | ||
int | shared_dim | ||
) |
Definition at line 4981 of file ParallelComm.cpp.
References create_interface_sets(), moab::Interface::dimension_from_handle(), ErrorCode, moab::Skinner::find_skin(), moab::Interface::get_adjacencies(), moab::Interface::get_entities_by_dimension(), get_proc_nvecs(), get_sharing_data(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, mbImpl, sharedEnts, and moab::Interface::UNION.
ErrorCode moab::ParallelComm::create_interface_sets | ( | std::map< std::vector< int >, std::vector< EntityHandle > > & | proc_nvecs | ) |
Definition at line 5017 of file ParallelComm.cpp.
References moab::Interface::add_entities(), moab::Interface::create_meshset(), moab::CN::EntityTypeName(), ErrorCode, moab::GeomUtil::first(), get_shared_proc_tags(), moab::ID_FROM_HANDLE(), moab::Range::insert(), interfaceSets, MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, MBVERTEX, MESHSET_SET, proc_config(), moab::ProcConfig::proc_rank(), procConfig, PSTATUS_INTERFACE, PSTATUS_MULTISHARED, PSTATUS_NOT_OWNED, PSTATUS_SHARED, moab::Interface::tag_set_data(), moab::Interface::type_from_handle(), and moab::TYPE_FROM_HANDLE().
Referenced by create_interface_sets(), exchange_owned_meshs(), resolve_shared_ents(), moab::ScdInterface::tag_shared_vertices(), and moab::ParallelMergeMesh::TagSharedElements().
ErrorCode moab::ParallelComm::create_part | ( | EntityHandle & | part_out | ) |
Definition at line 8210 of file ParallelComm.cpp.
References moab::Interface::add_entities(), moab::Interface::create_meshset(), moab::Interface::delete_entities(), ErrorCode, get_partitioning(), globalPartCount, moab::Range::index(), moab::Range::insert(), MB_SUCCESS, mbImpl, MESHSET_SET, part_tag(), partition_sets(), proc_config(), moab::ProcConfig::proc_rank(), and moab::Interface::tag_set_data().
|
private |
Definition at line 4228 of file ParallelComm.cpp.
References moab::DebugOutput::get_verbosity(), MPE_Describe_state, MPE_LOG_OK, and myDebug.
Referenced by resolve_shared_ents().
|
inlineprivate |
reset message buffers to their initial state
delete all buffers, freeing up any memory held by them
Definition at line 1557 of file ParallelComm.hpp.
References localOwnedBuffs, and remoteOwnedBuffs.
Referenced by ~ParallelComm().
Definition at line 9258 of file ParallelComm.cpp.
References moab::Range::begin(), moab::ProcConfig::crystal_router(), moab::Interface::delete_entities(), moab::TupleList::enableWriteAccess(), moab::Range::end(), ErrorCode, moab::TupleList::get_n(), get_sharing_data(), moab::TupleList::inc_n(), moab::Range::index(), moab::TupleList::initialize(), moab::Range::insert(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, procConfig, sharedEnts, moab::Range::size(), moab::TupleList::vi_wr, moab::TupleList::vul_rd, and moab::TupleList::vul_wr.
Referenced by moab::NCHelperScrip::create_mesh().
ErrorCode moab::ParallelComm::destroy_part | ( | EntityHandle | part | ) |
Definition at line 8248 of file ParallelComm.cpp.
References moab::Interface::delete_entities(), moab::Range::erase(), ErrorCode, get_partitioning(), globalPartCount, moab::Range::index(), MB_SUCCESS, mbImpl, partition_sets(), and moab::Interface::remove_entities().
|
private |
estimate size required to pack entities
Definition at line 1503 of file ParallelComm.cpp.
References entities, ErrorCode, moab::Interface::get_connectivity(), MB_CHK_SET_ERR_RET_VAL, MBEDGE, MBENTITYSET, mbImpl, MBVERTEX, and moab::TYPE_FROM_HANDLE().
Referenced by pack_entities().
|
private |
estimate size required to pack sets
Definition at line 1536 of file ParallelComm.cpp.
References entities, ErrorCode, moab::Interface::get_entities_by_handle(), moab::Interface::get_meshset_options(), moab::Interface::get_number_entities_by_handle(), MB_CHK_SET_ERR_RET_VAL, MBENTITYSET, mbImpl, MESHSET_SET, moab::Interface::num_child_meshsets(), moab::Interface::num_parent_meshsets(), and moab::RANGE_SIZE().
Referenced by pack_sets().
|
private |
Every processor sends shared entity handle data to every other processor that it shares entities with. Passed back map is all received data, indexed by processor ID. This function is intended to be used for debugging.
Definition at line 8474 of file ParallelComm.cpp.
References buffProcs, MB_FILE_WRITE_ERROR, MB_SUCCESS, moab::ProcConfig::proc_comm(), and procConfig.
Referenced by check_all_shared_handles(), and correct_thin_ghost_layers().
ErrorCode moab::ParallelComm::exchange_ghost_cells | ( | int | ghost_dim, |
int | bridge_dim, | ||
int | num_layers, | ||
int | addl_ents, | ||
bool | store_remote_handles, | ||
bool | wait_all = true , |
||
EntityHandle * | file_set = NULL |
||
) |
Exchange ghost cells with neighboring procs Neighboring processors are those sharing an interface with this processor. All entities of dimension ghost_dim within num_layers of interface, measured going through bridge_dim, are exchanged. See MeshTopoUtil::get_bridge_adjacencies for description of bridge adjacencies. If wait_all is false and store_remote_handles is true, MPI_Request objects are available in the sendReqs[2*MAX_SHARING_PROCS] member array, with inactive requests marked as MPI_REQUEST_NULL. If store_remote_handles or wait_all is false, this function returns after all entities have been received and processed.
ghost_dim | Dimension of ghost entities to be exchanged |
bridge_dim | Dimension of entities used to measure layers from interface |
num_layers | Number of layers of ghosts requested |
addl_ents | Dimension of additional adjacent entities to exchange with ghosts, 0 if none |
store_remote_handles | If true, send message with new entity handles to source processor |
wait_all | If true, function does not return until all send buffers are cleared. |
Definition at line 5687 of file ParallelComm.cpp.
References moab::Interface::add_entities(), buffProcs, check_all_shared_handles(), check_clean_iface(), check_sent_ents(), moab::Range::compactness(), moab::Range::empty(), ErrorCode, get_sent_ents(), moab::DebugOutput::get_verbosity(), INITIAL_BUFF_SIZE, localOwnedBuffs, MAX_SHARING_PROCS, MB_CHK_SET_ERR, moab::MB_MESG_ENTS_SIZE, moab::MB_MESG_REMOTEH_SIZE, MB_SET_ERR, MB_SUCCESS, mbImpl, MPE_Log_event, moab::msgs, myDebug, pack_entities(), pack_remote_handles(), print_buffer(), PRINT_DEBUG_IRECV, PRINT_DEBUG_RECD, PRINT_DEBUG_WAITANY, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, recv_buffer(), remoteOwnedBuffs, moab::TupleList::reset(), reset_all_buffers(), send_buffer(), sendReqs, sharedEnts, moab::Range::size(), size(), tag_iface_entities(), moab::DebugOutput::tprintf(), unpack_entities(), and unpack_remote_handles().
Referenced by moab::NestedRefine::exchange_ghosts(), moab::ReadParallel::load_file(), main(), resolve_shared_ents(), and moab::ParallelMergeMesh::TagSharedElements().
|
static |
Static version of exchange_ghost_cells, exchanging info through buffers rather than messages.
Definition at line 6588 of file ParallelComm.cpp.
References moab::Interface::add_entities(), buffProcs, check_all_shared_handles(), check_clean_iface(), check_sent_ents(), ErrorCode, get_moab(), get_sent_ents(), localOwnedBuffs, MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, pack_entities(), pack_remote_handles(), moab::Interface::query_interface(), moab::TupleList::reset(), size(), unpack_entities(), and unpack_remote_handles().
ErrorCode moab::ParallelComm::exchange_owned_mesh | ( | std::vector< unsigned int > & | exchange_procs, |
std::vector< Range * > & | exchange_ents, | ||
std::vector< MPI_Request > & | recv_ent_reqs, | ||
std::vector< MPI_Request > & | recv_remoteh_reqs, | ||
const bool | recv_posted, | ||
bool | store_remote_handles, | ||
bool | wait_all, | ||
bool | migrate = false |
||
) |
Exchange owned mesh for input mesh entities and sets This function is called twice by exchange_owned_meshs to exchange entities before sets.
migrate | if the owner if entities are changed or not |
Definition at line 6912 of file ParallelComm.cpp.
References add_verts(), assign_entities_part(), buffProcs, check_sent_ents(), moab::Range::compactness(), moab::Range::empty(), moab::TupleList::enableWriteAccess(), ErrorCode, filter_pstatus(), get_buffers(), moab::TupleList::get_n(), moab::DebugOutput::get_verbosity(), moab::TupleList::inc_n(), INITIAL_BUFF_SIZE, moab::TupleList::initialize(), localOwnedBuffs, MAX_SHARING_PROCS, MB_CHK_SET_ERR, moab::MB_MESG_ENTS_SIZE, moab::MB_MESG_REMOTEH_SIZE, MB_SET_ERR, MB_SUCCESS, moab::Range::merge(), MPE_Log_event, moab::msgs, myDebug, pack_buffer(), pack_remote_handles(), print_buffer(), PRINT_DEBUG_IRECV, PRINT_DEBUG_RECD, PRINT_DEBUG_WAITANY, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, PSTATUS_AND, PSTATUS_SHARED, recv_buffer(), remoteOwnedBuffs, remove_entities_part(), moab::TupleList::buffer::reset(), moab::TupleList::reset(), reset_all_buffers(), send_buffer(), sendReqs, moab::Range::size(), size(), moab::TupleList::sort(), moab::subtract(), moab::DebugOutput::tprintf(), unpack_buffer(), unpack_remote_handles(), moab::TupleList::vi_wr, and moab::TupleList::vul_wr.
Referenced by exchange_owned_meshs().
ErrorCode moab::ParallelComm::exchange_owned_meshs | ( | std::vector< unsigned int > & | exchange_procs, |
std::vector< Range * > & | exchange_ents, | ||
std::vector< MPI_Request > & | recv_ent_reqs, | ||
std::vector< MPI_Request > & | recv_remoteh_reqs, | ||
bool | store_remote_handles, | ||
bool | wait_all = true , |
||
bool | migrate = false , |
||
int | dim = 0 |
||
) |
Exchange owned mesh for input mesh entities and sets This function should be called collectively over the communicator for this ParallelComm. If this version is called, all shared exchanged entities should have a value for this tag (or the tag should have a default value).
exchange_procs | processor vector exchanged |
exchange_ents | exchanged entities for each processors |
migrate | if the owner if entities are changed or not |
Definition at line 6842 of file ParallelComm.cpp.
References create_interface_sets(), dim, moab::Interface::dimension_from_handle(), ErrorCode, exchange_owned_mesh(), get_sharing_data(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, MBENTITYSET, mbImpl, recvRemotehReqs, recvReqs, sharedEnts, moab::Range::subset_by_type(), and moab::subtract().
|
inline |
Exchange tags for all shared and ghosted entities This function should be called collectively over the communicator for this ParallelComm. If the entities vector is empty, all shared entities participate in the exchange. If a proc has no owned entities this function must still be called since it is collective.
tag_name | Name of tag to be exchanged |
entities | Entities for which tags are exchanged |
Definition at line 1589 of file ParallelComm.hpp.
References entities, ErrorCode, exchange_tags(), MB_SUCCESS, MB_TAG_ANY, MB_TAG_NOT_FOUND, MB_TYPE_OPAQUE, mbImpl, and moab::Interface::tag_get_handle().
ErrorCode moab::ParallelComm::exchange_tags | ( | const std::vector< Tag > & | src_tags, |
const std::vector< Tag > & | dst_tags, | ||
const Range & | entities | ||
) |
Exchange tags for all shared and ghosted entities This function should be called collectively over the communicator for this ParallelComm. If this version is called, all ghosted/shared entities should have a value for this tag (or the tag should have a default value). If the entities vector is empty, all shared entities participate in the exchange. If a proc has no owned entities this function must still be called since it is collective.
src_tags | Vector of tag handles to be exchanged |
dst_tags | Tag handles to store the tags on the non-owning procs |
entities | Entities for which tags are exchanged |
Definition at line 7526 of file ParallelComm.cpp.
References buffProcs, moab::Range::empty(), entities, ErrorCode, filter_pstatus(), get_comm_procs(), moab::Interface::get_entities_by_type_and_tag(), moab::DebugOutput::get_verbosity(), INITIAL_BUFF_SIZE, moab::intersect(), moab::Interface::INTERSECT, localOwnedBuffs, MAX_SHARING_PROCS, MB_CHK_SET_ERR, moab::MB_MESG_TAGS_SIZE, MB_SET_ERR, MB_SUCCESS, mbImpl, MBMAXTYPE, myDebug, pack_tags(), PRINT_DEBUG_IRECV, PRINT_DEBUG_RECD, PRINT_DEBUG_WAITANY, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, PSTATUS_AND, PSTATUS_NOT, PSTATUS_NOT_OWNED, PSTATUS_SHARED, recv_buffer(), remoteOwnedBuffs, reset_all_buffers(), send_buffer(), sendReqs, sharedEnts, moab::Range::size(), moab::Interface::tag_get_bytes(), moab::Interface::tag_get_data(), moab::Interface::tag_get_default_value(), moab::Interface::tag_set_data(), moab::DebugOutput::tprintf(), and unpack_tags().
Referenced by assign_global_ids(), moab::WriteHDF5Parallel::exchange_file_ids(), moab::NestedRefine::exchange_ghosts(), exchange_tags(), iMOAB_SynchronizeTags(), main(), perform_laplacian_smoothing(), perform_lloyd_relaxation(), and moab::LloydSmoother::perform_smooth().
Exchange tags for all shared and ghosted entities This function should be called collectively over the communicator for this ParallelComm. If the entities vector is empty, all shared entities participate in the exchange. If a proc has no owned entities this function must still be called since it is collective.
tagh | Handle of tag to be exchanged |
entities | Entities for which tags are exchanged |
Definition at line 1602 of file ParallelComm.hpp.
References entities, and exchange_tags().
ErrorCode moab::ParallelComm::filter_pstatus | ( | Range & | ents, |
const unsigned char | pstatus_val, | ||
const unsigned char | op, | ||
int | to_proc = -1 , |
||
Range * | returned_ents = NULL |
||
) |
Filter the entities by pstatus tag. op is one of PSTATUS_ AND, OR, NOT; an entity is output if: AND: all bits set in pstatus_val are also set on entity OR: any bits set in pstatus_val also set on entity NOT: any bits set in pstatus_val are not set on entity
Results returned in input list, unless result_ents is passed in non-null, in which case results are returned in result_ents.
If ents is passed in empty, filter is done on shared entities in this pcomm instance, i.e. contents of sharedEnts.
ents | Input entities to filter |
pstatus_val | pstatus value to which entities are compared |
op | Bitwise operation performed between pstatus values |
to_proc | If non-negative and PSTATUS_SHARED is set on pstatus_val, only entities shared with to_proc are returned |
result_ents | If non-null, results of filter are put in the pointed-to range |
Definition at line 5577 of file ParallelComm.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Range::insert(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, PSTATUS_AND, PSTATUS_MULTISHARED, PSTATUS_NOT, PSTATUS_OR, PSTATUS_SHARED, pstatus_tag(), sharedp_tag(), sharedps_tag(), moab::Range::size(), moab::Range::swap(), and moab::Interface::tag_get_data().
Referenced by moab::NCWriteGCRM::collect_mesh_info(), moab::ScdNCWriteHelper::collect_mesh_info(), moab::NCWriteHOMME::collect_mesh_info(), moab::NCWriteMPAS::collect_mesh_info(), moab::ScdNCHelper::create_quad_coordinate_tag(), moab::WriteHDF5Parallel::exchange_file_ids(), exchange_owned_mesh(), exchange_tags(), moab::WriteHDF5Parallel::gather_interface_meshes(), get_ghosted_entities(), get_max_volume(), get_sent_ents(), get_shared_entities(), hcFilter(), iMOAB_UpdateMeshInfo(), moab::HalfFacetRep::initialize(), moab::LloydSmoother::initialize(), moab::HiReconstruction::initialize(), laplacianFilter(), moab::ReadParallel::load_file(), main(), perform_laplacian_smoothing(), perform_lloyd_relaxation(), moab::LloydSmoother::perform_smooth(), moab::ScdNCHelper::read_scd_variables_to_nonset_allocate(), moab::NCHelperGCRM::read_ucd_variables_to_nonset_allocate(), moab::NCHelperMPAS::read_ucd_variables_to_nonset_allocate(), reduce_tags(), resolve_shared_sets(), send_entities(), and settle_intersection_points().
|
private |
given connectivity and type, find an existing entity, if there is one
Definition at line 3047 of file ParallelComm.cpp.
References moab::Range::begin(), moab::CN::Dimension(), moab::Range::empty(), ErrorCode, moab::Interface::get_adjacencies(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, and MBVERTEX.
Referenced by unpack_entities(), and unpack_remote_handles().
ErrorCode moab::ParallelComm::gather_data | ( | Range & | gather_ents, |
Tag & | tag_handle, | ||
Tag | id_tag = 0 , |
||
EntityHandle | gather_set = 0 , |
||
int | root_proc_rank = 0 |
||
) |
Definition at line 8914 of file ParallelComm.cpp.
References moab::Range::begin(), comm(), dim, moab::Interface::dimension_from_handle(), moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_dimension(), MB_SUCCESS, mbImpl, proc_config(), moab::ProcConfig::proc_size(), moab::Range::psize(), rank(), moab::Range::size(), size(), moab::Interface::tag_get_bytes(), moab::Interface::tag_get_data(), and moab::Interface::tag_iterate().
|
static |
Definition at line 8023 of file ParallelComm.cpp.
References ErrorCode, MAX_SHARING_PROCS, MB_SUCCESS, MB_TAG_NOT_FOUND, pcomm_tag(), and moab::Interface::tag_get_data().
Referenced by moab::Core::deinitialize().
int moab::ParallelComm::get_buffers | ( | int | to_proc, |
bool * | is_new = NULL |
||
) |
get (and possibly allocate) buffers for messages to/from to_proc; returns index of to_proc in buffProcs vector; if is_new is non-NULL, sets to whether new buffer was allocated PUBLIC ONLY FOR TESTING!
Definition at line 514 of file ParallelComm.cpp.
References buffProcs, INITIAL_BUFF_SIZE, localOwnedBuffs, MAX_SHARING_PROCS, moab::ProcConfig::proc_rank(), procConfig, and remoteOwnedBuffs.
Referenced by check_all_shared_handles(), correct_thin_ghost_layers(), exchange_owned_mesh(), get_interface_procs(), pack_shared_handles(), post_irecv(), recv_entities(), recv_messages(), recv_remote_handle_messages(), send_entities(), send_recv_entities(), moab::ScdInterface::tag_shared_vertices(), and unpack_entities().
|
inline |
get processors with which this processor communicates
Definition at line 1633 of file ParallelComm.hpp.
References buffProcs, ErrorCode, get_interface_procs(), and MB_SUCCESS.
Referenced by exchange_tags(), reduce_tags(), and settle_intersection_points().
int moab::ParallelComm::get_debug_verbosity | ( | ) |
get the verbosity level of output from this pcomm
Definition at line 8872 of file ParallelComm.cpp.
References moab::DebugOutput::get_verbosity(), and myDebug.
Referenced by augment_default_sets_with_ghosts(), moab::ScdInterface::construct_box(), and moab::ScdInterface::tag_shared_vertices().
ErrorCode moab::ParallelComm::get_entityset_local_handle | ( | unsigned | owning_rank, |
EntityHandle | remote_handle, | ||
EntityHandle & | local_handle | ||
) | const |
Given set owner and handle on owner, find local set handle.
Definition at line 8892 of file ParallelComm.cpp.
References moab::SharedSetData::get_local_handle(), and sharedSetData.
Referenced by moab::WriteHDF5Parallel::communicate_shared_set_ids().
ErrorCode moab::ParallelComm::get_entityset_owner | ( | EntityHandle | entity_set, |
unsigned & | owner_rank, | ||
EntityHandle * | remote_handle = 0 |
||
) | const |
Get rank of the owner of a shared set. Returns this proc if set is not shared. Optionally returns handle on owning process for shared set.
Definition at line 8882 of file ParallelComm.cpp.
References moab::SharedSetData::get_owner(), and sharedSetData.
Referenced by moab::WriteHDF5Parallel::communicate_shared_set_data(), moab::WriteHDF5Parallel::communicate_shared_set_ids(), and moab::WriteHDF5Parallel::print_set_sharing_data().
ErrorCode moab::ParallelComm::get_entityset_owners | ( | std::vector< unsigned > & | ranks | ) | const |
Get ranks of all processes that own at least one set that is shared with this process. Will include the rank of this process if this process owns any shared set.
Definition at line 8904 of file ParallelComm.cpp.
References moab::SharedSetData::get_owning_procs(), and sharedSetData.
Referenced by moab::WriteHDF5Parallel::communicate_shared_set_ids().
ErrorCode moab::ParallelComm::get_entityset_procs | ( | EntityHandle | entity_set, |
std::vector< unsigned > & | ranks | ||
) | const |
Get array of process IDs sharing a set. Returns zero and passes back NULL if set is not shared.
Definition at line 8877 of file ParallelComm.cpp.
References moab::SharedSetData::get_sharing_procs(), and sharedSetData.
Referenced by moab::WriteHDF5Parallel::communicate_shared_set_data(), moab::WriteHDF5Parallel::communicate_shared_set_ids(), and moab::WriteHDF5Parallel::print_set_sharing_data().
|
private |
for specified bridge/ghost dimension, to_proc, and number of layers, get the entities to be ghosted, and info on additional procs needing to communicate with to_proc
Definition at line 7437 of file ParallelComm.cpp.
References add_verts(), moab::Range::begin(), moab::Range::empty(), moab::Range::end(), ErrorCode, filter_pstatus(), moab::Interface::get_adjacencies(), moab::MeshTopoUtil::get_bridge_adjacencies(), moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_handle(), interfaceSets, is_iface_proc(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, moab::Range::merge(), PSTATUS_NOT, PSTATUS_NOT_OWNED, moab::Range::subset_by_dimension(), and moab::Interface::UNION.
Referenced by get_sent_ents().
ErrorCode moab::ParallelComm::get_global_part_count | ( | int & | count_out | ) | const |
|
inline |
Get ID used to reference this PCOMM instance.
Definition at line 70 of file ParallelComm.hpp.
References pcommID.
Referenced by iMOAB_RegisterApplication(), and DeformMeshRemap::read_file().
Get entities on interfaces shared with another proc.
other_proc | Other proc sharing the interface |
dim | Dimension of entities to return, -1 if all dims |
iface_ents | Returned entities |
Definition at line 7275 of file ParallelComm.cpp.
References moab::Range::begin(), dim, moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_handle(), interfaceSets, is_iface_proc(), MB_CHK_SET_ERR, MB_SUCCESS, and mbImpl.
Referenced by get_sent_ents().
ErrorCode moab::ParallelComm::get_interface_procs | ( | std::set< unsigned int > & | iface_procs, |
const bool | get_buffs = false |
||
) |
get processors with which this processor shares an interface
Get processors with which this processor communicates; sets are sorted by processor.
Definition at line 5440 of file ParallelComm.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, get_buffers(), interfaceSets, MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, moab::ProcConfig::proc_rank(), procConfig, sharedp_tag(), sharedps_tag(), moab::Range::size(), and moab::Interface::tag_get_data().
Referenced by get_comm_procs(), resolve_shared_ents(), and moab::ParallelMergeMesh::TagSharedElements().
ErrorCode moab::ParallelComm::get_interface_sets | ( | EntityHandle | part, |
Range & | iface_sets_out, | ||
int * | adj_part_id = 0 |
||
) |
Definition at line 8310 of file ParallelComm.cpp.
References moab::Range::begin(), moab::Range::end(), moab::Range::erase(), ErrorCode, get_sharing_data(), interface_sets(), MAX_SHARING_PROCS, and MB_SUCCESS.
Referenced by get_part_neighbor_ids().
|
private |
same as above except puts results in range
Definition at line 3090 of file ParallelComm.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, get_local_handles(), and moab::Range::size().
|
private |
goes through from_vec, and for any with type MBMAXTYPE, replaces with new_ents value at index corresponding to id of entity in from_vec
Definition at line 3102 of file ParallelComm.cpp.
References moab::Range::begin(), and moab::Range::end().
Referenced by get_local_handles(), unpack_entities(), unpack_sets(), and unpack_tags().
|
private |
same as above except gets new_ents from vector
Definition at line 3109 of file ParallelComm.cpp.
References moab::ID_FROM_HANDLE(), MB_SUCCESS, MBMAXTYPE, and moab::TYPE_FROM_HANDLE().
|
inline |
Definition at line 779 of file ParallelComm.hpp.
References mbImpl.
Referenced by moab::ParCommGraph::compute_partition(), exchange_ghost_cells(), moab::ParallelMergeMesh::ParallelMergeMesh(), moab::ParCommGraph::receive_mesh(), moab::ParCommGraph::receive_tag_values(), resolve_shared_ents(), moab::ParCommGraph::send_mesh_parts(), and moab::ParCommGraph::send_tag_values().
Get shared sets owned by process with specified rank.
Definition at line 8909 of file ParallelComm.cpp.
References moab::SharedSetData::get_shared_sets(), and sharedSetData.
Referenced by moab::WriteHDF5Parallel::communicate_shared_set_ids(), and moab::WriteHDF5Parallel::create_meshset_tables().
|
inline |
Return the rank of the entity owner.
Definition at line 1643 of file ParallelComm.hpp.
References get_owner_handle().
Referenced by moab::WriteHDF5Parallel::exchange_file_ids(), iMOAB_GetElementOwnership(), iMOAB_GetVertexOwnership(), iMOAB_GetVisibleElementsInfo(), and pack_shared_handles().
ErrorCode moab::ParallelComm::get_owner_handle | ( | EntityHandle | entity, |
int & | owner, | ||
EntityHandle & | handle | ||
) |
Return the owner processor and handle of a given entity.
Return the rank of the entity owner.
Definition at line 8147 of file ParallelComm.cpp.
References ErrorCode, MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, proc_config(), moab::ProcConfig::proc_rank(), PSTATUS_MULTISHARED, PSTATUS_NOT_OWNED, PSTATUS_SHARED, pstatus_tag(), sharedh_tag(), sharedhs_tag(), sharedp_tag(), sharedps_tag(), and moab::Interface::tag_get_data().
Referenced by get_owner().
ErrorCode moab::ParallelComm::get_owning_part | ( | EntityHandle | entity, |
int & | owning_part_id_out, | ||
EntityHandle * | owning_handle = 0 |
||
) |
Definition at line 8337 of file ParallelComm.cpp.
References ErrorCode, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, proc_config(), moab::ProcConfig::proc_rank(), PSTATUS_NOT_OWNED, pstatus_tag(), sharedh_tag(), sharedhs_tag(), sharedp_tag(), sharedps_tag(), moab::Interface::tag_get_by_ptr(), and moab::Interface::tag_get_data().
return all the entities in parts owned locally
Definition at line 8126 of file ParallelComm.cpp.
References moab::Range::begin(), dim, moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_handle(), MB_SUCCESS, mbImpl, moab::Range::merge(), and partitionSets.
Referenced by moab::Coupler::initialize_tree(), and main().
ErrorCode moab::ParallelComm::get_part_handle | ( | int | id, |
EntityHandle & | handle_out | ||
) | const |
Definition at line 8202 of file ParallelComm.cpp.
References moab::Range::front(), MB_ENTITY_NOT_FOUND, MB_SUCCESS, partition_sets(), and proc_config().
Referenced by assign_entities_part(), and remove_entities_part().
ErrorCode moab::ParallelComm::get_part_id | ( | EntityHandle | part, |
int & | id_out | ||
) | const |
Definition at line 8195 of file ParallelComm.cpp.
References MB_SUCCESS, proc_config(), and moab::ProcConfig::proc_rank().
Referenced by get_part_neighbor_ids().
ErrorCode moab::ParallelComm::get_part_neighbor_ids | ( | EntityHandle | part, |
int | neighbors_out[MAX_SHARING_PROCS], | ||
int & | num_neighbors_out | ||
) |
Definition at line 8276 of file ParallelComm.cpp.
References ErrorCode, get_interface_sets(), get_part_id(), get_sharing_data(), iface, MAX_SHARING_PROCS, and MB_SUCCESS.
ErrorCode moab::ParallelComm::get_part_owner | ( | int | part_id, |
int & | owner_out | ||
) | const |
|
inline |
Definition at line 725 of file ParallelComm.hpp.
References partitioningSet.
Referenced by create_part(), and destroy_part().
|
static |
get the indexed pcomm object from the interface
Definition at line 8010 of file ParallelComm.cpp.
References ErrorCode, MAX_SHARING_PROCS, MB_SUCCESS, pcomm_tag(), and moab::Interface::tag_get_data().
Referenced by moab::ScdInterface::construct_box(), get_max_volume(), get_pcomm(), moab::HiReconstruction::HiReconstruction(), moab::Core::load_file(), main(), moab::MeshGeneration::MeshGeneration(), moab::NestedRefine::NestedRefine(), moab::WriteHDF5Parallel::parallel_create_file(), moab::ReadNC::parse_options(), moab::WriteNC::parse_options(), perform_laplacian_smoothing(), perform_lloyd_relaxation(), moab::ReadParallel::ReadParallel(), RuntimeContext::RuntimeContext(), and moab::ReadHDF5::set_up_read().
|
static |
Get ParallelComm instance associated with partition handle Will create ParallelComm instance if a) one does not already exist and b) a valid value for MPI_Comm is passed.
get the indexed pcomm object from the interface
Definition at line 8042 of file ParallelComm.cpp.
References comm(), ErrorCode, get_pcomm(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_NOT_FOUND, MB_TAG_SPARSE, MB_TYPE_INTEGER, ParallelComm(), moab::PARTITIONING_PCOMM_TAG_NAME, set_partitioning(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
|
private |
Definition at line 5156 of file ParallelComm.cpp.
References moab::Range::end(), ErrorCode, moab::Interface::get_connectivity(), get_sharing_data(), moab::Interface::INTERSECT, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, proc_config(), moab::ProcConfig::proc_rank(), procConfig, and moab::Interface::UNION.
Referenced by create_interface_sets(), resolve_shared_ents(), and moab::ParallelMergeMesh::TagSharedElements().
ErrorCode moab::ParallelComm::get_pstatus | ( | EntityHandle | entity, |
unsigned char & | pstatus_val | ||
) |
Get parallel status of an entity Returns the parallel status of an entity.
entity | The entity being queried |
pstatus_val | Parallel status of the entity |
Definition at line 5488 of file ParallelComm.cpp.
References ErrorCode, MB_CHK_SET_ERR, mbImpl, pstatus_tag(), and moab::Interface::tag_get_data().
Referenced by check_my_shared_handles().
ErrorCode moab::ParallelComm::get_pstatus_entities | ( | int | dim, |
unsigned char | pstatus_val, | ||
Range & | pstatus_ents | ||
) |
Get entities with the given pstatus bit(s) set Returns any entities whose pstatus tag value v satisfies (v & pstatus_val)
dim | Dimension of entities to be returned, or -1 if any |
pstatus_val | pstatus value of desired entities |
pstatus_ents | Entities returned from function |
Definition at line 5494 of file ParallelComm.cpp.
References moab::Range::begin(), dim, moab::Interface::dimension_from_handle(), moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_handle(), moab::Range::insert(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, pstatus_tag(), moab::Range::size(), and moab::Interface::tag_get_data().
Referenced by main().
|
private |
same as other version, except packs range into vector
Definition at line 1974 of file ParallelComm.cpp.
References moab::Range::begin(), moab::CREATE_HANDLE(), moab::Range::empty(), moab::Range::end(), ErrorCode, get_shared_proc_tags(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mbImpl, MBMAXTYPE, moab::Range::size(), and moab::Interface::tag_get_data().
|
private |
same as other version, except from_range and to_range should be different here
Definition at line 2055 of file ParallelComm.cpp.
References ErrorCode, get_remote_handles(), MB_CHK_SET_ERR, and moab::Range::size().
|
private |
replace handles in from_vec with corresponding handles on to_proc (by checking shared[p/h]_tag and shared[p/h]s_tag; if no remote handle and new_ents is non-null, substitute instead CREATE_HANDLE(MBMAXTYPE, index) where index is handle's position in new_ents
Definition at line 1875 of file ParallelComm.cpp.
References moab::CREATE_HANDLE(), ErrorCode, get_shared_proc_tags(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, mbImpl, MBMAXTYPE, moab::ProcConfig::proc_rank(), procConfig, and moab::Interface::tag_get_data().
ErrorCode moab::ParallelComm::get_remote_handles | ( | EntityHandle * | local_vec, |
EntityHandle * | rem_vec, | ||
int | num_ents, | ||
int | to_proc | ||
) |
Definition at line 1064 of file ParallelComm.cpp.
References moab::error(), ErrorCode, MB_CHK_ERR, and MB_SUCCESS.
Referenced by check_my_shared_handles(), get_remote_handles(), pack_entity_seq(), pack_sets(), pack_tag(), and settle_intersection_points().
|
private |
Definition at line 6518 of file ParallelComm.cpp.
References buffProcs, moab::Range::clear(), moab::TupleList::disableWriteAccess(), moab::Range::empty(), moab::TupleList::enableWriteAccess(), moab::Range::end(), ErrorCode, filter_pstatus(), get_ghosted_entities(), get_iface_entities(), moab::TupleList::get_n(), moab::TupleList::inc_n(), moab::TupleList::initialize(), MB_CHK_SET_ERR, MB_SUCCESS, moab::Range::merge(), PSTATUS_AND, PSTATUS_SHARED, moab::TupleList::buffer::reset(), size(), moab::TupleList::sort(), moab::subtract(), moab::TupleList::vi_wr, and moab::TupleList::vul_wr.
Referenced by exchange_ghost_cells().
ErrorCode moab::ParallelComm::get_shared_entities | ( | int | other_proc, |
Range & | shared_ents, | ||
int | dim = -1 , |
||
const bool | iface = false , |
||
const bool | owned_filter = false |
||
) |
Get shared entities of specified dimension If other_proc is -1, any shared entities are returned. If dim is -1, entities of all dimensions on interface are returned.
other_proc | Rank of processor for which interface entities are requested |
shared_ents | Entities returned from function |
dim | Dimension of interface entities requested |
iface | If true, return only entities on the interface |
owned_filter | If true, return only owned shared entities |
Definition at line 8801 of file ParallelComm.cpp.
References moab::Range::clear(), dim, ErrorCode, filter_pstatus(), iface, moab::Range::lower_bound(), MB_CHK_SET_ERR, MB_SUCCESS, moab::Range::merge(), PSTATUS_AND, PSTATUS_INTERFACE, PSTATUS_NOT, PSTATUS_NOT_OWNED, PSTATUS_SHARED, sharedEnts, moab::CN::TypeDimensionMap, and moab::Range::upper_bound().
Referenced by check_my_shared_handles(), moab::ParCommGraph::compute_partition(), main(), perform_laplacian_smoothing(), and perform_lloyd_relaxation().
|
inline |
return the tags used to indicate shared procs and handles
Definition at line 1574 of file ParallelComm.hpp.
References MB_SUCCESS, pstatus_tag(), sharedh_tag(), sharedhs_tag(), sharedp_tag(), and sharedps_tag().
Referenced by create_interface_sets(), get_remote_handles(), resolve_shared_ents(), and tag_shared_verts().
Get all shared sets.
Definition at line 8899 of file ParallelComm.cpp.
References moab::SharedSetData::get_shared_sets(), and sharedSetData.
Referenced by moab::WriteHDF5Parallel::create_meshset_tables().
|
inline |
Get the intersection or union of all sharing processors Get the intersection or union of all sharing processors. Processor set is cleared as part of this function.
entities | Entity list ptr |
num_entities | Number of entities |
procs | Processors returned |
op | Either Interface::UNION or Interface::INTERSECT |
Definition at line 1673 of file ParallelComm.hpp.
References entities, and get_sharing_data().
|
inline |
Get the shared processors/handles for an entity Same as other version but with int num_ps.
entity | Entity being queried |
ps | Pointer to sharing proc data |
hs | Pointer to shared proc handle data |
pstat | Reference to pstatus data returned from this function |
Definition at line 1685 of file ParallelComm.hpp.
References ErrorCode, get_sharing_data(), and MB_SUCCESS.
ErrorCode moab::ParallelComm::get_sharing_data | ( | const EntityHandle | entity, |
int * | ps, | ||
EntityHandle * | hs, | ||
unsigned char & | pstat, | ||
unsigned int & | num_ps | ||
) |
Get the shared processors/handles for an entity Get the shared processors/handles for an entity. Arrays must be large enough to receive data for all sharing procs. Does not include this proc if only shared with one other proc.
entity | Entity being queried |
ps | Pointer to sharing proc data |
hs | Pointer to shared proc handle data |
pstat | Reference to pstatus data returned from this function |
Definition at line 3007 of file ParallelComm.cpp.
References ErrorCode, MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, PSTATUS_MULTISHARED, PSTATUS_SHARED, pstatus_tag(), sharedh_tag(), sharedhs_tag(), sharedp_tag(), sharedps_tag(), and moab::Interface::tag_get_data().
Referenced by augment_default_sets_with_ghosts(), build_sharedhps_list(), check_clean_iface(), check_local_shared(), moab::ParCommGraph::compute_partition(), correct_thin_ghost_layers(), create_interface_sets(), delete_entities(), exchange_owned_meshs(), get_interface_sets(), get_part_neighbor_ids(), get_proc_nvecs(), get_sharing_data(), list_entities(), pack_shared_handles(), update_remote_data(), and update_remote_data_old().
ErrorCode moab::ParallelComm::get_sharing_data | ( | const Range & | entities, |
std::set< int > & | procs, | ||
int | op = Interface::INTERSECT |
||
) |
Get the intersection or union of all sharing processors Same as previous variant but with range as input.
Definition at line 2960 of file ParallelComm.cpp.
References entities, ErrorCode, get_sharing_data(), moab::Interface::INTERSECT, MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, PSTATUS_SHARED, and moab::Interface::UNION.
ErrorCode moab::ParallelComm::get_sharing_parts | ( | EntityHandle | entity, |
int | part_ids_out[MAX_SHARING_PROCS], | ||
int & | num_part_ids_out, | ||
EntityHandle | remote_handles[MAX_SHARING_PROCS] = 0 |
||
) |
Definition at line 8382 of file ParallelComm.cpp.
References ErrorCode, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, proc_config(), moab::ProcConfig::proc_rank(), PSTATUS_SHARED, pstatus_tag(), sharedh_tag(), sharedhs_tag(), sharedp_tag(), sharedps_tag(), and moab::Interface::tag_get_data().
|
private |
Get list of tags for which to exchange data.
Get tags and entities for which to exchange tag data. This function was originally part of 'pack_tags' requested with the 'all_possible_tags' parameter.
all_entities | Input. The set of entities for which data is to be communicated. |
all_tags | Output. Populated with the handles of tags to be sent. |
tag_ranges | Output. For each corresponding tag in all_tags, the subset of 'all_entities' for which a tag value has been set. |
Definition at line 3650 of file ParallelComm.cpp.
References moab::Range::empty(), ErrorCode, moab::intersect(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, sequenceManager, moab::Interface::tag_get_name(), and moab::Interface::tag_get_tags().
Referenced by pack_buffer().
|
private |
Definition at line 341 of file ParallelComm.cpp.
References add_pcomm(), buffProcs, errorHandler, localOwnedBuffs, MAX_SHARING_PROCS, mbImpl, myDebug, pcommID, moab::ProcConfig::proc_rank(), procConfig, moab::Interface::query_interface(), remoteOwnedBuffs, moab::Core::sequence_manager(), sequenceManager, and moab::DebugOutput::set_rank().
Referenced by ParallelComm().
|
inline |
Definition at line 673 of file ParallelComm.hpp.
References interfaceSets.
Referenced by check_clean_iface(), moab::NCHelperScrip::create_mesh(), and get_interface_sets().
|
inline |
Definition at line 677 of file ParallelComm.hpp.
References interfaceSets.
|
private |
returns true if the set is an interface shared with to_proc
Definition at line 5556 of file ParallelComm.cpp.
References ErrorCode, MAX_SHARING_PROCS, MB_SUCCESS, mbImpl, sharedp_tag(), sharedps_tag(), and moab::Interface::tag_get_data().
Referenced by get_ghosted_entities(), and get_iface_entities().
ErrorCode moab::ParallelComm::list_entities | ( | const EntityHandle * | ents, |
int | num_ents | ||
) |
Definition at line 2573 of file ParallelComm.cpp.
References ErrorCode, moab::Interface::get_coords(), get_sharing_data(), moab::Interface::id_from_handle(), moab::Interface::list_entities(), MAX_SHARING_PROCS, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, moab::Range::print(), PSTATUS_GHOST, PSTATUS_INTERFACE, PSTATUS_MULTISHARED, PSTATUS_NOT_OWNED, PSTATUS_SHARED, and sharedEnts.
Referenced by build_sharedhps_list(), check_local_shared(), check_my_shared_handles(), list_entities(), moab::ReadParallel::load_file(), and moab::ScdInterface::tag_shared_vertices().
Definition at line 2621 of file ParallelComm.cpp.
References moab::Range::begin(), moab::Range::end(), list_entities(), and MB_SUCCESS.
|
private |
Definition at line 3450 of file ParallelComm.cpp.
ErrorCode moab::ParallelComm::pack_buffer | ( | Range & | orig_ents, |
const bool | adjacencies, | ||
const bool | tags, | ||
const bool | store_remote_handles, | ||
const int | to_proc, | ||
Buffer * | buff, | ||
TupleList * | entprocs = NULL , |
||
Range * | allsent = NULL |
||
) |
public 'cuz we want to unit test these externally
Definition at line 1418 of file ParallelComm.cpp.
References moab::ParallelComm::Buffer::buff_ptr, moab::ParallelComm::Buffer::check_space(), ErrorCode, get_tag_send_list(), MB_CHK_SET_ERR, pack_entities(), moab::PACK_INT(), pack_sets(), pack_tags(), and moab::ParallelComm::Buffer::set_stored_size().
Referenced by broadcast_entities(), exchange_owned_mesh(), scatter_entities(), send_entities(), and moab::ParCommGraph::send_mesh_parts().
ErrorCode moab::ParallelComm::pack_entities | ( | Range & | entities, |
Buffer * | buff, | ||
const bool | store_remote_handles, | ||
const int | to_proc, | ||
const bool | is_iface, | ||
TupleList * | entprocs = NULL , |
||
Range * | allsent = NULL |
||
) |
Definition at line 1582 of file ParallelComm.cpp.
References moab::Range::begin(), moab::ParallelComm::Buffer::buff_ptr, build_sharedhps_list(), moab::ParallelComm::Buffer::check_space(), moab::Range::clear(), moab::Range::empty(), moab::EntitySequence::end_handle(), entities, moab::CN::EntityTypeName(), ErrorCode, estimate_ents_buffer_size(), moab::SequenceManager::find(), moab::Interface::get_coords(), moab::TupleList::get_n(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MBENTITYSET, mbImpl, MBMAXTYPE, MBVERTEX, myDebug, moab::ElementSequence::nodes_per_element(), moab::PACK_DBLS(), moab::PACK_EH(), pack_entity_seq(), moab::PACK_INT(), moab::PACK_INTS(), pstatus_tag(), moab::Range::rbegin(), sequenceManager, moab::ParallelComm::Buffer::set_stored_size(), sharedp_tag(), moab::Range::size(), moab::Interface::tag_get_data(), moab::DebugOutput::tprintf(), moab::EntitySequence::type(), moab::TYPE_FROM_HANDLE(), moab::TupleList::vi_rd, and moab::TupleList::vul_rd.
Referenced by exchange_ghost_cells(), and pack_buffer().
|
private |
pack a range of entities with equal # verts per entity, along with the range on the sending proc
Definition at line 1836 of file ParallelComm.cpp.
References moab::Range::begin(), moab::ParallelComm::Buffer::buff_ptr, moab::ParallelComm::Buffer::check_space(), moab::Range::end(), moab::CN::EntityTypeName(), ErrorCode, moab::Interface::get_connectivity(), moab::ParallelComm::Buffer::get_current_size(), get_remote_handles(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, myDebug, moab::PACK_EH(), moab::PACK_INT(), moab::Range::size(), moab::DebugOutput::tprintf(), and moab::TYPE_FROM_HANDLE().
Referenced by pack_entities().
|
private |
pack a range map with keys in this_range and values a contiguous series of handles starting at actual_start
Definition at line 3136 of file ParallelComm.cpp.
References moab::Range::const_pair_begin(), moab::Range::const_pair_end(), moab::RangeMap< KeyType, ValType, NullVal >::insert(), and MB_SUCCESS.
ErrorCode moab::ParallelComm::pack_remote_handles | ( | std::vector< EntityHandle > & | L1hloc, |
std::vector< EntityHandle > & | L1hrem, | ||
std::vector< int > & | procs, | ||
unsigned int | to_proc, | ||
Buffer * | buff | ||
) |
Definition at line 7370 of file ParallelComm.cpp.
References moab::ParallelComm::Buffer::buff_ptr, moab::ParallelComm::Buffer::check_space(), MB_SUCCESS, moab::PACK_EH(), moab::PACK_INT(), moab::PACK_INTS(), and moab::ParallelComm::Buffer::set_stored_size().
Referenced by exchange_ghost_cells(), exchange_owned_mesh(), recv_entities(), and recv_messages().
|
private |
Definition at line 3149 of file ParallelComm.cpp.
References moab::Range::begin(), moab::ParallelComm::Buffer::buff_ptr, moab::ParallelComm::Buffer::check_space(), moab::Range::empty(), moab::Range::end(), entities, ErrorCode, estimate_sets_buffer_size(), moab::Interface::get_child_meshsets(), moab::Interface::get_entities_by_handle(), moab::Interface::get_meshset_options(), moab::Interface::get_parent_meshsets(), get_remote_handles(), moab::ID_FROM_HANDLE(), MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_NOT_FOUND, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, mbImpl, MBMAXTYPE, myDebug, moab::Interface::num_child_meshsets(), moab::Interface::num_parent_meshsets(), moab::PACK_EH(), moab::PACK_INT(), moab::PACK_INTS(), moab::PACK_RANGE(), moab::PACK_VOID(), moab::RANGE_SIZE(), moab::ParallelComm::Buffer::set_stored_size(), moab::Range::size(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::DebugOutput::tprintf(), and moab::TYPE_FROM_HANDLE().
Referenced by pack_buffer().
ErrorCode moab::ParallelComm::pack_shared_handles | ( | std::vector< std::vector< SharedEntityData > > & | send_data | ) |
Definition at line 8441 of file ParallelComm.cpp.
References buffProcs, ErrorCode, get_buffers(), get_owner(), get_sharing_data(), moab::ParallelComm::SharedEntityData::local, MAX_SHARING_PROCS, MB_SUCCESS, moab::ParallelComm::SharedEntityData::owner, proc_config(), moab::ParallelComm::SharedEntityData::remote, and sharedEnts.
Referenced by check_all_shared_handles().
|
private |
Serialize tag data.
source_tag | The tag for which data will be serialized |
destination_tag | Tag in which to store unpacked tag data. Typically the same as source_tag. |
entities | The entities for which tag values will be serialized |
whole_range | Calculate entity indices as location in this range |
buff_ptr | Input/Output: As input, pointer to the start of the buffer in which to serialize data. As output, the position just passed the serialized data. |
count_out | Output: The required buffer size, in bytes. |
store_handles | The data for each tag is preceded by a list of EntityHandles designating the entity each of the subsequent tag values corresponds to. This value may be one of: 1) If store_handles == false: An invalid handle composed of {MBMAXTYPE,idx}, where idx is the position of the entity in "whole_range". 2) If store_hanldes == true and a valid remote handle exists, the remote handle. 3) If store_hanldes == true and no valid remote handle is defined for the entity, the same as 1). |
to_proc | If 'store_handles' is true, the processor rank for which to store the corresponding remote entity handles. |
Definition at line 3556 of file ParallelComm.cpp.
References moab::ParallelComm::Buffer::buff_ptr, moab::ParallelComm::Buffer::check_space(), ErrorCode, moab::TagInfo::get_data_type(), moab::TagInfo::get_default_value(), moab::TagInfo::get_default_value_size(), moab::TagInfo::get_name(), get_remote_handles(), moab::TagInfo::get_size(), moab::DebugOutput::get_verbosity(), MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TYPE_OPAQUE, MB_TYPE_OUT_OF_RANGE, MB_VARIABLE_LENGTH, mbImpl, myDebug, moab::PACK_BYTES(), moab::PACK_EH(), moab::PACK_INT(), moab::PACK_INTS(), moab::PACK_VOID(), PC, moab::Range::print(), moab::Range::size(), moab::TagInfo::size_from_data_type(), moab::Interface::tag_get_by_ptr(), moab::Interface::tag_get_data(), moab::Interface::tag_get_type(), TagType, and moab::DebugOutput::tprintf().
Referenced by pack_tags().
|
private |
Serialize entity tag data.
This function operates in two passes. The first phase, specified by 'just_count == true' calculates the necessary buffer size for the serialized data. The second phase writes the actual binary serialized representation of the data to the passed buffer.
\NOTE First two arguments are not used. (Legacy interface?)
entities | NOT USED |
start_rit | NOT USED |
whole_range | Should be the union of the sets of entities for which tag values are to be serialized. Also specifies ordering for indexes for tag values and serves as the superset from which to compose entity lists from individual tags if just_count and all_possible_tags are both true. |
buff_ptr | Buffer into which to write binary serialized data |
count | Output: The size of the serialized data is added to this parameter. NOTE: Should probably initialize to zero before calling. |
just_count | If true, just calculate the buffer size required to hold the serialized data. Will also append to 'all_tags' and 'tag_ranges' if all_possible_tags == true. |
store_handles | The data for each tag is preceded by a list of EntityHandles designating the entity each of the subsequent tag values corresponds to. This value may be one of: 1) If store_handles == false: An invalid handle composed of {MBMAXTYPE,idx}, where idx is the position of the entity in "whole_range". 2) If store_hanldes == true and a valid remote handle exists, the remote handle. 3) If store_hanldes == true and no valid remote handle is defined for the entity, the same as 1). |
to_proc | If 'store_handles' is true, the processor rank for which to store the corresponding remote entity handles. |
all_tags | List of tags to write |
tag_ranges | List of entities to serialize tag data, one for each corresponding tag handle in 'all_tags. |
Definition at line 3470 of file ParallelComm.cpp.
References moab::ParallelComm::Buffer::buff_ptr, moab::ParallelComm::Buffer::check_space(), entities, ErrorCode, MB_SUCCESS, myDebug, moab::PACK_INT(), pack_tag(), packed_tag_size(), moab::ParallelComm::Buffer::set_stored_size(), and moab::DebugOutput::tprintf().
Referenced by exchange_tags(), pack_buffer(), and reduce_tags().
|
private |
Calculate buffer size required to pack tag data.
source_tag | The tag for which data will be serialized |
entities | The entities for which tag values will be serialized |
count_out | Output: The required buffer size, in bytes. |
Definition at line 3513 of file ParallelComm.cpp.
References ErrorCode, errorHandler, moab::TagInfo::get_data(), moab::TagInfo::get_default_value(), moab::TagInfo::get_default_value_size(), moab::TagInfo::get_name(), moab::TagInfo::get_size(), MB_CHK_SET_ERR, MB_SUCCESS, MB_VARIABLE_LENGTH, sequenceManager, and moab::Range::size().
Referenced by pack_tags().
|
inline |
Definition at line 703 of file ParallelComm.hpp.
References partition_tag().
Referenced by create_part().
|
inline |
return partition, interface set ranges
Definition at line 665 of file ParallelComm.hpp.
References partitionSets.
Referenced by collective_sync_partition(), create_part(), moab::ReadParallel::create_partition_sets(), moab::ReadParallel::delete_nonlocal_entities(), destroy_part(), get_part_handle(), moab::ReadParallel::load_file(), set_partitioning(), and moab::ScdInterface::tag_shared_vertices().
|
inline |
Definition at line 669 of file ParallelComm.hpp.
References partitionSets.
Tag moab::ParallelComm::partition_tag | ( | ) |
return partitions set tag
return partition set tag
Definition at line 7975 of file ParallelComm.cpp.
References ErrorCode, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, mbImpl, PARALLEL_PARTITION_TAG_NAME, partitionTag, and moab::Interface::tag_get_handle().
Referenced by part_tag().
return pcomm tag; static because might not have a pcomm before going to look for one on the interface
return pcomm tag; passes in impl 'cuz this is a static function
Definition at line 7989 of file ParallelComm.cpp.
References ErrorCode, MAX_SHARING_PROCS, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_OPAQUE, PARALLEL_COMM_TAG_NAME, and moab::Interface::tag_get_handle().
Referenced by add_pcomm(), get_all_pcomm(), get_pcomm(), remove_pcomm(), and set_partitioning().
ErrorCode moab::ParallelComm::post_irecv | ( | std::vector< unsigned int > & | exchange_procs | ) |
Post "MPI_Irecv" before meshing.
exchange_procs | processor vector exchanged |
Definition at line 6768 of file ParallelComm.cpp.
References buffProcs, get_buffers(), INITIAL_BUFF_SIZE, moab::MB_MESG_ENTS_SIZE, MB_SET_ERR, MB_SUCCESS, PRINT_DEBUG_IRECV, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, recvRemotehReqs, recvReqs, remoteOwnedBuffs, reset_all_buffers(), and sendReqs.
ErrorCode moab::ParallelComm::post_irecv | ( | std::vector< unsigned int > & | shared_procs, |
std::set< unsigned int > & | recv_procs | ||
) |
Definition at line 6801 of file ParallelComm.cpp.
References buffProcs, get_buffers(), INITIAL_BUFF_SIZE, localOwnedBuffs, moab::MB_MESG_ENTS_SIZE, MB_SET_ERR, MB_SUCCESS, PRINT_DEBUG_IRECV, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, recvRemotehReqs, recvReqs, remoteOwnedBuffs, reset_all_buffers(), and sendReqs.
|
private |
Definition at line 2357 of file ParallelComm.cpp.
References moab::CN::EntityTypeName(), moab::ID_FROM_HANDLE(), moab::CN::MAX_NODES_PER_ELEMENT, moab::MB_MESG_ENTS_LARGE, moab::MB_MESG_ENTS_SIZE, moab::MB_MESG_REMOTEH_LARGE, moab::MB_MESG_REMOTEH_SIZE, moab::MB_MESG_TAGS_LARGE, moab::MB_MESG_TAGS_SIZE, MB_SUCCESS, MB_TYPE_BIT, MB_TYPE_DOUBLE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, MB_VARIABLE_LENGTH, MBENTITYSET, MBMAXTYPE, MBVERTEX, moab::ProcConfig::proc_rank(), procConfig, moab::TYPE_FROM_HANDLE(), moab::UNPACK_DBL(), moab::UNPACK_DBLS(), moab::UNPACK_EH(), moab::UNPACK_INT(), moab::UNPACK_INTS(), and moab::UNPACK_TYPE().
Referenced by exchange_ghost_cells(), exchange_owned_mesh(), and recv_entities().
|
private |
Definition at line 255 of file ParallelComm.cpp.
References moab::MB_MESG_REMOTEH_ACK, moab::MB_MESG_TAGS_ACK, myDebug, moab::DebugOutput::printf(), and moab::DebugOutput::tprintf().
|
private |
Definition at line 250 of file ParallelComm.cpp.
References myDebug, and moab::DebugOutput::tprintf().
|
private |
Definition at line 266 of file ParallelComm.cpp.
References moab::DebugOutput::get_verbosity(), myDebug, and moab::DebugOutput::tprintf().
|
private |
Definition at line 278 of file ParallelComm.cpp.
References moab::DebugOutput::get_verbosity(), moab::MB_MESG_REMOTEH_ACK, moab::MB_MESG_TAGS_ACK, myDebug, moab::DebugOutput::print(), moab::DebugOutput::printf(), and moab::DebugOutput::tprintf().
void moab::ParallelComm::print_pstatus | ( | unsigned char | pstat | ) |
print contents of pstatus value in human-readable form to std::cut
Definition at line 9339 of file ParallelComm.cpp.
References print_pstatus().
void moab::ParallelComm::print_pstatus | ( | unsigned char | pstat, |
std::string & | ostr | ||
) |
print contents of pstatus value in human-readable form
Definition at line 9316 of file ParallelComm.cpp.
References ppstat, PSTATUS_GHOST, PSTATUS_INTERFACE, PSTATUS_MULTISHARED, PSTATUS_NOT_OWNED, and PSTATUS_SHARED.
Referenced by print_pstatus().
|
inline |
Get proc config for this communication object.
Definition at line 639 of file ParallelComm.hpp.
References procConfig.
|
inline |
Get proc config for this communication object.
Definition at line 633 of file ParallelComm.hpp.
References procConfig.
Referenced by check_clean_iface(), moab::NCWriteGCRM::collect_mesh_info(), moab::ScdNCWriteHelper::collect_mesh_info(), moab::NCWriteHOMME::collect_mesh_info(), moab::NCWriteMPAS::collect_mesh_info(), collective_sync_partition(), comm(), moab::WriteHDF5Parallel::communicate_shared_set_data(), moab::WriteHDF5Parallel::communicate_shared_set_ids(), moab::ParCommGraph::compute_partition(), moab::WriteHDF5Parallel::create_dataset(), create_interface_sets(), moab::NCHelperDomain::create_mesh(), moab::NCHelperESMF::create_mesh(), moab::NCHelperGCRM::create_mesh(), moab::NCHelperHOMME::create_mesh(), moab::NCHelperMPAS::create_mesh(), moab::NCHelperScrip::create_mesh(), moab::WriteHDF5Parallel::create_meshset_tables(), create_part(), moab::ReadParallel::create_partition_sets(), moab::WriteHDF5Parallel::create_tag_tables(), moab::WriteHDF5Parallel::debug_barrier_line(), moab::ReadParallel::delete_nonlocal_entities(), moab::Coupler::do_normalization(), moab::WriteHDF5Parallel::exchange_file_ids(), moab::ReadHDF5::find_sets_containing(), gather_data(), moab::ParallelData::get_interface_sets(), moab::Coupler::get_matching_entities(), get_owner_handle(), get_owning_part(), get_part_handle(), get_part_id(), get_proc_nvecs(), moab::ScdInterface::get_shared_vertices(), get_sharing_parts(), iMOAB_SetDoubleTagStorageWithGid(), moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), moab::NCHelperFV::init_mesh_vals(), moab::Coupler::initialize_tree(), moab::Coupler::interpolate(), moab::DataCoupler::interpolate(), moab::ReadParallel::load_file(), moab::ReadDamsel::load_file(), moab::Coupler::locate_points(), main(), moab::WriteHDF5Parallel::negotiate_type_list(), pack_shared_handles(), moab::WriteHDF5Parallel::parallel_create_file(), moab::ReadHDF5::print_times(), moab::WriteHDF5Parallel::print_times(), rank(), moab::ReadHDF5::read_all_set_meta(), moab::ReadParallel::ReadParallel(), resolve_shared_ents(), resolve_shared_sets(), moab::ReadHDF5::set_up_read(), size(), moab::ScdInterface::tag_shared_vertices(), tag_shared_verts(), update_remote_data_old(), and moab::NCWriteHelper::write_set_variables().
Tag moab::ParallelComm::pstatus_tag | ( | ) |
return pstatus tag
Definition at line 7961 of file ParallelComm.cpp.
References ErrorCode, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_OPAQUE, mbImpl, PARALLEL_STATUS_TAG_NAME, pstatusTag, and moab::Interface::tag_get_handle().
Referenced by assign_global_ids(), check_clean_iface(), check_sent_ents(), clean_shared_tags(), correct_thin_ghost_layers(), filter_pstatus(), get_owner_handle(), get_owning_part(), get_pstatus(), get_pstatus_entities(), get_shared_proc_tags(), get_sharing_data(), get_sharing_parts(), pack_entities(), set_pstatus_entities(), set_sharing_data(), tag_iface_entities(), and update_remote_data_old().
|
inline |
Definition at line 644 of file ParallelComm.hpp.
References proc_config(), and moab::ProcConfig::proc_rank().
Referenced by augment_default_sets_with_ghosts(), check_my_shared_handles(), moab::ParCommGraph::compute_partition(), moab::ScdInterface::construct_box(), correct_thin_ghost_layers(), gather_data(), iMOAB_DefineTagStorage(), iMOAB_DeregisterApplication(), moab::ReadParallel::load_file(), perform_laplacian_smoothing(), perform_lloyd_relaxation(), moab::LloydSmoother::perform_smooth(), resolve_shared_ents(), RuntimeContext::RuntimeContext(), set_sharing_data(), unpack_entities(), and update_remote_data().
|
private |
process incoming message; if longer than the initial size, post recv for next part then send ack; if ack, send second part; else indicate that we're done and buffer is ready for processing
Definition at line 6139 of file ParallelComm.cpp.
References moab::ParallelComm::Buffer::alloc_size, moab::ParallelComm::Buffer::get_stored_size(), INITIAL_BUFF_SIZE, MB_SET_ERR, MB_SUCCESS, moab::ParallelComm::Buffer::mem_ptr, PRINT_DEBUG_IRECV, PRINT_DEBUG_ISEND, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, moab::ParallelComm::Buffer::reserve(), and moab::ParallelComm::Buffer::reset_ptr().
Referenced by exchange_ghost_cells(), exchange_owned_mesh(), exchange_tags(), recv_entities(), recv_messages(), recv_remote_handle_messages(), reduce_tags(), send_recv_entities(), and settle_intersection_points().
ErrorCode moab::ParallelComm::recv_entities | ( | const int | from_proc, |
const bool | store_remote_handles, | ||
const bool | is_iface, | ||
Range & | final_ents, | ||
int & | incomming1, | ||
int & | incoming2, | ||
std::vector< std::vector< EntityHandle > > & | L1hloc, | ||
std::vector< std::vector< EntityHandle > > & | L1hrem, | ||
std::vector< std::vector< int > > & | L1p, | ||
std::vector< EntityHandle > & | L2hloc, | ||
std::vector< EntityHandle > & | L2hrem, | ||
std::vector< unsigned int > & | L2p, | ||
std::vector< MPI_Request > & | recv_remoteh_reqs, | ||
bool | wait_all = true |
||
) |
Receive entities from another processor, optionally waiting until it's done.
Receive entities from another processor, with adjs, sets, and tags. If store_remote_handles is true, this call sends back handles assigned to the entities received.
from_proc | Source processor |
store_remote_handles | If true, send message with new entity handles to source processor (currently unsupported) |
final_ents | Range containing all entities received |
incoming | keep track if any messages are coming to this processor (newly added) |
wait_all | If true, wait until all messages received/sent complete |
Definition at line 1075 of file ParallelComm.cpp.
References get_buffers(), INITIAL_BUFF_SIZE, moab::MB_MESG_ENTS_SIZE, MB_SET_ERR, PRINT_DEBUG_IRECV, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, recv_messages(), recvReqs, and remoteOwnedBuffs.
ErrorCode moab::ParallelComm::recv_entities | ( | std::set< unsigned int > & | recv_procs, |
int | incoming1, | ||
int | incoming2, | ||
const bool | store_remote_handles, | ||
const bool | migrate = false |
||
) |
Definition at line 1111 of file ParallelComm.cpp.
References ackbuff, assign_entities_part(), buffProcs, ErrorCode, get_buffers(), moab::DebugOutput::get_verbosity(), INITIAL_BUFF_SIZE, localOwnedBuffs, MB_CHK_SET_ERR, moab::MB_MESG_ENTS_SIZE, moab::MB_MESG_REMOTEH_SIZE, MB_SET_ERR, MB_SUCCESS, MPE_Log_event, moab::msgs, myDebug, pack_remote_handles(), print_buffer(), PRINT_DEBUG_IRECV, PRINT_DEBUG_RECD, PRINT_DEBUG_WAITANY, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, recv_buffer(), recvRemotehReqs, recvReqs, remoteOwnedBuffs, send_buffer(), sendReqs, moab::DebugOutput::tprintf(), unpack_buffer(), and unpack_remote_handles().
ErrorCode moab::ParallelComm::recv_messages | ( | const int | from_proc, |
const bool | store_remote_handles, | ||
const bool | is_iface, | ||
Range & | final_ents, | ||
int & | incoming1, | ||
int & | incoming2, | ||
std::vector< std::vector< EntityHandle > > & | L1hloc, | ||
std::vector< std::vector< EntityHandle > > & | L1hrem, | ||
std::vector< std::vector< int > > & | L1p, | ||
std::vector< EntityHandle > & | L2hloc, | ||
std::vector< EntityHandle > & | L2hrem, | ||
std::vector< unsigned int > & | L2p, | ||
std::vector< MPI_Request > & | recv_remoteh_reqs | ||
) |
Receive messages from another processor in while loop.
Receive messages from another processor.
from_proc | Source processor |
store_remote_handles | If true, send message with new entity handles to source processor (currently unsupported) |
final_ents | Range containing all entities received |
incoming | keep track if any messages are coming to this processor (newly added) |
Definition at line 1292 of file ParallelComm.cpp.
References buffProcs, ErrorCode, get_buffers(), localOwnedBuffs, MB_CHK_SET_ERR, moab::MB_MESG_ENTS_SIZE, moab::MB_MESG_REMOTEH_SIZE, moab::MB_MESG_TAGS_SIZE, MB_SET_ERR, MB_SUCCESS, pack_remote_handles(), PRINT_DEBUG_RECD, PRINT_DEBUG_WAITANY, moab::ProcConfig::proc_rank(), procConfig, recv_buffer(), recvReqs, remoteOwnedBuffs, send_buffer(), sendReqs, and unpack_buffer().
Referenced by recv_entities().
ErrorCode moab::ParallelComm::recv_remote_handle_messages | ( | const int | from_proc, |
int & | incoming2, | ||
std::vector< EntityHandle > & | L2hloc, | ||
std::vector< EntityHandle > & | L2hrem, | ||
std::vector< unsigned int > & | L2p, | ||
std::vector< MPI_Request > & | recv_remoteh_reqs | ||
) |
Definition at line 1370 of file ParallelComm.cpp.
References buffProcs, ErrorCode, get_buffers(), localOwnedBuffs, MB_CHK_SET_ERR, moab::MB_MESG_REMOTEH_SIZE, MB_SET_ERR, MB_SUCCESS, PRINT_DEBUG_RECD, PRINT_DEBUG_WAITANY, moab::ProcConfig::proc_rank(), procConfig, recv_buffer(), remoteOwnedBuffs, sendReqs, and unpack_remote_handles().
|
private |
|
inline |
Perform data reduction operation for all shared and ghosted entities Same as std::vector variant except for one tag specified by name.
tag_name | Name of tag to be reduced |
mpi_op | Operation type |
entities | Entities on which reduction will be made; if empty, operates on all shared entities |
Definition at line 1611 of file ParallelComm.hpp.
References entities, ErrorCode, MB_SUCCESS, MB_TAG_ANY, MB_TAG_NOT_FOUND, MB_TYPE_OPAQUE, mbImpl, reduce_tags(), and moab::Interface::tag_get_handle().
ErrorCode moab::ParallelComm::reduce_tags | ( | const std::vector< Tag > & | src_tags, |
const std::vector< Tag > & | dst_tags, | ||
const MPI_Op | mpi_op, | ||
const Range & | entities | ||
) |
Perform data reduction operation for all shared and ghosted entities This function should be called collectively over the communicator for this ParallelComm. If this version is called, all ghosted/shared entities should have a value for this tag (or the tag should have a default value). Operation is any MPI_Op, with result stored in destination tag.
src_tags | Vector of tag handles to be reduced |
dst_tags | Vector of tag handles in which the answer will be stored |
mpi_op | Operation type |
entities | Entities on which reduction will be made; if empty, operates on all shared entities |
Definition at line 7713 of file ParallelComm.cpp.
References moab::Range::begin(), buffProcs, moab::Range::empty(), entities, ErrorCode, filter_pstatus(), get_comm_procs(), moab::Interface::get_entities_by_type_and_tag(), moab::DebugOutput::get_verbosity(), INITIAL_BUFF_SIZE, moab::intersect(), localOwnedBuffs, MAX_SHARING_PROCS, MB_CHK_SET_ERR, moab::MB_MESG_TAGS_SIZE, MB_SET_ERR, MB_SUCCESS, MB_TYPE_BIT, MB_TYPE_DOUBLE, MB_TYPE_INTEGER, mbImpl, MBMAXTYPE, myDebug, pack_tags(), PRINT_DEBUG_IRECV, PRINT_DEBUG_RECD, PRINT_DEBUG_WAITANY, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, PSTATUS_AND, PSTATUS_SHARED, recv_buffer(), remoteOwnedBuffs, reset_all_buffers(), send_buffer(), sendReqs, sharedEnts, moab::Interface::tag_get_bytes(), moab::Interface::tag_get_data(), moab::Interface::tag_get_data_type(), moab::Interface::tag_get_default_value(), moab::Interface::tag_set_data(), moab::DebugOutput::tprintf(), and unpack_tags().
Referenced by iMOAB_ReduceTagsMax(), main(), and reduce_tags().
|
inline |
Perform data reduction operation for all shared and ghosted entities Same as std::vector variant except for one tag specified by handle.
tag_name | Name of tag to be reduced |
mpi_op | Operation type |
entities | Entities on which reduction will be made; if empty, operates on all shared entities |
Definition at line 1624 of file ParallelComm.hpp.
References entities, and reduce_tags().
|
private |
Definition at line 3886 of file ParallelComm.cpp.
References ErrorCode, MB_SUCCESS, MB_TYPE_BIT, MB_TYPE_DOUBLE, and MB_TYPE_INTEGER.
Referenced by unpack_tags().
remove entities to the input processor part
Definition at line 7310 of file ParallelComm.cpp.
References entities, ErrorCode, get_part_handle(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, and moab::Interface::remove_entities().
Referenced by exchange_owned_mesh().
|
private |
remove a pc from the iface instance tag PARALLEL_COMM
Definition at line 400 of file ParallelComm.cpp.
References ErrorCode, MAX_SHARING_PROCS, MB_SUCCESS, mbImpl, pcomm_tag(), moab::Interface::tag_get_data(), and moab::Interface::tag_set_data().
Referenced by ~ParallelComm().
|
inline |
reset message buffers to their initial state
Definition at line 1548 of file ParallelComm.hpp.
References localOwnedBuffs, and remoteOwnedBuffs.
Referenced by exchange_ghost_cells(), exchange_owned_mesh(), exchange_tags(), post_irecv(), reduce_tags(), send_recv_entities(), and settle_intersection_points().
ErrorCode moab::ParallelComm::resolve_shared_ents | ( | EntityHandle | this_set, |
int | resolve_dim = 3 , |
||
int | shared_dim = -1 , |
||
const Tag * | id_tag = 0 |
||
) |
Resolve shared entities between processors.
Same as resolve_shared_ents(Range&), except works for all entities in instance of dimension dim.
If shared_dim is input as -1 or not input, a value one less than the maximum dimension of entities is used.
dim | Dimension of entities in the partition |
shared_dim | Maximum dimension of shared entities to look for |
Definition at line 3912 of file ParallelComm.cpp.
References moab::Range::begin(), moab::Interface::dimension_from_handle(), moab::Range::empty(), moab::Range::end(), moab::Range::erase(), ErrorCode, moab::GeomUtil::first(), moab::Interface::get_entities_by_handle(), moab::Range::lower_bound(), MB_SUCCESS, mbImpl, moab::Range::merge(), myDebug, partitionSets, moab::Interface::query_interface(), moab::Range::rbegin(), resolve_shared_ents(), sharedEnts, moab::ScdInterface::tag_shared_vertices(), moab::DebugOutput::tprintf(), moab::CN::TypeDimensionMap, and moab::Range::upper_bound().
ErrorCode moab::ParallelComm::resolve_shared_ents | ( | EntityHandle | this_set, |
Range & | proc_ents, | ||
int | resolve_dim = -1 , |
||
int | shared_dim = -1 , |
||
Range * | skin_ents = NULL , |
||
const Tag * | id_tag = 0 |
||
) |
Resolve shared entities between processors.
Resolve shared entities between processors for entities in proc_ents, by comparing global id tag values on vertices on skin of elements in proc_ents. Shared entities are assigned a tag that's either PARALLEL_SHARED_PROC_TAG_NAME, which is 1 integer in length, or PARALLEL_SHARED_PROCS_TAG_NAME, whose length depends on the maximum number of sharing processors. Values in these tags denote the ranks of sharing processors, and the list ends with the value -1.
If shared_dim is input as -1 or not input, a value one less than the maximum dimension of entities in proc_ents is used.
proc_ents | Entities for which to resolve shared entities |
shared_dim | Maximum dimension of shared entities to look for |
Definition at line 3967 of file ParallelComm.cpp.
References moab::Interface::add_entities(), assign_global_ids(), moab::Range::begin(), check_all_shared_handles(), create_iface_pc_links(), create_interface_sets(), moab::ProcConfig::crystal_router(), define_mpe(), moab::Interface::dimension_from_handle(), moab::Range::empty(), moab::TupleList::enableWriteAccess(), ErrorCode, exchange_ghost_cells(), moab::Skinner::find_skin(), moab::Interface::get_adjacencies(), get_interface_procs(), moab::TupleList::get_n(), get_proc_nvecs(), get_shared_proc_tags(), moab::DebugOutput::get_verbosity(), GLOBAL_ID_TAG_NAME, moab::TupleList::inc_n(), moab::TupleList::initialize(), moab::gs_data::initialize(), MAX_SHARING_PROCS, MB_ALREADY_ALLOCATED, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, mbImpl, MPE_Log_event, myDebug, moab::DebugOutput::print(), moab::DebugOutput::printf(), proc_config(), moab::ProcConfig::proc_rank(), procConfig, moab::TupleList::buffer::reset(), moab::TupleList::reset(), moab::gs_data::reset(), moab::Range::size(), size(), moab::TupleList::sort(), moab::Interface::tag_get_bytes(), moab::Interface::tag_get_data(), moab::Interface::tag_get_data_type(), moab::Interface::tag_get_handle(), tag_shared_verts(), moab::DebugOutput::tprintf(), moab::Interface::UNION, moab::TupleList::vi_wr, and moab::TupleList::vul_wr.
Referenced by moab::ReadParallel::load_file(), and resolve_shared_ents().
|
static |
Definition at line 4260 of file ParallelComm.cpp.
References create_interface_sets(), moab::TupleList::enableWriteAccess(), ErrorCode, moab::Skinner::find_skin(), moab::Interface::get_adjacencies(), moab::Interface::get_entities_by_dimension(), get_interface_procs(), get_moab(), moab::TupleList::get_n(), moab::Interface::globalId_tag(), moab::TupleList::inc_n(), moab::TupleList::initialize(), MB_SUCCESS, PSTATUS_INTERFACE, PSTATUS_NOT_OWNED, rank(), moab::TupleList::buffer::reset(), moab::TupleList::reset(), size(), moab::TupleList::sort(), moab::Interface::tag_get_data(), moab::Interface::UNION, update_remote_data(), moab::TupleList::vi_rd, moab::TupleList::vi_wr, moab::TupleList::vul_rd, and moab::TupleList::vul_wr.
ErrorCode moab::ParallelComm::resolve_shared_sets | ( | EntityHandle | this_set, |
const Tag * | id_tag = 0 |
||
) |
Remove shared sets.
Generates list of candidate sets using from those (directly) contained in passed set and passes them to the other version of resolve_shared_sets
.
this_set | Set directly containing candidate sets (e.g. file set) |
id_tag | Tag containing global IDs for entity sets. |
Definition at line 4500 of file ParallelComm.cpp.
References moab::Range::begin(), moab::Range::clear(), DIRICHLET_SET_TAG_NAME, moab::Range::empty(), moab::Range::end(), moab::Range::erase(), ErrorCode, filter_pstatus(), GEOM_DIMENSION_TAG_NAME, moab::Interface::get_child_meshsets(), moab::Interface::get_entities_by_handle(), moab::Interface::get_entities_by_type(), moab::Interface::get_entities_by_type_and_tag(), moab::Interface::globalId_tag(), moab::Range::insert(), moab::intersect(), moab::Range::lower_bound(), MATERIAL_SET_TAG_NAME, MB_SUCCESS, MB_TAG_ANY, MB_TYPE_INTEGER, MBENTITYSET, mbImpl, moab::Range::merge(), NEUMANN_SET_TAG_NAME, PARALLEL_PARTITION_TAG_NAME, PSTATUS_OR, PSTATUS_SHARED, moab::subtract(), moab::Range::swap(), moab::Interface::tag_get_handle(), and moab::Interface::UNION.
Referenced by moab::ReadParallel::load_file().
Remove shared sets.
Use values of id_tag to match sets across processes and populate sharing data for sets.
candidate_sets | Sets to consider as potentially shared. |
id_tag | Tag containing global IDs for entity sets. |
Definition at line 4621 of file ParallelComm.cpp.
References moab::Range::begin(), moab::choose_owner_idx(), moab::ProcConfig::crystal_router(), moab::dum, moab::Range::end(), ErrorCode, moab::set_tuple::handle, moab::set_tuple::idx, moab::gs_data::initialize(), moab::Range::insert(), moab::is_sorted_unique(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TYPE_HANDLE, MB_TYPE_OPAQUE, mbImpl, moab::set_tuple::proc, moab::ProcConfig::proc_comm(), proc_config(), moab::ProcConfig::proc_rank(), procConfig, moab::gs_data::reset(), moab::SharedSetData::set_owner(), moab::SharedSetData::set_sharing_procs(), sharedSetData, moab::Interface::tag_get_bytes(), moab::Interface::tag_get_data(), and moab::Interface::tag_get_data_type().
ErrorCode moab::ParallelComm::scatter_entities | ( | const int | from_proc, |
std::vector< Range > & | entities, | ||
const bool | adjacencies = false , |
||
const bool | tags = true |
||
) |
Scatter entities on from_proc to other processors This function assumes remote handles are not being stored, since (usually) every processor will know about the whole mesh.
from_proc | Processor having the mesh to be broadcast |
entities | On return, the entities sent or received in this call |
adjacencies | If true, adjacencies are sent for equiv entities (currently unsupported) |
tags | If true, all non-default-valued tags are sent for sent entities |
Definition at line 601 of file ParallelComm.cpp.
References add_verts(), moab::ParallelComm::Buffer::buff_ptr, entities, ErrorCode, INITIAL_BUFF_SIZE, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, moab::ParallelComm::Buffer::mem_ptr, pack_buffer(), moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), moab::ProcConfig::proc_size(), procConfig, moab::ParallelComm::Buffer::reserve(), moab::ParallelComm::Buffer::reset_ptr(), moab::ParallelComm::Buffer::set_stored_size(), and unpack_buffer().
|
private |
send the indicated buffer, possibly sending size first
Definition at line 6086 of file ParallelComm.cpp.
References moab::ParallelComm::Buffer::alloc_size, ErrorCode, moab::ParallelComm::Buffer::get_stored_size(), INITIAL_BUFF_SIZE, MB_SET_ERR, MB_SUCCESS, moab::ParallelComm::Buffer::mem_ptr, PRINT_DEBUG_IRECV, PRINT_DEBUG_ISEND, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), and procConfig.
Referenced by exchange_ghost_cells(), exchange_owned_mesh(), exchange_tags(), recv_entities(), recv_messages(), reduce_tags(), send_entities(), send_recv_entities(), and settle_intersection_points().
ErrorCode moab::ParallelComm::send_entities | ( | const int | to_proc, |
Range & | orig_ents, | ||
const bool | adjs, | ||
const bool | tags, | ||
const bool | store_remote_handles, | ||
const bool | is_iface, | ||
Range & | final_ents, | ||
int & | incoming1, | ||
int & | incoming2, | ||
TupleList & | entprocs, | ||
std::vector< MPI_Request > & | recv_remoteh_reqs, | ||
bool | wait_all = true |
||
) |
send entities to another processor, optionally waiting until it's done
Send entities to another processor, with adjs, sets, and tags. If store_remote_handles is true, this call receives back handles assigned to entities sent to destination processor and stores them in sharedh_tag or sharedhs_tag.
to_proc | Destination processor |
orig_ents | Entities requested to send |
adjs | If true, send adjacencies for equiv entities (currently unsupported) |
tags | If true, send tag values for all tags assigned to entities |
store_remote_handles | If true, also recv message with handles on destination processor (currently unsupported) |
final_ents | Range containing all entities sent |
incoming | keep track if any messages are coming to this processor (newly added) |
wait_all | If true, wait until all messages received/sent complete |
Definition at line 698 of file ParallelComm.cpp.
References add_verts(), moab::Range::empty(), ErrorCode, filter_pstatus(), get_buffers(), localOwnedBuffs, MB_CHK_SET_ERR, moab::MB_MESG_ENTS_SIZE, moab::MB_MESG_REMOTEH_SIZE, MB_SUCCESS, pack_buffer(), PSTATUS_AND, PSTATUS_SHARED, recvReqs, remoteOwnedBuffs, send_buffer(), sendReqs, and moab::subtract().
ErrorCode moab::ParallelComm::send_entities | ( | std::vector< unsigned int > & | send_procs, |
std::vector< Range * > & | send_ents, | ||
int & | incoming1, | ||
int & | incoming2, | ||
const bool | store_remote_handles | ||
) |
Definition at line 743 of file ParallelComm.cpp.
References ackbuff, add_verts(), buffProcs, moab::Range::compactness(), moab::TupleList::disableWriteAccess(), moab::Range::empty(), moab::TupleList::enableWriteAccess(), ErrorCode, filter_pstatus(), get_buffers(), moab::TupleList::get_n(), moab::DebugOutput::get_verbosity(), moab::TupleList::inc_n(), moab::TupleList::initialize(), localOwnedBuffs, MAX_SHARING_PROCS, MB_CHK_SET_ERR, moab::MB_MESG_ENTS_SIZE, moab::MB_MESG_REMOTEH_SIZE, MB_SUCCESS, moab::Range::merge(), MPE_Log_event, moab::msgs, myDebug, pack_buffer(), moab::ProcConfig::proc_rank(), procConfig, PSTATUS_AND, PSTATUS_SHARED, recvRemotehReqs, recvReqs, moab::TupleList::buffer::reset(), moab::TupleList::reset(), send_buffer(), sendReqs, moab::Range::size(), size(), moab::TupleList::sort(), moab::subtract(), moab::DebugOutput::tprintf(), moab::TupleList::vi_wr, and moab::TupleList::vul_wr.
ErrorCode moab::ParallelComm::send_recv_entities | ( | std::vector< int > & | send_procs, |
std::vector< std::vector< int > > & | msgsizes, | ||
std::vector< std::vector< EntityHandle > > & | senddata, | ||
std::vector< std::vector< EntityHandle > > & | recvdata | ||
) |
Send and receives data from a set of processors.
Definition at line 873 of file ParallelComm.cpp.
References buffProcs, entities, moab::error(), ErrorCode, get_buffers(), moab::DebugOutput::get_verbosity(), INITIAL_BUFF_SIZE, localOwnedBuffs, MAX_SHARING_PROCS, MB_CHK_SET_ERR, moab::MB_MESG_ENTS_SIZE, MB_SET_ERR, MB_SUCCESS, MPE_Log_event, moab::msgs, myDebug, moab::PACK_EH(), moab::PACK_INTS(), PRINT_DEBUG_IRECV, PRINT_DEBUG_RECD, PRINT_DEBUG_WAITANY, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, recv_buffer(), remoteOwnedBuffs, reset_all_buffers(), send_buffer(), sendReqs, size(), moab::DebugOutput::tprintf(), moab::UNPACK_EH(), and moab::UNPACK_INTS().
void moab::ParallelComm::set_debug_verbosity | ( | int | verb | ) |
set the verbosity level of output from this pcomm
Definition at line 8867 of file ParallelComm.cpp.
References myDebug, and moab::DebugOutput::set_verbosity().
Referenced by moab::ReadParallel::load_file().
ErrorCode moab::ParallelComm::set_partitioning | ( | EntityHandle | h | ) |
Definition at line 8075 of file ParallelComm.cpp.
References moab::Interface::add_entities(), ErrorCode, moab::Interface::get_entities_by_handle(), MAX_SHARING_PROCS, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, mbImpl, partition_sets(), moab::PARTITIONING_PCOMM_TAG_NAME, partitioningSet, pcomm_tag(), moab::Interface::tag_delete_data(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by get_pcomm().
|
private |
Set pstatus values on entities (vector-based function)
pstatus_ents | Entities to be set |
pstatus_val | Pstatus value to be set |
lower_dim_ents | If true, lower-dimensional ents (incl. vertices) set too (and created if they don't exist) |
verts_too | If true, vertices also set |
operation | If UNION, pstatus_val is OR-d with existing value, otherwise existing value is over-written |
Definition at line 4445 of file ParallelComm.cpp.
References ErrorCode, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, pstatus_tag(), set_pstatus_entities(), moab::Interface::tag_get_data(), moab::Interface::tag_set_data(), and moab::Interface::UNION.
|
private |
Set pstatus values on entities.
pstatus_ents | Entities to be set |
pstatus_val | Pstatus value to be set |
lower_dim_ents | If true, lower-dimensional ents (incl. vertices) set too (and created if they don't exist) |
verts_too | If true, vertices also set |
operation | If UNION, pstatus_val is OR-d with existing value, otherwise existing value is over-written |
Definition at line 4410 of file ParallelComm.cpp.
References moab::Interface::dimension_from_handle(), ErrorCode, moab::Interface::get_adjacencies(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, pstatus_tag(), moab::Range::rbegin(), moab::Range::size(), moab::Interface::tag_get_data(), moab::Interface::tag_set_data(), and moab::Interface::UNION.
Referenced by set_pstatus_entities().
|
inline |
set rank for this pcomm; USED FOR TESTING ONLY!
Definition at line 1662 of file ParallelComm.hpp.
References moab::ProcConfig::proc_rank(), moab::ProcConfig::proc_size(), and procConfig.
|
inline |
Definition at line 1702 of file ParallelComm.hpp.
References recvReqs.
|
inline |
Definition at line 1697 of file ParallelComm.hpp.
References sendReqs.
|
private |
Definition at line 6422 of file ParallelComm.cpp.
References ErrorCode, MB_CHK_SET_ERR, mbImpl, moab::ProcConfig::proc_rank(), procConfig, PSTATUS_GHOST, PSTATUS_INTERFACE, PSTATUS_MULTISHARED, PSTATUS_NOT_OWNED, PSTATUS_SHARED, pstatus_tag(), rank(), sharedEnts, sharedh_tag(), sharedhs_tag(), sharedp_tag(), sharedps_tag(), moab::Interface::tag_delete_data(), and moab::Interface::tag_set_data().
Referenced by check_clean_iface(), and update_remote_data().
|
inline |
set rank for this pcomm; USED FOR TESTING ONLY!
Definition at line 1668 of file ParallelComm.hpp.
References moab::ProcConfig::proc_size(), and procConfig.
ErrorCode moab::ParallelComm::settle_intersection_points | ( | Range & | edges, |
Range & | shared_edges_owned, | ||
std::vector< std::vector< EntityHandle > * > & | extraNodesVec, | ||
double | tolerance | ||
) |
Definition at line 9036 of file ParallelComm.cpp.
References moab::Range::begin(), moab::ParallelComm::Buffer::buff_ptr, buffProcs, moab::ParallelComm::Buffer::check_space(), moab::Range::end(), entities, ErrorCode, filter_pstatus(), moab::Range::find(), get_comm_procs(), moab::Interface::get_coords(), get_remote_handles(), moab::DebugOutput::get_verbosity(), INITIAL_BUFF_SIZE, localOwnedBuffs, MAX_SHARING_PROCS, MB_CHK_SET_ERR, moab::MB_MESG_TAGS_SIZE, MB_SET_ERR, MB_SUCCESS, mbImpl, myDebug, moab::PACK_EH(), moab::PACK_INT(), PRINT_DEBUG_IRECV, PRINT_DEBUG_RECD, PRINT_DEBUG_WAITANY, moab::ProcConfig::proc_comm(), moab::ProcConfig::proc_rank(), procConfig, PSTATUS_AND, PSTATUS_SHARED, recv_buffer(), remoteOwnedBuffs, reset_all_buffers(), moab::ParallelComm::Buffer::reset_ptr(), send_buffer(), sendReqs, moab::Interface::set_coords(), moab::ParallelComm::Buffer::set_stored_size(), moab::Range::size(), moab::tolerance, moab::DebugOutput::tprintf(), moab::UNPACK_DBLS(), moab::UNPACK_EH(), and moab::UNPACK_INT().
Tag moab::ParallelComm::sharedh_tag | ( | ) |
return sharedh tag
Definition at line 7934 of file ParallelComm.cpp.
References ErrorCode, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_HANDLE, mbImpl, PARALLEL_SHARED_HANDLE_TAG_NAME, sharedhTag, and moab::Interface::tag_get_handle().
Referenced by check_clean_iface(), check_sent_ents(), clean_shared_tags(), correct_thin_ghost_layers(), get_owner_handle(), get_owning_part(), get_shared_proc_tags(), get_sharing_data(), get_sharing_parts(), set_sharing_data(), and update_remote_data_old().
Tag moab::ParallelComm::sharedhs_tag | ( | ) |
return sharedhs tag
Definition at line 7948 of file ParallelComm.cpp.
References ErrorCode, MAX_SHARING_PROCS, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_HANDLE, mbImpl, PARALLEL_SHARED_HANDLES_TAG_NAME, sharedhsTag, and moab::Interface::tag_get_handle().
Referenced by check_clean_iface(), check_sent_ents(), correct_thin_ghost_layers(), get_owner_handle(), get_owning_part(), get_shared_proc_tags(), get_sharing_data(), get_sharing_parts(), set_sharing_data(), and update_remote_data_old().
Tag moab::ParallelComm::sharedp_tag | ( | ) |
return sharedp tag
Definition at line 7907 of file ParallelComm.cpp.
References ErrorCode, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, mbImpl, PARALLEL_SHARED_PROC_TAG_NAME, sharedpTag, and moab::Interface::tag_get_handle().
Referenced by check_clean_iface(), check_sent_ents(), clean_shared_tags(), correct_thin_ghost_layers(), filter_pstatus(), get_interface_procs(), get_owner_handle(), get_owning_part(), get_shared_proc_tags(), get_sharing_data(), get_sharing_parts(), is_iface_proc(), pack_entities(), set_sharing_data(), and update_remote_data_old().
Tag moab::ParallelComm::sharedps_tag | ( | ) |
return sharedps tag
Definition at line 7921 of file ParallelComm.cpp.
References ErrorCode, MAX_SHARING_PROCS, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, mbImpl, PARALLEL_SHARED_PROCS_TAG_NAME, sharedpsTag, and moab::Interface::tag_get_handle().
Referenced by check_clean_iface(), check_sent_ents(), correct_thin_ghost_layers(), filter_pstatus(), get_interface_procs(), get_owner_handle(), get_owning_part(), get_shared_proc_tags(), get_sharing_data(), get_sharing_parts(), is_iface_proc(), set_sharing_data(), and update_remote_data_old().
|
inline |
Definition at line 648 of file ParallelComm.hpp.
References proc_config(), and moab::ProcConfig::proc_size().
Referenced by assign_global_ids(), augment_default_sets_with_ghosts(), moab::ScdInterface::construct_box(), exchange_ghost_cells(), exchange_owned_mesh(), gather_data(), moab::NestedRefine::generate_hm(), get_sent_ents(), hcFilter(), iMOAB_SetDoubleTagStorageWithGid(), moab::DataCoupler::interpolate(), laplacianFilter(), moab::ReadParallel::load_file(), moab::DataCoupler::locate_points(), main(), moab::ParallelMergeMesh::PartitionGlobalBox(), perform_laplacian_smoothing(), perform_lloyd_relaxation(), moab::LloydSmoother::perform_smooth(), moab::ParallelMergeMesh::PerformMerge(), moab::ParallelMergeMesh::PopulateMySkinEnts(), DeformMeshRemap::read_file(), resolve_shared_ents(), RuntimeContext::RuntimeContext(), send_entities(), send_recv_entities(), and tag_shared_verts().
|
private |
Set pstatus tag interface bit on entities in sets passed in.
Definition at line 4360 of file ParallelComm.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_handle(), moab::Range::insert(), interfaceSets, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, PSTATUS_INTERFACE, PSTATUS_NOT_OWNED, pstatus_tag(), moab::Interface::remove_entities(), moab::Range::size(), moab::subtract(), moab::Interface::tag_get_data(), and moab::Interface::tag_set_data().
Referenced by exchange_ghost_cells().
ErrorCode moab::ParallelComm::tag_shared_verts | ( | TupleList & | shared_ents, |
std::map< std::vector< int >, std::vector< EntityHandle > > & | proc_nvecs, | ||
Range & | proc_verts, | ||
unsigned int | i_extra = 1 |
||
) |
Definition at line 5219 of file ParallelComm.cpp.
References ErrorCode, moab::TupleList::get_n(), get_shared_proc_tags(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, proc_config(), moab::ProcConfig::proc_rank(), procConfig, PSTATUS_MULTISHARED, PSTATUS_SHARED, sharedEnts, moab::Interface::tag_set_data(), moab::TupleList::vi_rd, and moab::TupleList::vul_rd.
Referenced by resolve_shared_ents(), moab::ScdInterface::tag_shared_vertices(), and moab::ParallelMergeMesh::TagSharedElements().
|
private |
Definition at line 5338 of file ParallelComm.cpp.
References moab::Range::end(), ErrorCode, moab::TupleList::get_n(), get_shared_proc_tags(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, proc_config(), moab::ProcConfig::proc_rank(), procConfig, PSTATUS_MULTISHARED, PSTATUS_SHARED, sharedEnts, size(), moab::Interface::tag_set_data(), moab::TupleList::vi_rd, and moab::TupleList::vul_rd.
|
private |
Definition at line 3462 of file ParallelComm.cpp.
ErrorCode moab::ParallelComm::unpack_buffer | ( | unsigned char * | buff_ptr, |
const bool | store_remote_handles, | ||
const int | from_proc, | ||
const int | ind, | ||
std::vector< std::vector< EntityHandle > > & | L1hloc, | ||
std::vector< std::vector< EntityHandle > > & | L1hrem, | ||
std::vector< std::vector< int > > & | L1p, | ||
std::vector< EntityHandle > & | L2hloc, | ||
std::vector< EntityHandle > & | L2hrem, | ||
std::vector< unsigned int > & | L2p, | ||
std::vector< EntityHandle > & | new_ents, | ||
const bool | created_iface = false |
||
) |
Definition at line 1463 of file ParallelComm.cpp.
References ErrorCode, moab::DebugOutput::get_verbosity(), MB_CHK_SET_ERR, MB_SUCCESS, myDebug, moab::DebugOutput::print(), moab::DebugOutput::tprintf(), unpack_entities(), unpack_sets(), and unpack_tags().
Referenced by broadcast_entities(), exchange_owned_mesh(), moab::ParCommGraph::receive_mesh(), recv_entities(), recv_messages(), and scatter_entities().
ErrorCode moab::ParallelComm::unpack_entities | ( | unsigned char *& | buff_ptr, |
const bool | store_remote_handles, | ||
const int | from_ind, | ||
const bool | is_iface, | ||
std::vector< std::vector< EntityHandle > > & | L1hloc, | ||
std::vector< std::vector< EntityHandle > > & | L1hrem, | ||
std::vector< std::vector< int > > & | L1p, | ||
std::vector< EntityHandle > & | L2hloc, | ||
std::vector< EntityHandle > & | L2hrem, | ||
std::vector< unsigned int > & | L2p, | ||
std::vector< EntityHandle > & | new_ents, | ||
const bool | created_iface = false |
||
) |
unpack entities in buff_ptr
Definition at line 2068 of file ParallelComm.cpp.
References moab::Interface::create_element(), moab::Interface::create_vertex(), moab::CN::EntityTypeName(), ErrorCode, find_existing_entity(), get_buffers(), get_local_handles(), moab::CN::MAX_NODES_PER_ELEMENT, MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SUCCESS, MBENTITYSET, mbImpl, MBMAXTYPE, MBVERTEX, myDebug, moab::ProcConfig::proc_rank(), procConfig, PSTATUS_GHOST, PSTATUS_INTERFACE, PSTATUS_NOT_OWNED, moab::Interface::query_interface(), rank(), moab::DebugOutput::tprintf(), moab::UNPACK_DBLS(), moab::UNPACK_EH(), moab::UNPACK_INT(), moab::UNPACK_INTS(), moab::UNPACK_TYPE(), moab::ReadUtilIface::update_adjacencies(), and update_remote_data().
Referenced by exchange_ghost_cells(), and unpack_buffer().
|
private |
for all the entities in the received buffer; for each, save entities in this instance which match connectivity, or zero if none found
|
inlineprivate |
ErrorCode moab::ParallelComm::unpack_remote_handles | ( | unsigned int | from_proc, |
unsigned char *& | buff_ptr, | ||
std::vector< EntityHandle > & | L2hloc, | ||
std::vector< EntityHandle > & | L2hrem, | ||
std::vector< unsigned int > & | L2p | ||
) |
Definition at line 7395 of file ParallelComm.cpp.
References ErrorCode, find_existing_entity(), MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, moab::Interface::type_from_handle(), moab::UNPACK_EH(), moab::UNPACK_INT(), and update_remote_data().
Referenced by exchange_ghost_cells(), exchange_owned_mesh(), recv_entities(), recv_remote_handle_messages(), and unpack_remote_handles().
|
private |
Definition at line 3310 of file ParallelComm.cpp.
References moab::Interface::add_child_meshset(), moab::Interface::add_entities(), moab::Interface::add_parent_meshset(), moab::Range::begin(), moab::Interface::create_meshset(), moab::Range::empty(), moab::Range::end(), entities, ErrorCode, moab::Interface::get_entities_by_type_and_tag(), get_local_handles(), moab::Range::insert(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, mbImpl, myDebug, moab::Range::rbegin(), moab::Range::size(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), moab::DebugOutput::tprintf(), moab::Interface::type_from_handle(), moab::UNPACK_EH(), moab::UNPACK_INT(), moab::UNPACK_INTS(), moab::UNPACK_RANGE(), moab::UNPACK_VOID(), and update_remote_data().
Referenced by unpack_buffer().
|
private |
Definition at line 3679 of file ParallelComm.cpp.
References entities, ErrorCode, get_local_handles(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_BYTES, MB_TAG_CREAT, MB_TAG_VARLEN, MB_TYPE_HANDLE, MB_VARIABLE_LENGTH, mbImpl, myDebug, reduce_void(), moab::TagInfo::size_from_data_type(), moab::Interface::tag_get_data(), moab::Interface::tag_get_data_type(), moab::Interface::tag_get_handle(), moab::Interface::tag_get_length(), moab::Interface::tag_set_by_ptr(), moab::Interface::tag_set_data(), moab::DebugOutput::tprintf(), moab::UNPACK_EH(), moab::UNPACK_INT(), moab::UNPACK_INTS(), and UPC.
Referenced by exchange_tags(), reduce_tags(), and unpack_buffer().
|
private |
for any remote_handles set to zero, remove corresponding sent_ents from iface_sets corresponding to from_proc
|
private |
Definition at line 2646 of file ParallelComm.cpp.
References moab::CN::EntityTypeName(), ErrorCode, get_sharing_data(), moab::ID_FROM_HANDLE(), MAX_SHARING_PROCS, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, PSTATUS_MULTISHARED, PSTATUS_NOT_OWNED, PSTATUS_SHARED, rank(), set_sharing_data(), sharedEnts, and moab::TYPE_FROM_HANDLE().
ErrorCode moab::ParallelComm::update_remote_data | ( | EntityHandle | entity, |
std::vector< int > & | procs, | ||
std::vector< EntityHandle > & | handles | ||
) |
Definition at line 1019 of file ParallelComm.cpp.
References moab::error(), ErrorCode, MB_CHK_ERR, MB_SUCCESS, PSTATUS_INTERFACE, PSTATUS_NOT_OWNED, and rank().
Referenced by resolve_shared_ents(), unpack_entities(), unpack_remote_handles(), unpack_sets(), and update_remote_data().
|
private |
Definition at line 2629 of file ParallelComm.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, MB_CHK_ERR, MB_SUCCESS, and update_remote_data().
|
private |
Definition at line 2777 of file ParallelComm.cpp.
References moab::CN::EntityTypeName(), ErrorCode, get_sharing_data(), moab::ID_FROM_HANDLE(), MAX_SHARING_PROCS, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, mbImpl, proc_config(), moab::ProcConfig::proc_rank(), procConfig, PSTATUS_GHOST, PSTATUS_INTERFACE, PSTATUS_MULTISHARED, PSTATUS_NOT_OWNED, PSTATUS_SHARED, pstatus_tag(), sharedEnts, sharedh_tag(), sharedhs_tag(), sharedp_tag(), sharedps_tag(), moab::Interface::tag_set_data(), and moab::TYPE_FROM_HANDLE().
|
friend |
Definition at line 57 of file ParallelComm.hpp.
|
private |
Definition at line 1475 of file ParallelComm.hpp.
Referenced by recv_entities(), and send_entities().
|
private |
processor rank for each buffer index
Definition at line 1456 of file ParallelComm.hpp.
Referenced by buff_procs(), check_all_shared_handles(), check_my_shared_handles(), correct_thin_ghost_layers(), exchange_all_shared_handles(), exchange_ghost_cells(), exchange_owned_mesh(), exchange_tags(), get_buffers(), get_comm_procs(), get_sent_ents(), initialize(), pack_shared_handles(), post_irecv(), recv_entities(), recv_messages(), recv_remote_handle_messages(), reduce_tags(), send_entities(), send_recv_entities(), and settle_intersection_points().
|
private |
Error handler.
Definition at line 1438 of file ParallelComm.hpp.
Referenced by initialize(), and packed_tag_size().
|
private |
Cache of global part count.
Definition at line 1467 of file ParallelComm.hpp.
Referenced by collective_sync_partition(), create_part(), destroy_part(), and get_global_part_count().
|
private |
Definition at line 1465 of file ParallelComm.hpp.
|
static |
Definition at line 951 of file ParallelComm.hpp.
Referenced by broadcast_entities(), exchange_ghost_cells(), exchange_owned_mesh(), exchange_tags(), get_buffers(), post_irecv(), recv_buffer(), recv_entities(), reduce_tags(), moab::ParallelComm::Buffer::reset_buffer(), scatter_entities(), send_buffer(), moab::ParCommGraph::send_mesh_parts(), send_recv_entities(), and settle_intersection_points().
|
private |
Definition at line 1459 of file ParallelComm.hpp.
Referenced by check_clean_iface(), create_iface_pc_links(), create_interface_sets(), get_ghosted_entities(), get_iface_entities(), get_interface_procs(), interface_sets(), and tag_iface_entities().
|
private |
more data buffers, proc-specific
Definition at line 1441 of file ParallelComm.hpp.
Referenced by delete_all_buffers(), exchange_ghost_cells(), exchange_owned_mesh(), exchange_tags(), get_buffers(), initialize(), post_irecv(), recv_entities(), recv_messages(), recv_remote_handle_messages(), reduce_tags(), reset_all_buffers(), send_entities(), send_recv_entities(), and settle_intersection_points().
|
private |
MB interface associated with this writer.
Definition at line 1429 of file ParallelComm.hpp.
Referenced by add_pcomm(), add_verts(), assign_entities_part(), assign_global_ids(), augment_default_sets_with_ghosts(), check_all_shared_handles(), check_clean_iface(), check_global_ids(), check_local_shared(), check_sent_ents(), clean_shared_tags(), correct_thin_ghost_layers(), create_iface_pc_links(), create_interface_sets(), create_part(), delete_entities(), destroy_part(), estimate_ents_buffer_size(), estimate_sets_buffer_size(), exchange_ghost_cells(), exchange_owned_meshs(), exchange_tags(), filter_pstatus(), find_existing_entity(), gather_data(), get_ghosted_entities(), get_iface_entities(), get_interface_procs(), get_moab(), get_owner_handle(), get_owning_part(), get_part_entities(), get_proc_nvecs(), get_pstatus(), get_pstatus_entities(), get_remote_handles(), get_sharing_data(), get_sharing_parts(), get_tag_send_list(), initialize(), is_iface_proc(), list_entities(), pack_entities(), pack_entity_seq(), pack_sets(), pack_tag(), partition_tag(), pstatus_tag(), reduce_tags(), remove_entities_part(), remove_pcomm(), resolve_shared_ents(), resolve_shared_sets(), set_partitioning(), set_pstatus_entities(), set_sharing_data(), settle_intersection_points(), sharedh_tag(), sharedhs_tag(), sharedp_tag(), sharedps_tag(), tag_iface_entities(), tag_shared_verts(), unpack_entities(), unpack_remote_handles(), unpack_sets(), unpack_tags(), and update_remote_data_old().
|
private |
used to set verbosity level and to report output
Definition at line 1478 of file ParallelComm.hpp.
Referenced by correct_thin_ghost_layers(), define_mpe(), exchange_ghost_cells(), exchange_owned_mesh(), exchange_tags(), get_debug_verbosity(), initialize(), pack_entities(), pack_entity_seq(), pack_sets(), pack_tag(), pack_tags(), print_debug_irecv(), print_debug_isend(), print_debug_recd(), print_debug_waitany(), recv_entities(), reduce_tags(), resolve_shared_ents(), send_entities(), send_recv_entities(), set_debug_verbosity(), settle_intersection_points(), unpack_buffer(), unpack_entities(), unpack_sets(), unpack_tags(), and ~ParallelComm().
|
private |
Definition at line 1471 of file ParallelComm.hpp.
|
private |
entity set containing all parts
Definition at line 1469 of file ParallelComm.hpp.
Referenced by get_partitioning(), and set_partitioning().
|
private |
the partition, interface sets for this comm'n instance
Definition at line 1459 of file ParallelComm.hpp.
Referenced by get_part_entities(), partition_sets(), resolve_shared_ents(), and moab::ParallelMergeMesh::TagSharedElements().
|
private |
Definition at line 1465 of file ParallelComm.hpp.
Referenced by partition_tag().
|
private |
Definition at line 1473 of file ParallelComm.hpp.
Referenced by get_id(), initialize(), and ParallelComm().
|
static |
Definition at line 88 of file ParallelComm.hpp.
|
static |
Definition at line 88 of file ParallelComm.hpp.
|
private |
Proc config object, keeps info on parallel stuff.
Definition at line 1432 of file ParallelComm.hpp.
Referenced by assign_global_ids(), augment_default_sets_with_ghosts(), broadcast_entities(), build_sharedhps_list(), check_all_shared_handles(), check_clean_iface(), check_local_shared(), create_interface_sets(), delete_entities(), exchange_all_shared_handles(), exchange_ghost_cells(), exchange_owned_mesh(), exchange_tags(), get_buffers(), get_interface_procs(), get_proc_nvecs(), get_remote_handles(), initialize(), ParallelComm(), post_irecv(), print_buffer(), proc_config(), recv_buffer(), recv_entities(), recv_messages(), recv_remote_handle_messages(), reduce_tags(), resolve_shared_ents(), resolve_shared_sets(), scatter_entities(), send_buffer(), send_entities(), send_recv_entities(), set_rank(), set_sharing_data(), set_size(), settle_intersection_points(), tag_shared_verts(), unpack_entities(), and update_remote_data_old().
|
private |
Definition at line 1465 of file ParallelComm.hpp.
Referenced by pstatus_tag().
|
private |
Definition at line 1453 of file ParallelComm.hpp.
Referenced by exchange_owned_meshs(), post_irecv(), recv_entities(), and send_entities().
|
private |
receive request objects
Definition at line 1453 of file ParallelComm.hpp.
Referenced by exchange_owned_meshs(), post_irecv(), recv_entities(), recv_messages(), send_entities(), and set_recv_request().
|
private |
Definition at line 1441 of file ParallelComm.hpp.
Referenced by delete_all_buffers(), exchange_ghost_cells(), exchange_owned_mesh(), exchange_tags(), get_buffers(), initialize(), post_irecv(), recv_entities(), recv_messages(), recv_remote_handle_messages(), reduce_tags(), reset_all_buffers(), send_entities(), send_recv_entities(), and settle_intersection_points().
|
private |
request objects, may be used if store_remote_handles is used
Definition at line 1450 of file ParallelComm.hpp.
Referenced by exchange_ghost_cells(), exchange_owned_mesh(), exchange_tags(), post_irecv(), recv_entities(), recv_messages(), recv_remote_handle_messages(), reduce_tags(), send_entities(), send_recv_entities(), set_send_request(), and settle_intersection_points().
|
private |
Sequence manager, to get more efficient access to entities.
Definition at line 1435 of file ParallelComm.hpp.
Referenced by get_tag_send_list(), initialize(), pack_entities(), and packed_tag_size().
|
private |
all local entities shared with others, whether ghost or ghosted
Definition at line 1462 of file ParallelComm.hpp.
Referenced by augment_default_sets_with_ghosts(), check_local_shared(), check_my_shared_handles(), correct_thin_ghost_layers(), create_interface_sets(), delete_entities(), exchange_ghost_cells(), exchange_owned_meshs(), exchange_tags(), get_shared_entities(), list_entities(), pack_shared_handles(), reduce_tags(), resolve_shared_ents(), set_sharing_data(), tag_shared_verts(), update_remote_data(), and update_remote_data_old().
|
private |
Definition at line 1465 of file ParallelComm.hpp.
Referenced by sharedhs_tag().
|
private |
Definition at line 1465 of file ParallelComm.hpp.
Referenced by sharedh_tag().
|
private |
Definition at line 1465 of file ParallelComm.hpp.
Referenced by sharedps_tag().
|
private |
tags used to save sharing procs and handles
Definition at line 1465 of file ParallelComm.hpp.
Referenced by sharedp_tag().
|
private |
Data about shared sets.
Definition at line 1481 of file ParallelComm.hpp.
Referenced by get_entityset_local_handle(), get_entityset_owner(), get_entityset_owners(), get_entityset_procs(), get_owned_sets(), get_shared_sets(), ParallelComm(), resolve_shared_sets(), and ~ParallelComm().