OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
#include <DiscField.h>
Public Member Functions | |
DiscField (const char *fname, const char *config, unsigned int numFields, const char *typestr=0) | |
DiscField (const char *fname, unsigned int numFields, const char *typestr=0) | |
DiscField (const char *fname, const char *config) | |
DiscField (const char *fname) | |
~DiscField () | |
void | query (int &numRecords, int &numFields, std::vector< int > &size) const |
unsigned int | get_NumRecords () const |
unsigned int | get_NumFields () const |
NDIndex< Dim > | get_Domain () const |
unsigned int | get_Dimension () const |
const char * | get_TypeString () |
const char * | get_DiscType () |
template<class T , class M , class C > | |
bool | read (Field< T, Dim, M, C > &f, const NDIndex< Dim > &readDomain, unsigned int varID, unsigned int record) |
template<class T , class M , class C > | |
bool | read (Field< T, Dim, M, C > &f, unsigned int varID, unsigned int record) |
template<class T , class M , class C > | |
bool | read (Field< T, Dim, M, C > &f, const NDIndex< Dim > &readDomain, unsigned int varID) |
template<class T , class M , class C > | |
bool | read (Field< T, Dim, M, C > &f, unsigned int varID) |
template<class T , class M , class C > | |
bool | read (Field< T, Dim, M, C > &f, const NDIndex< Dim > &readDomain) |
template<class T , class M , class C > | |
bool | read (Field< T, Dim, M, C > &f) |
template<class T , class M , class C > | |
bool | write (Field< T, Dim, M, C > &f, unsigned int varID) |
template<class T , class M , class C > | |
bool | write (Field< T, Dim, M, C > &f) |
void | printDebug (std::ostream &) |
void | printDebug () |
Private Types | |
typedef vmap< NDIndex< Dim >, int > | GlobalIDList_t |
typedef long long | Offset_t |
Private Member Functions | |
void | initialize (const char *base, const char *config, const char *typestr, unsigned int numFields) |
FILE * | open_df_file (const std::string &fnm, const std::string &mode) |
FILE * | open_df_file (const std::string &fnm, const std::string &suffix, const std::string &mode) |
int | open_df_file_fd (const std::string &fnm, const std::string &suf, int flags) |
bool | create_files () |
unsigned int | numSMPs () const |
unsigned int | fileSMPs () const |
unsigned int | mySMP () const |
unsigned int | myBox0 () const |
unsigned int | numFiles () const |
unsigned int | numFiles (unsigned int s) const |
unsigned int | pNodesPerSMP (unsigned int node) const |
bool | parse_config (const char *, bool) |
int | compute_expected (const FieldLayout< Dim > &, const NDIndex< Dim > &) |
bool | make_globalID (FieldLayout< Dim > &) |
NDIndex< Dim > | chunk_domain (const NDIndex< Dim > &currblock, int chunkelems, int &msdim, bool iscompressed) |
bool | write_meta () |
bool | read_meta () |
bool | read_NDIndex (FILE *, NDIndex< Dim > &) |
bool | write_NDIndex (FILE *, const NDIndex< Dim > &) |
bool | write_layout () |
int | read_layout (int record, int sf) |
template<class T > | |
void | write_offset_and_data (FILE *outputOffset, int outputDatafd, CompressedBrickIterator< T, Dim > &cbi, const NDIndex< Dim > &owned) |
template<class T > | |
bool | read_offset (unsigned int varID, unsigned int record, unsigned int sf, std::vector< DFOffsetData< Dim, T > > &offdata, int vnodes) |
template<class T > | |
void | distribute_offsets (std::vector< DFOffsetData< Dim, T > > &offdata, int &vnodes, int &maxsize, const NDIndex< Dim > &readDomain) |
template<class T > | |
bool | read_data (int outputDatafd, T *buffer, Offset_t readsize, Offset_t seekpos) |
template<class T > | |
void | offset_data_to_domain (DFOffsetData< Dim, T > &offdata, NDIndex< Dim > &domain) |
template<class T > | |
void | domain_to_offset_data (const NDIndex< Dim > &domain, DFOffsetData< Dim, T > &offdata) |
DiscField (const DiscField< Dim > &) | |
DiscField & | operator= (const DiscField< Dim > &) |
Private Attributes | |
DiscConfig * | Config |
bool | ConfigOK |
bool | WritingFile |
std::string | BaseFile |
std::string | TypeString |
std::string | DiscType |
unsigned int | DataDimension |
int | NeedStartRecord |
unsigned int | NumFields |
unsigned int | NumRecords |
unsigned int | NumWritten |
Offset_t | CurrentOffset |
NDIndex< Dim > | Size |
std::vector< bool > | ValidField |
std::vector< int > * | VnodeTally |
std::vector< int > * | NumVnodes |
GlobalIDList_t | globalID |
Definition at line 49 of file DiscField.h.
Definition at line 848 of file DiscField.h.
Definition at line 849 of file DiscField.h.
DiscField< Dim >::DiscField | ( | const char * | fname, |
const char * | config, | ||
unsigned int | numFields, | ||
const char * | typestr = 0 |
||
) |
Definition at line 52 of file DiscField.hpp.
DiscField< Dim >::DiscField | ( | const char * | fname, |
unsigned int | numFields, | ||
const char * | typestr = 0 |
||
) |
Definition at line 64 of file DiscField.hpp.
DiscField< Dim >::DiscField | ( | const char * | fname, |
const char * | config | ||
) |
Definition at line 76 of file DiscField.hpp.
DiscField< Dim >::DiscField | ( | const char * | fname | ) |
Definition at line 87 of file DiscField.hpp.
Definition at line 142 of file DiscField.hpp.
|
private |
|
private |
Definition at line 873 of file DiscField.hpp.
References Dim, and NDIndex< Dim >::size().
Referenced by DiscField< Dim >::distribute_offsets(), and DiscField< Dim >::read().
|
private |
Definition at line 849 of file DiscField.hpp.
References FieldLayout< Dim >::begin_iv(), FieldLayout< Dim >::end_iv(), NDIndex< Dim >::intersect(), NDIndex< Dim >::size(), and NDIndex< Dim >::touches().
Referenced by DiscField< Dim >::read().
Definition at line 257 of file DiscField.hpp.
References IpplInfo::abort(), endl(), and ERRORMSG.
|
inlineprivate |
Definition at line 1253 of file DiscField.h.
References IpplInfo::abort(), DiscField< Dim >::chunk_domain(), IpplInfo::chunkSize(), IpplInfo::Comm, DiscField< Dim >::Config, DF_OFFSET_TAG, DF_TAG_CYCLE, Dim, Message::get(), getMessage_iter(), DiscConfig::getNodeSMPIndex(), DiscConfig::getNumSMPNodes(), DiscConfig::getSMPNode(), DiscField< Dim >::myBox0(), IpplInfo::myNode(), DiscField< Dim >::mySMP(), Hypervolume::n, TagMaker::next_tag(), DiscField< Dim >::offset_data_to_domain(), IpplInfo::perSMPParallelIO(), DiscField< Dim >::pNodesPerSMP(), Message::put(), Message::putmsg(), Communicate::receive_block(), Communicate::send(), Message::setCopy(), Message::setDelete(), NDIndex< Dim >::size(), Attrib::Legacy::Distribution::T, and NDIndex< Dim >::touches().
Referenced by DiscField< Dim >::read().
|
inlineprivate |
Definition at line 1447 of file DiscField.h.
References Dim, and DFOffsetData< Dim, T >::vnodedata.
Referenced by DiscField< Dim >::write_offset_and_data().
Definition at line 948 of file DiscField.h.
References DiscField< Dim >::Config, and DiscConfig::fileSMPs().
Definition at line 108 of file DiscField.h.
References DiscField< Dim >::DataDimension.
Definition at line 114 of file DiscField.h.
Definition at line 101 of file DiscField.h.
References DiscField< Dim >::Size.
Referenced by DiscField< Dim >::read(), and DiscField< Dim >::write().
Definition at line 98 of file DiscField.h.
References DiscField< Dim >::NumFields.
Definition at line 95 of file DiscField.h.
References DiscField< Dim >::NumRecords.
Definition at line 111 of file DiscField.h.
References DiscField< Dim >::TypeString.
|
private |
Definition at line 96 of file DiscField.hpp.
References Dim.
|
private |
Definition at line 303 of file DiscField.hpp.
References FieldLayout< Dim >::begin_iv(), FieldLayout< Dim >::begin_rdv(), FieldLayout< Dim >::end_iv(), FieldLayout< Dim >::end_rdv(), and FieldLayout< Dim >::getDomain().
Referenced by DiscField< Dim >::write().
Definition at line 958 of file DiscField.h.
References DiscField< Dim >::Config, and DiscConfig::getSMPBox0().
Referenced by DiscField< Dim >::distribute_offsets(), DiscField< Dim >::read(), and DiscField< Dim >::write().
Definition at line 953 of file DiscField.h.
References DiscField< Dim >::Config, and DiscConfig::mySMP().
Referenced by DiscField< Dim >::distribute_offsets().
Definition at line 964 of file DiscField.h.
References DiscField< Dim >::Config, and DiscConfig::getNumFiles().
Referenced by DiscField< Dim >::read(), and DiscField< Dim >::write().
|
inlineprivate |
Definition at line 967 of file DiscField.h.
References DiscField< Dim >::Config, and DiscConfig::getNumFiles().
Definition at line 943 of file DiscField.h.
References DiscField< Dim >::Config, and DiscConfig::numSMPs().
|
inlineprivate |
Definition at line 1432 of file DiscField.h.
References Dim, and DFOffsetData< Dim, T >::vnodedata.
Referenced by DiscField< Dim >::distribute_offsets(), and DiscField< Dim >::read().
|
private |
Definition at line 179 of file DiscField.hpp.
References IpplInfo::abort(), endl(), ERRORMSG, and IpplInfo::myNode().
Referenced by DiscField< Dim >::read_offset(), and DiscField< Dim >::write().
|
private |
Definition at line 223 of file DiscField.hpp.
References IpplInfo::abort(), endl(), ERRORMSG, and IpplInfo::myNode().
|
private |
Definition at line 196 of file DiscField.hpp.
References endl(), ERRORMSG, and IpplInfo::myNode().
Referenced by DiscField< Dim >::read(), and DiscField< Dim >::write().
|
private |
Definition at line 373 of file DiscField.hpp.
References IpplInfo::abort(), endl(), ERRORMSG, and IpplInfo::myNode().
|
inlineprivate |
Definition at line 973 of file DiscField.h.
References DiscField< Dim >::Config, and DiscConfig::pNodesPerSMP().
Referenced by DiscField< Dim >::distribute_offsets().
Definition at line 414 of file DiscField.hpp.
Definition at line 417 of file DiscField.hpp.
References endl(), and INFORM_ALL_NODES.
void DiscField< Dim >::query | ( | int & | numRecords, |
int & | numFields, | ||
std::vector< int > & | size | ||
) | const |
Definition at line 160 of file DiscField.hpp.
References IpplInfo::myNode().
|
inline |
Definition at line 593 of file DiscField.h.
References FieldLayout< Dim >::getDomain(), BareField< T, Dim >::getLayout(), and DiscField< Dim >::read().
|
inline |
Definition at line 588 of file DiscField.h.
References DiscField< Dim >::read().
|
inline |
Definition at line 577 of file DiscField.h.
References DiscField< Dim >::read().
|
inline |
Definition at line 140 of file DiscField.h.
References a, IpplInfo::abort(), Communicate::barrier(), LField< T, Dim >::begin(), BareField< T, Dim >::begin_if(), DiscField< Dim >::chunk_domain(), IpplInfo::chunkSize(), IpplInfo::Comm, COMM_ANY_TAG, LField< T, Dim >::Compress(), BareField< T, Dim >::Compress(), BareField< T, Dim >::compressible(), DiscField< Dim >::compute_expected(), DiscField< Dim >::Config, DiscField< Dim >::ConfigOK, NDIndex< Dim >::contains(), DiscField< Dim >::DataDimension, DF_READ_TAG, DF_TAG_CYCLE, Dim, DiscField< Dim >::distribute_offsets(), BareField< T, Dim >::end_if(), endl(), ERRORMSG, BareField< T, Dim >::fillGuardCellsIfNotDirty(), DiscField< Dim >::get_Domain(), LField< T, Dim >::getAllocated(), FieldLayout< Dim >::getDomain(), DiscConfig::getFilename(), BareField< T, Dim >::getLayout(), NDIndex< Dim >::getMessage(), LField< T, Dim >::getOwned(), IpplTimings::getTimer(), NDIndex< Dim >::intersect(), LField< T, Dim >::IsCompressed(), DiscField< Dim >::myBox0(), IpplInfo::myNode(), TagMaker::next_tag(), DiscField< Dim >::NumFields, DiscField< Dim >::numFiles(), DiscField< Dim >::NumRecords, DiscField< Dim >::offset_data_to_domain(), DiscField< Dim >::open_df_file_fd(), PETE_apply(), NDIndex< Dim >::putMessage(), DiscField< Dim >::read_data(), DiscField< Dim >::read_layout(), DiscField< Dim >::read_offset(), Communicate::receive_block(), DiscBuffer::resize(), Communicate::send(), BareField< T, Dim >::setDirtyFlag(), NDIndex< Dim >::size(), IpplTimings::startTimer(), IpplTimings::stopTimer(), Attrib::Legacy::Distribution::T, FieldLayout< Dim >::touch_range_rdv(), NDIndex< Dim >::touches(), LField< T, Dim >::Uncompress(), and DiscField< Dim >::WritingFile.
Referenced by DiscField< Dim >::read(), and DiscField< Dim >::read_data().
|
inline |
Definition at line 583 of file DiscField.h.
References FieldLayout< Dim >::getDomain(), BareField< T, Dim >::getLayout(), and DiscField< Dim >::read().
|
inline |
Definition at line 572 of file DiscField.h.
References FieldLayout< Dim >::getDomain(), BareField< T, Dim >::getLayout(), and DiscField< Dim >::read().
|
inlineprivate |
Definition at line 1383 of file DiscField.h.
References IpplInfo::abort(), Timer::clear(), Timer::clock_time(), endl(), ERRORMSG, PAssert, PAssert_EQ, PAssert_GE, PAssert_GT, DiscField< Dim >::read(), DiscBuffer::readbytes, DiscBuffer::readtime, Timer::start(), Timer::stop(), and Attrib::Legacy::Distribution::T.
Referenced by DiscField< Dim >::read().
Definition at line 799 of file DiscField.hpp.
References IpplInfo::abort(), Dim, endl(), and ERRORMSG.
Referenced by DiscField< Dim >::read().
Definition at line 493 of file DiscField.hpp.
References IpplInfo::abort(), DiscMeta::begin(), begin(), IpplInfo::Comm, DF_READ_META_TAG, DF_TAG_CYCLE, Dim, DiscMeta::end(), end(), endl(), ERRORMSG, Message::get(), getMessage(), IpplInfo::myNode(), Hypervolume::n, TagMaker::next_tag(), PAssert, Message::put(), putMessage(), Communicate::receive_block(), Communicate::send(), and DiscMeta::size().
|
private |
Definition at line 679 of file DiscField.hpp.
References IpplInfo::abort(), Dim, endl(), and ERRORMSG.
|
inlineprivate |
Definition at line 1166 of file DiscField.h.
References IpplInfo::abort(), DiscField< Dim >::Config, endl(), ERRORMSG, DiscConfig::getFilename(), DiscField< Dim >::NumFields, DiscField< Dim >::NumVnodes, DiscField< Dim >::open_df_file(), and DiscField< Dim >::VnodeTally.
Referenced by DiscField< Dim >::read().
|
inline |
Definition at line 833 of file DiscField.h.
References DiscField< Dim >::write().
|
inline |
Definition at line 615 of file DiscField.h.
References IpplInfo::abort(), Communicate::barrier(), LField< T, Dim >::begin(), BareField< T, Dim >::begin_if(), IpplInfo::Comm, COMM_ANY_NODE, DiscField< Dim >::Config, DiscField< Dim >::ConfigOK, BareField< T, Dim >::end_if(), endl(), ERRORMSG, FB_TAG_CYCLE, FB_WRITE_TAG, DiscField< Dim >::get_Domain(), FieldLayout< Dim >::getDomain(), DiscConfig::getFilename(), BareField< T, Dim >::getLayout(), NDIndex< Dim >::getMessage(), LField< T, Dim >::getOwned(), DiscField< Dim >::globalID, DiscField< Dim >::make_globalID(), DiscField< Dim >::myBox0(), IpplInfo::myNode(), DiscField< Dim >::NeedStartRecord, TagMaker::next_tag(), DiscField< Dim >::NumFields, DiscField< Dim >::numFiles(), DiscField< Dim >::NumRecords, DiscField< Dim >::NumVnodes, DiscField< Dim >::NumWritten, DiscField< Dim >::open_df_file(), DiscField< Dim >::open_df_file_fd(), NDIndex< Dim >::putMessage(), Communicate::receive(), Communicate::send(), vmap< Key, T, Compare >::size(), FieldLayout< Dim >::size_iv(), Attrib::Legacy::Distribution::T, DiscField< Dim >::ValidField, DiscField< Dim >::VnodeTally, DiscField< Dim >::write_layout(), DiscField< Dim >::write_meta(), DiscField< Dim >::write_offset_and_data(), and DiscField< Dim >::WritingFile.
Referenced by DiscField< Dim >::write(), and DiscField< Dim >::write_offset_and_data().
Definition at line 760 of file DiscField.hpp.
References IpplInfo::abort(), endl(), and ERRORMSG.
Referenced by DiscField< Dim >::write().
Definition at line 447 of file DiscField.hpp.
References Dim.
Referenced by DiscField< Dim >::write().
|
private |
Definition at line 712 of file DiscField.hpp.
References Dim.
|
inlineprivate |
Definition at line 1039 of file DiscField.h.
References IpplInfo::abort(), IpplInfo::chunkSize(), Timer::clear(), Timer::clock_time(), DFOffsetData< Dim, T >::compressedVal, DiscField< Dim >::CurrentOffset, DiscField< Dim >::domain_to_offset_data(), endl(), ERRORMSG, CompressedBrickIterator< T, Dim >::IsCompressed(), DFOffsetData< Dim, T >::isCompressed, DFOffsetData< Dim, T >::offset, DiscBuffer::resize(), NDIndex< Dim >::size(), Timer::start(), Timer::stop(), Attrib::Legacy::Distribution::T, BrickIterator< T, Dim >::whole(), DiscField< Dim >::write(), DiscBuffer::writebytes, and DiscBuffer::writetime.
Referenced by DiscField< Dim >::write().
Definition at line 863 of file DiscField.h.
|
private |
Definition at line 856 of file DiscField.h.
Referenced by DiscField< Dim >::distribute_offsets(), DiscField< Dim >::fileSMPs(), DiscField< Dim >::myBox0(), DiscField< Dim >::mySMP(), DiscField< Dim >::numFiles(), DiscField< Dim >::numSMPs(), DiscField< Dim >::pNodesPerSMP(), DiscField< Dim >::read(), DiscField< Dim >::read_offset(), and DiscField< Dim >::write().
Definition at line 857 of file DiscField.h.
Referenced by DiscField< Dim >::read(), and DiscField< Dim >::write().
Definition at line 887 of file DiscField.h.
Referenced by DiscField< Dim >::write_offset_and_data().
Definition at line 868 of file DiscField.h.
Referenced by DiscField< Dim >::get_Dimension(), and DiscField< Dim >::read().
|
private |
Definition at line 865 of file DiscField.h.
|
private |
Definition at line 914 of file DiscField.h.
Referenced by DiscField< Dim >::write().
Definition at line 877 of file DiscField.h.
Referenced by DiscField< Dim >::write().
Definition at line 881 of file DiscField.h.
Referenced by DiscField< Dim >::get_NumFields(), DiscField< Dim >::read(), DiscField< Dim >::read_offset(), and DiscField< Dim >::write().
Definition at line 882 of file DiscField.h.
Referenced by DiscField< Dim >::get_NumRecords(), DiscField< Dim >::read(), and DiscField< Dim >::write().
Definition at line 905 of file DiscField.h.
Referenced by DiscField< Dim >::read_offset(), and DiscField< Dim >::write().
Definition at line 883 of file DiscField.h.
Referenced by DiscField< Dim >::write().
Definition at line 890 of file DiscField.h.
Referenced by DiscField< Dim >::get_Domain().
Definition at line 864 of file DiscField.h.
Referenced by DiscField< Dim >::get_TypeString().
Definition at line 893 of file DiscField.h.
Referenced by DiscField< Dim >::write().
Definition at line 899 of file DiscField.h.
Referenced by DiscField< Dim >::read_offset(), and DiscField< Dim >::write().
Definition at line 860 of file DiscField.h.
Referenced by DiscField< Dim >::read(), and DiscField< Dim >::write().