Zoltan2
Loading...
Searching...
No Matches
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.

Classes

class  exception

Macros

#define ERRMSG(msg)
#define EXC_ERRMSG(msg, e)
#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

◆ ERRMSG

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

Definition at line 57 of file test_driver.cpp.

◆ EXC_ERRMSG

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

Definition at line 58 of file test_driver.cpp.

◆ ANALYZE_METRICS

#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);

◆ ANALYZE_METRICS_PARTITIONING

#define ANALYZE_METRICS_PARTITIONING ( adapterClass)
Value:
ANALYZE_METRICS(adapterClass, \
#define ANALYZE_METRICS(adapterClass, metricAnalyzerClass)

◆ ANALYZE_METRICS_ORDERING

#define ANALYZE_METRICS_ORDERING ( adapterClass)

◆ GET_LOCAL_ORDERING

#define GET_LOCAL_ORDERING ( adapterClass)
Value:
return (rcp_dynamic_cast<OrderingProblem<adapterClass>>( \
problemFactory->getProblem()))->getLocalOrderingSolution();
OrderingProblem sets up ordering problems for the user.

◆ GET_PROBLEM_PARTS

#define GET_PROBLEM_PARTS ( adapterClass)
Value:
return (rcp_dynamic_cast<PartitioningProblem<adapterClass>>( \
problemFactory->getProblem()))->getSolution().getPartListView();
PartitioningProblem sets up partitioning problems for the user.

◆ GET_IDS_VIEW

#define GET_IDS_VIEW ( adapterClass)
Value:
return dynamic_cast<adapterClass*>( \
adapterFactory->getMainAdapter())->getIDsView(Ids);

Function Documentation

◆ xmlToModelPList()

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

Definition at line 61 of file test_driver.cpp.

◆ getParameterLists()

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.

◆ analyzeMetrics()

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

Definition at line 127 of file test_driver.cpp.

◆ getLocalOrderingSolution()

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

Definition at line 161 of file test_driver.cpp.

◆ getPartListView()

const zpart_t * getPartListView ( RCP< ProblemFactory > problemFactory)

Definition at line 170 of file test_driver.cpp.

◆ getIDsView()

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

Definition at line 178 of file test_driver.cpp.

◆ run()

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.

◆ mainExecute()

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

Definition at line 425 of file test_driver.cpp.

◆ main()

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

Definition at line 527 of file test_driver.cpp.