Zoltan2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
test_driver.cpp File Reference
#include <UserInputForTests.hpp>
#include <Zoltan2_Typedefs.hpp>
#include <AdapterForTests.hpp>
#include <Zoltan2_ComparisonHelper.hpp>
#include <Zoltan2_MetricAnalyzer.hpp>
#include <Zoltan2_ProblemFactory.hpp>
#include <Zoltan2_EvaluateFactory.hpp>
#include <Zoltan2_BasicIdentifierAdapter.hpp>
#include <Zoltan2_XpetraCrsGraphAdapter.hpp>
#include <Zoltan2_XpetraCrsMatrixAdapter.hpp>
#include <Zoltan2_XpetraMultiVectorAdapter.hpp>
#include <Zoltan2_Parameters.hpp>
#include <Teuchos_DefaultComm.hpp>
#include <Teuchos_XMLObject.hpp>
#include <Teuchos_FileInputSource.hpp>
#include <sstream>
#include <string>
#include <map>
#include <iostream>
#include <queue>
Include dependency graph for test_driver.cpp:

Go to the source code of this file.

Macros

#define ERRMSG(msg)   if (rank == 0){ std::cerr << "FAIL: " << msg << std::endl; }
 
#define EXC_ERRMSG(msg, e)   if (rank==0){ std::cerr << "FAIL: " << msg << std::endl << e.what() << std::endl;}
 
#define ANALYZE_METRICS(adapterClass, metricAnalyzerClass)
 
#define ANALYZE_METRICS_PARTITIONING(adapterClass)
 
#define ANALYZE_METRICS_ORDERING(adapterClass)
 
#define GET_LOCAL_ORDERING(adapterClass)
 
#define GET_PROBLEM_PARTS(adapterClass)
 
#define GET_IDS_VIEW(adapterClass)
 

Functions

void xmlToModelPList (const Teuchos::XMLObject &xml, Teuchos::ParameterList &plist)
 
bool getParameterLists (const string &inputFileName, queue< ParameterList > &problems, queue< ParameterList > &comparisons, const RCP< const Teuchos::Comm< int > > &comm)
 
bool analyzeMetrics (RCP< EvaluateFactory > evaluateFactory, std::ostringstream &msg, const ParameterList &problem_parameters)
 
LocalOrderingSolution< zlno_t > * getLocalOrderingSolution (RCP< ProblemFactory > problemFactory)
 
const zpart_tgetPartListView (RCP< ProblemFactory > problemFactory)
 
void getIDsView (RCP< AdapterFactory > adapterFactory, const zgno_t *&Ids)
 
bool run (const UserInputForTests &uinput, const ParameterList &problem_parameters, bool bHasComparisons, RCP< ComparisonHelper > &comparison_helper, const RCP< const Teuchos::Comm< int > > &comm)
 
bool mainExecute (int narg, char *arg[], RCP< const Comm< int > > &comm)
 
int main (int narg, char *arg[])
 

Macro Definition Documentation

#define ERRMSG (   msg)    if (rank == 0){ std::cerr << "FAIL: " << msg << std::endl; }

Definition at line 57 of file test_driver.cpp.

#define EXC_ERRMSG (   msg,
 
)    if (rank==0){ std::cerr << "FAIL: " << msg << std::endl << e.what() << std::endl;}

Definition at line 58 of file test_driver.cpp.

#define ANALYZE_METRICS (   adapterClass,
  metricAnalyzerClass 
)
Value:
RCP<EvaluateBaseClass<adapterClass>> pCast = \
rcp_dynamic_cast<EvaluateBaseClass<adapterClass>>( \
evaluateFactory->getEvaluateClass()); \
if(pCast == Teuchos::null) throw std::logic_error( \
"Bad evaluate class cast in analyzeMetrics!" ); \
metricAnalyzerClass analyzer(pCast); \
return analyzer.analyzeMetrics( \
problem_parameters.sublist("Metrics"), msg);
bool analyzeMetrics(RCP< EvaluateFactory > evaluateFactory, std::ostringstream &msg, const ParameterList &problem_parameters)
#define ANALYZE_METRICS_PARTITIONING (   adapterClass)
Value:
ANALYZE_METRICS(adapterClass, \
#define ANALYZE_METRICS(adapterClass, metricAnalyzerClass)
#define ANALYZE_METRICS_ORDERING (   adapterClass)
Value:
ANALYZE_METRICS(adapterClass, \
#define ANALYZE_METRICS(adapterClass, metricAnalyzerClass)
#define GET_LOCAL_ORDERING (   adapterClass)
Value:
return (rcp_dynamic_cast<OrderingProblem<adapterClass>>( \
problemFactory->getProblem()))->getLocalOrderingSolution();
OrderingProblem sets up ordering problems for the user.
#define GET_PROBLEM_PARTS (   adapterClass)
Value:
return (rcp_dynamic_cast<PartitioningProblem<adapterClass>>( \
problemFactory->getProblem()))->getSolution().getPartListView();
PartitioningProblem sets up partitioning problems for the user.
#define GET_IDS_VIEW (   adapterClass)
Value:
return dynamic_cast<adapterClass*>( \
adapterFactory->getMainAdapter())->getIDsView(Ids);
void getIDsView(RCP< AdapterFactory > adapterFactory, const zgno_t *&Ids)

Function Documentation

void xmlToModelPList ( const Teuchos::XMLObject &  xml,
Teuchos::ParameterList &  plist 
)

Definition at line 61 of file test_driver.cpp.

bool getParameterLists ( const string &  inputFileName,
queue< ParameterList > &  problems,
queue< ParameterList > &  comparisons,
const RCP< const Teuchos::Comm< int > > &  comm 
)

Definition at line 84 of file test_driver.cpp.

bool analyzeMetrics ( RCP< EvaluateFactory evaluateFactory,
std::ostringstream &  msg,
const ParameterList &  problem_parameters 
)

Definition at line 127 of file test_driver.cpp.

LocalOrderingSolution<zlno_t>* getLocalOrderingSolution ( RCP< ProblemFactory problemFactory)

Definition at line 161 of file test_driver.cpp.

const zpart_t* getPartListView ( RCP< ProblemFactory problemFactory)

Definition at line 170 of file test_driver.cpp.

void getIDsView ( RCP< AdapterFactory adapterFactory,
const zgno_t *&  Ids 
)

Definition at line 178 of file test_driver.cpp.

bool run ( const UserInputForTests uinput,
const ParameterList &  problem_parameters,
bool  bHasComparisons,
RCP< ComparisonHelper > &  comparison_helper,
const RCP< const Teuchos::Comm< int > > &  comm 
)

Definition at line 186 of file test_driver.cpp.

bool mainExecute ( int  narg,
char *  arg[],
RCP< const Comm< int > > &  comm 
)

Definition at line 425 of file test_driver.cpp.

int main ( int  narg,
char *  arg[] 
)

Definition at line 527 of file test_driver.cpp.