95 std::ostringstream
strs;
200 std::string
cpuname(
"Undefined");
206 std::ifstream
cpuinfo(
"/proc/cpuinfo");
208 if((
cpuinfo.rdstate()&
cpuinfo.failbit)) std::cout<<
"Failed to open filen\n";
250 if (std::ifstream (
filename.c_str ())) {
273 for (
int i = 0;
i <
machine.numChildren (); ++
i) {
278 <<
"\"; only children with Tag = \"Configuration\" are allowed in a "
285 "A Configuration needs to have a child \"MachineConfiguration\" and a "
300 for (
int k = 0;
k <
old_test.numChildren (); ++
k) {
306 std::runtime_error,
"A TestEntry needs to have a child "
307 "\"TestConfiguration\" and a child \"TestResults\".");
347 std::cout << std::endl
350 std::cout <<
" Existing Value: \"" <<
oldv_str <<
"\"" << std::endl;
356 std::cout << std::endl
359 std::cout <<
" Existing Value: \"" <<
oldv_str <<
"\"" << std::endl;
367 std::cout << std::endl
370 std::cout <<
" Existing Value: \"" <<
oldv_str <<
"\"" << std::endl;
377 std::cout <<
"Error New test has same name as an existing one, but one of the old entries is missing." << std::endl;
An object representation of a subset of XML data.
Tools for an XML-based performance test archive.
#define TEUCHOS_COMPILER_NAME
#define TEUCHOS_COMPILER_VERSION
int size(const Comm< Ordinal > &comm)
Get the number of processes in the communicator.
Concrete serial communicator subclass.
int getTag() const
The current tag.
The XMLObjectImplem class takes care of the low-level implementation details of XMLObject.
Representation of an XML data tree. XMLObject is a ref-counted handle to a XMLObjectImplem object,...
RCP< XMLObjectImplem > ptr_
const std::string & getTag() const
Return the tag of the current node.
int numContentLines() const
Return the number of lines of character content stored in this node.
const XMLObject & getChild(int i) const
Return the i-th child node.
const std::string & getContentLine(int i) const
Return the i-th line of character content stored in this node.
int numChildren() const
Return the number of child nodes owned by this node.
Subclass of XMLObject used by the performance archive.
const XMLObject * xml_object() const
void addBool(const std::string &name, bool val)
bool hasSameElements(XMLTestNode const &lhs) const
void appendContentLine(const size_t &i, const std::string &str)
void addInt(const std::string &name, int val)
void addValueTolerance(const std::string &name, ValueTolerance val)
bool hasChild(const std::string &name) const
XMLTestNode getChild(const std::string &name) const
void addDouble(const std::string &name, double val)
void addString(const std::string &name, std::string val)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
XMLTestNode PerfTest_MachineConfig()
PerfTest_MachineConfig generates a basic machine configuration XMLTestNode.
PerfTestResult
ReturnValues for PerfTest_CheckOrAdd_Test.
@ PerfTestNewConfiguration
@ PerfTestNewTestConfiguration
PerfTestResult PerfTest_CheckOrAdd_Test(XMLTestNode machine_config, XMLTestNode new_test, const std::string filename, const std::string ext_hostname)
Check whether a test is present and match an existing test in an archive.
ValueTolerance is a struct to keep a tuple of value and a tolerance. The tolerance can be either expr...
void from_string(const std::string &valtol_str)
bool operator==(ValueTolerance &rhs)