#include <ReadParallel.hpp>
Public Types | |
enum | ParallelActions { PA_READ = 0 , PA_READ_PART = 1 , PA_BROADCAST = 2 , PA_DELETE_NONLOCAL = 3 , PA_CHECK_GIDS_SERIAL = 4 , PA_GET_FILESET_ENTS = 5 , PA_RESOLVE_SHARED_ENTS = 6 , PA_EXCHANGE_GHOSTS = 7 , PA_RESOLVE_SHARED_SETS = 8 , PA_AUGMENT_SETS_WITH_GHOSTS = 9 , PA_PRINT_PARALLEL = 10 , PA_CREATE_TRIVIAL_PARTITION = 11 , PA_CORRECT_THIN_GHOSTS = 12 } |
enum | ParallelOpts { POPT_NONE = 0 , POPT_BCAST , POPT_BCAST_DELETE , POPT_READ_DELETE , POPT_READ_PART , POPT_DEFAULT } |
Public Member Functions | |
ErrorCode | load_file (const char *file_name, const EntityHandle *file_set, const FileOptions &opts, const ReaderIface::SubsetList *subset_list=0, const Tag *file_id_tag=0) |
load a file More... | |
ErrorCode | load_file (const char **file_names, const int num_files, const EntityHandle *file_set, const FileOptions &opts, const ReaderIface::SubsetList *subset_list=0, const Tag *file_id_tag=0) |
load multiple files More... | |
ErrorCode | load_file (const char **file_names, const int num_files, const EntityHandle *file_set, int parallel_mode, std::string &partition_tag_name, std::vector< int > &partition_tag_vals, bool distrib, bool partition_by_rank, std::vector< int > &pa_vec, const FileOptions &opts, const ReaderIface::SubsetList *subset_list, const Tag *file_id_tag, const int reader_rank, const bool cputime, const int resolve_dim, const int shared_dim, const int ghost_dim, const int bridge_dim, const int num_layers, const int addl_ents) |
ReadParallel (Interface *impl=NULL, ParallelComm *pc=NULL) | |
Constructor. More... | |
virtual | ~ReadParallel () |
Destructor. More... | |
ErrorCode | delete_nonlocal_entities (std::string &ptag_name, std::vector< int > &ptag_vals, bool distribute, EntityHandle file_set) |
PUBLIC TO ALLOW TESTING. More... | |
ErrorCode | delete_nonlocal_entities (EntityHandle file_set) |
Static Public Member Functions | |
static ReaderIface * | factory (Interface *) |
Static Public Attributes | |
static const char * | parallelOptsNames [] = { "NONE", "BCAST", "BCAST_DELETE", "READ_DELETE", "READ_PART", "", 0 } |
static const char * | ParallelActionsNames [] |
Protected Member Functions | |
ErrorCode | create_partition_sets (std::string &ptag_name, EntityHandle file_set) |
Private Attributes | |
Interface * | mbImpl |
ParallelComm * | myPcomm |
DebugOutput | myDebug |
Error * | mError |
Definition at line 17 of file ReadParallel.hpp.
Definition at line 66 of file ReadParallel.hpp.
Enumerator | |
---|---|
POPT_NONE | |
POPT_BCAST | |
POPT_BCAST_DELETE | |
POPT_READ_DELETE | |
POPT_READ_PART | |
POPT_DEFAULT |
Definition at line 85 of file ReadParallel.hpp.
moab::ReadParallel::ReadParallel | ( | Interface * | impl = NULL , |
ParallelComm * | pc = NULL |
||
) |
Constructor.
Definition at line 39 of file ReadParallel.cpp.
References moab::debug, moab::ParallelComm::get_pcomm(), mbImpl, mError, myDebug, myPcomm, moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), moab::Interface::query_interface(), moab::DebugOutput::set_rank(), and moab::DebugOutput::set_verbosity().
|
inlinevirtual |
|
protected |
Definition at line 720 of file ReadParallel.cpp.
References moab::Range::empty(), ErrorCode, moab::Interface::get_entities_by_type_and_tag(), MB_CHK_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, mbImpl, myPcomm, PARALLEL_PARTITION_TAG_NAME, moab::ParallelComm::partition_sets(), moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), size, moab::Range::size(), moab::Interface::tag_delete_data(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by load_file().
ErrorCode moab::ReadParallel::delete_nonlocal_entities | ( | EntityHandle | file_set | ) |
Definition at line 758 of file ReadParallel.cpp.
References moab::Range::begin(), moab::Interface::delete_entities(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::ReadUtilIface::gather_related_ents(), moab::Interface::get_entities_by_handle(), MB_CHK_SET_ERR, MB_SUCCESS, MBENTITYSET, mbImpl, myDebug, myPcomm, moab::ParallelComm::partition_sets(), moab::DebugOutput::print(), moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), moab::Interface::query_interface(), moab::Interface::remove_entities(), moab::Range::subset_by_type(), moab::subtract(), and moab::DebugOutput::tprint().
ErrorCode moab::ReadParallel::delete_nonlocal_entities | ( | std::string & | ptag_name, |
std::vector< int > & | ptag_vals, | ||
bool | distribute, | ||
EntityHandle | file_set | ||
) |
PUBLIC TO ALLOW TESTING.
Definition at line 654 of file ReadParallel.cpp.
References ErrorCode, moab::Interface::get_entities_by_type_and_tag(), moab::Range::insert(), MB_CHK_ERR, MB_CHK_SET_ERR, MB_SET_ERR, MB_SUCCESS, MB_TYPE_INTEGER, MBENTITYSET, mbImpl, myDebug, myPcomm, moab::ParallelComm::partition_sets(), moab::DebugOutput::print(), moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), moab::ProcConfig::proc_size(), moab::Range::size(), moab::Range::swap(), moab::Interface::tag_get_data(), and moab::Interface::tag_get_handle().
Referenced by load_file().
|
static |
ErrorCode moab::ReadParallel::load_file | ( | const char ** | file_names, |
const int | num_files, | ||
const EntityHandle * | file_set, | ||
const FileOptions & | opts, | ||
const ReaderIface::SubsetList * | subset_list = 0 , |
||
const Tag * | file_id_tag = 0 |
||
) |
load multiple files
Definition at line 54 of file ReadParallel.cpp.
References ErrorCode, moab::FileOptions::get_int_option(), moab::FileOptions::get_ints_option(), moab::FileOptions::get_null_option(), moab::FileOptions::get_option(), moab::FileOptions::get_real_option(), moab::FileOptions::get_str_option(), load_file(), moab::FileOptions::mark_all_seen(), moab::FileOptions::match_option(), MB_CHK_ERR, MB_ENTITY_NOT_FOUND, MB_SET_ERR, MB_SUCCESS, MB_TAG_NOT_FOUND, MB_TYPE_OUT_OF_RANGE, mbImpl, myDebug, myPcomm, PA_AUGMENT_SETS_WITH_GHOSTS, PA_BROADCAST, PA_CHECK_GIDS_SERIAL, PA_CORRECT_THIN_GHOSTS, PA_CREATE_TRIVIAL_PARTITION, PA_DELETE_NONLOCAL, PA_EXCHANGE_GHOSTS, PA_GET_FILESET_ENTS, PA_PRINT_PARALLEL, PA_READ, PA_READ_PART, PA_RESOLVE_SHARED_ENTS, PA_RESOLVE_SHARED_SETS, PARALLEL_PARTITION_TAG_NAME, parallelOptsNames, POPT_BCAST, POPT_BCAST_DELETE, POPT_DEFAULT, POPT_READ_DELETE, POPT_READ_PART, moab::DebugOutput::print(), moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), moab::ParallelComm::set_debug_verbosity(), moab::Interface::set_sequence_multiplier(), moab::DebugOutput::set_verbosity(), moab::Interface::tag_get_handle(), and moab::DebugOutput::tprint().
ErrorCode moab::ReadParallel::load_file | ( | const char ** | file_names, |
const int | num_files, | ||
const EntityHandle * | file_set, | ||
int | parallel_mode, | ||
std::string & | partition_tag_name, | ||
std::vector< int > & | partition_tag_vals, | ||
bool | distrib, | ||
bool | partition_by_rank, | ||
std::vector< int > & | pa_vec, | ||
const FileOptions & | opts, | ||
const ReaderIface::SubsetList * | subset_list, | ||
const Tag * | file_id_tag, | ||
const int | reader_rank, | ||
const bool | cputime, | ||
const int | resolve_dim, | ||
const int | shared_dim, | ||
const int | ghost_dim, | ||
const int | bridge_dim, | ||
const int | num_layers, | ||
const int | addl_ents | ||
) |
Definition at line 268 of file ReadParallel.cpp.
References moab::Interface::add_entities(), moab::ParallelComm::augment_default_sets_with_ghosts(), moab::Range::begin(), moab::ParallelComm::broadcast_entities(), moab::ParallelComm::check_global_ids(), moab::ParallelComm::correct_thin_ghost_layers(), moab::Interface::create_meshset(), create_partition_sets(), moab::debug, delete_nonlocal_entities(), moab::Range::empty(), entities, ErrorCode, moab::ParallelComm::exchange_ghost_cells(), moab::ParallelComm::filter_pstatus(), moab::Interface::get_entities_by_handle(), moab::Interface::get_entities_by_type(), moab::Core::get_entities_by_type_and_tag(), moab::Range::insert(), moab::ParallelComm::list_entities(), moab::Interface::list_entities(), MB_CHK_SET_ERR, MB_NOT_IMPLEMENTED, MB_SET_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TAG_SPARSE, MB_TYPE_INTEGER, MB_TYPE_OPAQUE, MBENTITYSET, mbImpl, MBVERTEX, MESHSET_SET, myDebug, myPcomm, moab::ReaderIface::SubsetList::num_parts, moab::ReaderIface::IDTag::num_tag_values, PA_AUGMENT_SETS_WITH_GHOSTS, PA_BROADCAST, PA_CHECK_GIDS_SERIAL, PA_CORRECT_THIN_GHOSTS, PA_CREATE_TRIVIAL_PARTITION, PA_DELETE_NONLOCAL, PA_EXCHANGE_GHOSTS, PA_GET_FILESET_ENTS, PA_PRINT_PARALLEL, PA_READ, PA_READ_PART, PA_RESOLVE_SHARED_ENTS, PA_RESOLVE_SHARED_SETS, ParallelActionsNames, moab::ReaderIface::SubsetList::part_number, moab::ParallelComm::partition_sets(), moab::ProcConfig::proc_comm(), moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), moab::ProcConfig::proc_size(), PSTATUS_NOT, PSTATUS_NOT_OWNED, moab::ParallelComm::rank(), moab::ParallelComm::resolve_shared_ents(), moab::ParallelComm::resolve_shared_sets(), moab::Core::serial_load_file(), moab::Range::size(), moab::ParallelComm::size(), moab::Interface::tag_delete(), moab::Core::tag_get_handle(), moab::Interface::tag_get_handle(), moab::ReaderIface::SubsetList::tag_list, moab::ReaderIface::SubsetList::tag_list_length, moab::Interface::tag_set_data(), moab::ReaderIface::IDTag::tag_values, moab::DebugOutput::tprint(), and moab::DebugOutput::tprintf().
|
inline |
load a file
Definition at line 117 of file ReadParallel.hpp.
Referenced by load_file(), and moab::Core::load_file().
|
private |
Definition at line 107 of file ReadParallel.hpp.
Referenced by create_partition_sets(), delete_nonlocal_entities(), load_file(), and ReadParallel().
|
private |
Definition at line 114 of file ReadParallel.hpp.
Referenced by ReadParallel().
|
private |
Definition at line 112 of file ReadParallel.hpp.
Referenced by delete_nonlocal_entities(), load_file(), and ReadParallel().
|
private |
Definition at line 110 of file ReadParallel.hpp.
Referenced by create_partition_sets(), delete_nonlocal_entities(), load_file(), and ReadParallel().
|
static |
Definition at line 83 of file ReadParallel.hpp.
Referenced by load_file().
|
static |
Definition at line 64 of file ReadParallel.hpp.
Referenced by load_file().