Zoltan2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions | Variables
MultiJaggedTest.cpp File Reference
#include <Zoltan2_TestHelpers.hpp>
#include <Zoltan2_XpetraMultiVectorAdapter.hpp>
#include <Zoltan2_BasicVectorAdapter.hpp>
#include <Zoltan2_PartitioningSolution.hpp>
#include <Zoltan2_PartitioningProblem.hpp>
#include <GeometricGenerator.hpp>
#include <Zoltan2_EvaluatePartition.hpp>
#include "Teuchos_XMLParameterListHelpers.hpp"
#include <Teuchos_LAPACK.hpp>
#include <fstream>
#include <string>
Include dependency graph for MultiJaggedTest.cpp:

Go to the source code of this file.

Macros

#define CATCH_EXCEPTIONS_AND_RETURN(pp)
 
#define CATCH_EXCEPTIONS_WITH_COUNT(ierr, pp)
 

Functions

string trim_right_copy (const string &s, const string &delimiters=" \f\n\r\t\v")
 
string trim_left_copy (const string &s, const string &delimiters=" \f\n\r\t\v")
 
string trim_copy (const string &s, const string &delimiters=" \f\n\r\t\v")
 
template<typename Adapter >
void print_boxAssign_result (const char *str, int dim, typename Adapter::scalar_t *lower, typename Adapter::scalar_t *upper, size_t nparts, typename Adapter::part_t *parts)
 
template<typename Adapter >
int run_pointAssign_tests (Zoltan2::PartitioningProblem< Adapter > *problem, RCP< tMVector_t > &coords, bool print_details)
 
template<typename Adapter >
int run_boxAssign_tests (Zoltan2::PartitioningProblem< Adapter > *problem, RCP< tMVector_t > &coords)
 
void readGeoGenParams (string paramFileName, Teuchos::ParameterList &geoparams, const RCP< const Teuchos::Comm< int > > &comm)
 
template<class bv_use_node_t >
int compareWithBasicVectorAdapterTest (RCP< const Teuchos::Comm< int > > &comm, Teuchos::RCP< Teuchos::ParameterList > params, Zoltan2::PartitioningProblem< Zoltan2::XpetraMultiVectorAdapter< tMVector_t >> *problem, RCP< tMVector_t > coords, Zoltan2::XpetraMultiVectorAdapter< tMVector_t >::scalar_t **weights=NULL, int numWeightsPerCoord=0)
 
template<class bv_use_node_t >
int GeometricGenInterface (RCP< const Teuchos::Comm< int > > &comm, int numTeams, int numParts, float imbalance, std::string paramFile, std::string pqParts, std::string pfname, int k, int migration_check_option, int migration_all_to_all_type, zscalar_t migration_imbalance_cut_off, int migration_processor_assignment_type, int migration_doMigration_type, bool uvm, bool print_details, bool test_boxes, bool rectilinear, int mj_premigration_option, int mj_premigration_coordinate_cutoff)
 
template<class bv_use_node_t >
int testFromDataFile (RCP< const Teuchos::Comm< int > > &comm, int numTeams, int numParts, float imbalance, std::string fname, std::string pqParts, std::string pfname, int k, int migration_check_option, int migration_all_to_all_type, zscalar_t migration_imbalance_cut_off, int migration_processor_assignment_type, int migration_doMigration_type, bool uvm, bool print_details, bool test_boxes, bool rectilinear, int mj_premigration_option, int mj_premigration_coordinate_cutoff)
 
string convert_to_string (char *args)
 
bool getArgumentValue (string &argumentid, double &argumentValue, string argumentline)
 
void getArgVals (int narg, char **arg, int &numTeams, int &numParts, float &imbalance, string &pqParts, int &opt, std::string &fname, std::string &pfname, int &k, int &migration_check_option, int &migration_all_to_all_type, zscalar_t &migration_imbalance_cut_off, int &migration_processor_assignment_type, int &migration_doMigration_type, bool &uvm, bool &print_details, bool &test_boxes, bool &rectilinear, int &mj_premigration_option, int &mj_coordinate_cutoff)
 
void print_usage (char *executable)
 
int main (int narg, char *arg[])
 

Variables

const char param_comment = '#'
 

Macro Definition Documentation

#define CATCH_EXCEPTIONS_AND_RETURN (   pp)
Value:
catch (std::runtime_error &e) { \
std::cout << "Runtime exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
return -1; \
} \
catch (std::logic_error &e) { \
std::cout << "Logic exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
return -1; \
} \
catch (std::bad_alloc &e) { \
std::cout << "Bad_alloc exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
return -1; \
} \
catch (std::exception &e) { \
std::cout << "Unknown exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
return -1; \
}

Definition at line 37 of file MultiJaggedTest.cpp.

#define CATCH_EXCEPTIONS_WITH_COUNT (   ierr,
  pp 
)
Value:
catch (std::runtime_error &e) { \
std::cout << "Runtime exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
(ierr)++; \
} \
catch (std::logic_error &e) { \
std::cout << "Logic exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
(ierr)++; \
} \
catch (std::bad_alloc &e) { \
std::cout << "Bad_alloc exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
(ierr)++; \
} \
catch (std::exception &e) { \
std::cout << "Unknown exception returned from " << pp << ": " \
<< e.what() << " FAIL" << std::endl; \
(ierr)++; \
}

Definition at line 59 of file MultiJaggedTest.cpp.

Function Documentation

string trim_right_copy ( const string &  s,
const string &  delimiters = " \f\n\r\t\v" 
)

Definition at line 88 of file MultiJaggedTest.cpp.

string trim_left_copy ( const string &  s,
const string &  delimiters = " \f\n\r\t\v" 
)

Definition at line 95 of file MultiJaggedTest.cpp.

string trim_copy ( const string &  s,
const string &  delimiters = " \f\n\r\t\v" 
)

Definition at line 102 of file MultiJaggedTest.cpp.

template<typename Adapter >
void print_boxAssign_result ( const char *  str,
int  dim,
typename Adapter::scalar_t *  lower,
typename Adapter::scalar_t *  upper,
size_t  nparts,
typename Adapter::part_t parts 
)

Definition at line 110 of file MultiJaggedTest.cpp.

template<typename Adapter >
int run_pointAssign_tests ( Zoltan2::PartitioningProblem< Adapter > *  problem,
RCP< tMVector_t > &  coords,
bool  print_details 
)

Definition at line 134 of file MultiJaggedTest.cpp.

template<typename Adapter >
int run_boxAssign_tests ( Zoltan2::PartitioningProblem< Adapter > *  problem,
RCP< tMVector_t > &  coords 
)

Definition at line 267 of file MultiJaggedTest.cpp.

void readGeoGenParams ( string  paramFileName,
Teuchos::ParameterList &  geoparams,
const RCP< const Teuchos::Comm< int > > &  comm 
)

Definition at line 457 of file MultiJaggedTest.cpp.

template<class bv_use_node_t >
int compareWithBasicVectorAdapterTest ( RCP< const Teuchos::Comm< int > > &  comm,
Teuchos::RCP< Teuchos::ParameterList >  params,
Zoltan2::PartitioningProblem< Zoltan2::XpetraMultiVectorAdapter< tMVector_t >> *  problem,
RCP< tMVector_t coords,
Zoltan2::XpetraMultiVectorAdapter< tMVector_t >::scalar_t **  weights = NULL,
int  numWeightsPerCoord = 0 
)

Definition at line 521 of file MultiJaggedTest.cpp.

template<class bv_use_node_t >
int GeometricGenInterface ( RCP< const Teuchos::Comm< int > > &  comm,
int  numTeams,
int  numParts,
float  imbalance,
std::string  paramFile,
std::string  pqParts,
std::string  pfname,
int  k,
int  migration_check_option,
int  migration_all_to_all_type,
zscalar_t  migration_imbalance_cut_off,
int  migration_processor_assignment_type,
int  migration_doMigration_type,
bool  uvm,
bool  print_details,
bool  test_boxes,
bool  rectilinear,
int  mj_premigration_option,
int  mj_premigration_coordinate_cutoff 
)

Definition at line 637 of file MultiJaggedTest.cpp.

template<class bv_use_node_t >
int testFromDataFile ( RCP< const Teuchos::Comm< int > > &  comm,
int  numTeams,
int  numParts,
float  imbalance,
std::string  fname,
std::string  pqParts,
std::string  pfname,
int  k,
int  migration_check_option,
int  migration_all_to_all_type,
zscalar_t  migration_imbalance_cut_off,
int  migration_processor_assignment_type,
int  migration_doMigration_type,
bool  uvm,
bool  print_details,
bool  test_boxes,
bool  rectilinear,
int  mj_premigration_option,
int  mj_premigration_coordinate_cutoff 
)

Definition at line 813 of file MultiJaggedTest.cpp.

string convert_to_string ( char *  args)

Definition at line 1130 of file MultiJaggedTest.cpp.

bool getArgumentValue ( string &  argumentid,
double &  argumentValue,
string  argumentline 
)

Definition at line 1136 of file MultiJaggedTest.cpp.

void getArgVals ( int  narg,
char **  arg,
int &  numTeams,
int &  numParts,
float &  imbalance,
string &  pqParts,
int &  opt,
std::string &  fname,
std::string &  pfname,
int &  k,
int &  migration_check_option,
int &  migration_all_to_all_type,
zscalar_t migration_imbalance_cut_off,
int &  migration_processor_assignment_type,
int &  migration_doMigration_type,
bool &  uvm,
bool &  print_details,
bool &  test_boxes,
bool &  rectilinear,
int &  mj_premigration_option,
int &  mj_coordinate_cutoff 
)

Definition at line 1147 of file MultiJaggedTest.cpp.

void print_usage ( char *  executable)

Definition at line 1329 of file MultiJaggedTest.cpp.

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

Definition at line 1347 of file MultiJaggedTest.cpp.

Variable Documentation

const char param_comment = '#'
Test:
MultiJaggedTest.cpp An example of the use of the MultiJagged algorithm to partition coordinate data.

Definition at line 86 of file MultiJaggedTest.cpp.