OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
DiscConfig Class Reference

#include <DiscConfig.h>

Collaboration diagram for DiscConfig:
Collaboration graph
[legend]

Classes

struct  NodeData
 
struct  SMPData
 

Public Member Functions

 DiscConfig (const char *, const char *, bool)
 
 ~DiscConfig ()
 
bool ok () const
 
const std::string & getConfigFile () const
 
unsigned int numSMPs () const
 
unsigned int fileSMPs () const
 
unsigned int mySMP () const
 
unsigned int getSMPIndex () const
 
unsigned int getSMPIndex (const std::string &smpname) const
 
const std::string & getSMPHost () const
 
const std::string & getSMPHost (unsigned int smp) const
 
unsigned int getNumSMPNodes () const
 
unsigned int getNumSMPNodes (unsigned int smp) const
 
unsigned int getSMPNode (unsigned int n) const
 
unsigned int getSMPNode (unsigned int smp, unsigned int n) const
 
unsigned int getSMPBox0 () const
 
unsigned int getSMPBox0 (unsigned int smp) const
 
unsigned int getNumFiles () const
 
unsigned int getNumFiles (unsigned int smp) const
 
const std::string & getFilename (unsigned int fn) const
 
const std::string & getFilename (unsigned int smp, unsigned int fn) const
 
unsigned int getNumOtherSMP () const
 
unsigned int getNumOtherSMP (unsigned int smp) const
 
unsigned int getOtherSMP (unsigned int sn) const
 
unsigned int getOtherSMP (unsigned int smp, unsigned int sn) const
 
unsigned int pNodesPerSMP (unsigned int node) const
 
unsigned int getNumNodes () const
 
unsigned int getNodeSMPIndex (unsigned int n) const
 
const std::string & getNodeHost (unsigned int n) const
 
void printDebug (Inform &)
 

Static Public Member Functions

static int dc_tokenize_string (const char *s, const char *tok, std::string *&)
 

Private Member Functions

std::string replace_wildcards (const std::string &s, const std::string &machine)
 
void add_SMP_directory (SMPData *&, const std::string &s, const std::string &m, bool)
 
bool parse_config (const char *, bool)
 

Private Attributes

std::string ConfigFile
 
unsigned int NumSMPs
 
unsigned int FileSMPs
 
unsigned int MySMP
 
bool ConfigOK
 
vmap< std::string, SMPData * > SMPMap
 
std::vector< SMPData * > SMPList
 
std::vector< NodeData * > NodeList
 

Detailed Description

Definition at line 58 of file DiscConfig.h.

Constructor & Destructor Documentation

◆ DiscConfig()

DiscConfig::DiscConfig ( const char *  config,
const char *  BaseFile,
bool  WritingFile 
)

Definition at line 81 of file DiscConfig.cpp.

References IpplInfo::abort(), ConfigFile, ConfigOK, endl(), ERRORMSG, and parse_config().

Here is the call graph for this function:

◆ ~DiscConfig()

DiscConfig::~DiscConfig ( )

Definition at line 100 of file DiscConfig.cpp.

References NodeList, and SMPList.

Member Function Documentation

◆ add_SMP_directory()

void DiscConfig::add_SMP_directory ( SMPData *&  ,
const std::string &  s,
const std::string &  m,
bool   
)
private

◆ dc_tokenize_string()

int DiscConfig::dc_tokenize_string ( const char *  s,
const char *  tok,
std::string *&   
)
static

Definition at line 46 of file DiscConfig.cpp.

Referenced by add_SMP_directory(), parse_config(), and DiscMeta::read_meta_line().

◆ fileSMPs()

unsigned int DiscConfig::fileSMPs ( ) const
inline

◆ getConfigFile()

const std::string & DiscConfig::getConfigFile ( ) const
inline

Definition at line 76 of file DiscConfig.h.

References ConfigFile.

Referenced by printDebug().

◆ getFilename() [1/2]

const std::string & DiscConfig::getFilename ( unsigned int  fn) const
inline

◆ getFilename() [2/2]

const std::string & DiscConfig::getFilename ( unsigned int  smp,
unsigned int  fn 
) const
inline

Definition at line 128 of file DiscConfig.h.

References SMPList.

◆ getNodeHost()

const std::string & DiscConfig::getNodeHost ( unsigned int  n) const
inline

Definition at line 162 of file DiscConfig.h.

References Hypervolume::n, and NodeList.

Referenced by printDebug().

◆ getNodeSMPIndex()

unsigned int DiscConfig::getNodeSMPIndex ( unsigned int  n) const
inline

Definition at line 157 of file DiscConfig.h.

References Hypervolume::n, and NodeList.

Referenced by DiscField< Dim >::distribute_offsets(), and printDebug().

◆ getNumFiles() [1/2]

unsigned int DiscConfig::getNumFiles ( ) const
inline

◆ getNumFiles() [2/2]

unsigned int DiscConfig::getNumFiles ( unsigned int  smp) const
inline

Definition at line 120 of file DiscConfig.h.

References SMPList.

◆ getNumNodes()

unsigned int DiscConfig::getNumNodes ( ) const
inline

Definition at line 154 of file DiscConfig.h.

References NodeList.

Referenced by printDebug().

◆ getNumOtherSMP() [1/2]

unsigned int DiscConfig::getNumOtherSMP ( ) const
inline

Definition at line 133 of file DiscConfig.h.

References getNumOtherSMP(), and MySMP.

Referenced by getNumOtherSMP(), printDebug(), DiscParticle::read_meta(), and DiscParticle::write().

Here is the call graph for this function:

◆ getNumOtherSMP() [2/2]

unsigned int DiscConfig::getNumOtherSMP ( unsigned int  smp) const
inline

Definition at line 134 of file DiscConfig.h.

References SMPList.

◆ getNumSMPNodes() [1/2]

unsigned int DiscConfig::getNumSMPNodes ( ) const
inline

Definition at line 101 of file DiscConfig.h.

References getNumSMPNodes(), and MySMP.

Referenced by DiscField< Dim >::distribute_offsets(), getNumSMPNodes(), printDebug(), DiscParticle::read_meta(), and DiscParticle::write().

Here is the call graph for this function:

◆ getNumSMPNodes() [2/2]

unsigned int DiscConfig::getNumSMPNodes ( unsigned int  smp) const
inline

Definition at line 102 of file DiscConfig.h.

References SMPList.

◆ getOtherSMP() [1/2]

unsigned int DiscConfig::getOtherSMP ( unsigned int  smp,
unsigned int  sn 
) const
inline

Definition at line 142 of file DiscConfig.h.

References SMPList.

◆ getOtherSMP() [2/2]

unsigned int DiscConfig::getOtherSMP ( unsigned int  sn) const
inline

Definition at line 139 of file DiscConfig.h.

References getOtherSMP(), and MySMP.

Referenced by getOtherSMP(), printDebug(), DiscParticle::read_meta(), and DiscParticle::write().

Here is the call graph for this function:

◆ getSMPBox0() [1/2]

unsigned int DiscConfig::getSMPBox0 ( ) const
inline

Definition at line 113 of file DiscConfig.h.

References getSMPBox0(), and MySMP.

Referenced by getSMPBox0(), DiscField< Dim >::myBox0(), printDebug(), DiscParticle::read(), DiscParticle::read_meta(), DiscParticle::write(), and DiscParticle::write_meta().

Here is the call graph for this function:

◆ getSMPBox0() [2/2]

unsigned int DiscConfig::getSMPBox0 ( unsigned int  smp) const
inline

Definition at line 114 of file DiscConfig.h.

References SMPList.

◆ getSMPHost() [1/2]

const std::string & DiscConfig::getSMPHost ( ) const
inline

Definition at line 95 of file DiscConfig.h.

References getSMPHost(), and MySMP.

Referenced by getSMPHost(), and printDebug().

Here is the call graph for this function:

◆ getSMPHost() [2/2]

const std::string & DiscConfig::getSMPHost ( unsigned int  smp) const
inline

Definition at line 96 of file DiscConfig.h.

References SMPList.

◆ getSMPIndex() [1/2]

unsigned int DiscConfig::getSMPIndex ( ) const
inline

Definition at line 89 of file DiscConfig.h.

References MySMP.

◆ getSMPIndex() [2/2]

unsigned int DiscConfig::getSMPIndex ( const std::string &  smpname) const
inline

Definition at line 90 of file DiscConfig.h.

References SMPMap.

◆ getSMPNode() [1/2]

unsigned int DiscConfig::getSMPNode ( unsigned int  n) const
inline

Definition at line 107 of file DiscConfig.h.

References getSMPNode(), MySMP, and Hypervolume::n.

Referenced by DiscField< Dim >::distribute_offsets(), getSMPNode(), printDebug(), and DiscParticle::read_meta().

Here is the call graph for this function:

◆ getSMPNode() [2/2]

unsigned int DiscConfig::getSMPNode ( unsigned int  smp,
unsigned int  n 
) const
inline

Definition at line 108 of file DiscConfig.h.

References Hypervolume::n, and SMPList.

◆ mySMP()

unsigned int DiscConfig::mySMP ( ) const
inline

Definition at line 82 of file DiscConfig.h.

References MySMP.

Referenced by DiscField< Dim >::mySMP(), printDebug(), and DiscParticle::read_meta().

◆ numSMPs()

unsigned int DiscConfig::numSMPs ( ) const
inline

Definition at line 80 of file DiscConfig.h.

References NumSMPs.

Referenced by DiscField< Dim >::numSMPs(), and printDebug().

◆ ok()

bool DiscConfig::ok ( ) const
inline

Definition at line 73 of file DiscConfig.h.

References ConfigOK.

Referenced by DiscParticle::initialize().

◆ parse_config()

bool DiscConfig::parse_config ( const char *  BaseFile,
bool  WritingFile 
)
private

◆ pNodesPerSMP()

unsigned int DiscConfig::pNodesPerSMP ( unsigned int  node) const

Definition at line 123 of file DiscConfig.cpp.

References getNumFiles(), NodeList, and SMPList.

Referenced by DiscField< Dim >::pNodesPerSMP().

Here is the call graph for this function:

◆ printDebug()

void DiscConfig::printDebug ( Inform msg)

◆ replace_wildcards()

string DiscConfig::replace_wildcards ( const std::string &  s,
const std::string &  machine 
)
private

Definition at line 150 of file DiscConfig.cpp.

References IpplInfo::abort(), endl(), ERRORMSG, and IpplInfo::myNode().

Referenced by add_SMP_directory().

Here is the call graph for this function:

Member Data Documentation

◆ ConfigFile

std::string DiscConfig::ConfigFile
private

Definition at line 205 of file DiscConfig.h.

Referenced by DiscConfig(), getConfigFile(), and parse_config().

◆ ConfigOK

bool DiscConfig::ConfigOK
private

Definition at line 215 of file DiscConfig.h.

Referenced by DiscConfig(), and ok().

◆ FileSMPs

unsigned int DiscConfig::FileSMPs
private

Definition at line 210 of file DiscConfig.h.

Referenced by fileSMPs(), and parse_config().

◆ MySMP

unsigned int DiscConfig::MySMP
private

◆ NodeList

std::vector<NodeData *> DiscConfig::NodeList
private

◆ NumSMPs

unsigned int DiscConfig::NumSMPs
private

Definition at line 209 of file DiscConfig.h.

Referenced by numSMPs(), and parse_config().

◆ SMPList

std::vector<SMPData *> DiscConfig::SMPList
private

◆ SMPMap

vmap<std::string,SMPData *> DiscConfig::SMPMap
private

Definition at line 220 of file DiscConfig.h.

Referenced by add_SMP_directory(), getSMPIndex(), and parse_config().


The documentation for this class was generated from the following files: