Zoltan2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Namespaces | Classes | Typedefs | Enumerations | Functions
Zoltan2 Namespace Reference

Namespaces

 Details
 

Classes

class  AlgSerialGreedy
 
class  AlgBlockMapping
 
class  AlgDefaultMapping
 
struct  GMWM_triplet
 
class  AlgAMD
 
class  AlgNatural
 
class  AlgND
 
class  AlgRandom
 
class  AlgRCM
 
class  AlgSortedDegree
 
class  Matcher
 An implementation of the Matcher interface that operates on Epetra matrices and Graphs. More...
 
class  SortPairs
 
class  AlgBlock
 
class  uMultiSortItem
 Class for sorting items with multiple values. First sorting with respect to val[0], then val[1] then ... val[count-1]. The last tie breaking is done with index values. Used for task mapping partitioning where the points on a cut line needs to be distributed consistently. More...
 
struct  uSortItem
 Sort items for quick sort function. More...
 
struct  uSignedSortItem
 
class  AlgMJ
 Multi Jagged coordinate partitioning algorithm. More...
 
class  Zoltan2_AlgMJ
 Multi Jagged coordinate partitioning algorithm. More...
 
class  AlgParMA
 
class  AlgParMETIS
 
class  AlgPuLP
 
class  AlgPTScotch
 
class  coordinateModelPartBox
 coordinateModelPartBox Class, represents the boundaries of the box which is a result of a geometric partitioning algorithm. More...
 
class  GridHash
 GridHash Class, Hashing Class for part boxes. More...
 
class  AlgMatrix
 
class  GNO_LNO_PAIR
 
class  KmeansHeap
 KmeansHeap Class, max heap, but holds the minimum values. More...
 
class  KMeansCluster
 KMeansCluster Class. More...
 
class  KMeansAlgorithm
 KMeansAlgorithm Class that performs clustering of the coordinates, and returns the closest set of coordinates. Useful to filter the processors, when there are more processors than needed. More...
 
class  CommunicationModel
 CommunicationModel Base Class that performs mapping between the coordinate partitioning result. More...
 
class  CoordinateCommunicationModel
 CoordinateModelInput Class that performs mapping between the coordinate partitioning result and mpi ranks base on the coordinate results and mpi physical coordinates. More...
 
class  CoordinateTaskMapper
 
class  AlgZoltan
 
class  AlgForTestingOnly
 
class  Algorithm
 Algorithm defines the base class for all algorithms. More...
 
struct  TPL_Traits
 
struct  TPL_Traits< first_t, first_t >
 
struct  TPL_Traits< ZOLTAN_ID_PTR, second_t >
 
struct  TPL_Traits< first_t, ZOLTAN_ID_PTR >
 
class  Zoltan2_Directory_Node
 
class  Zoltan2_DD_Update_Msg
 
class  Zoltan2_DD_Find_Msg
 
class  Zoltan2_DD_Remove_Msg
 
class  Zoltan2_Directory
 Zoltan2_Directory is an abstract base class. More...
 
class  Zoltan2_Directory_Simple
 
class  Zoltan2_Directory_Vector
 
class  Zoltan2_Directory_Plan
 
class  Zoltan2_Directory_Comm
 
class  DebugManager
 DebugManager contains the methods that perform output of debug and status messages. More...
 
class  Environment
 The user parameters, debug, timing and memory profiling output objects, and error checking methods. More...
 
class  NotImplemented
 Exception thrown when a called base-class method is not implemented. More...
 
class  IntegerRangeListValidator
 A ParameterList validator for integer range lists. More...
 
class  IntegerRangeListValidatorXMLConverter
 XML conversion code for IntegerRangeListValidator. More...
 
class  Machine
 MachineClass Base class for representing machine coordinates, networks, etc. More...
 
class  MachineForTesting
 A Machine Class for testing only A more realistic machine should be used for task mapping. More...
 
class  DefaultMachine
 A Default MachineRepresentation Class for testing only A more correct machine representation should be used for task mapping. More...
 
class  MachineRCA
 A Machine Class for testing only A more realistic machine should be used for task mapping. More...
 
class  MachineRCATest
 A Machine Class for testing only A more realistic machine should be used for task mapping. More...
 
class  MachineRepresentation
 MachineRepresentation Class Base class for representing machine coordinates, networks, etc. More...
 
class  MachineTopoMgr
 A Machine Class for testing only A more realistic machine should be used for task mapping. More...
 
class  MachineBGQTest
 A Machine Class for testing only A more realistic machine should be used for task mapping. More...
 
class  MetricOutputManager
 MetricOutputManager handles output of profiling messages. More...
 
class  TimerManager
 
class  BaseAdapterRoot
 BaseAdapter defines methods required by all Adapters. More...
 
class  BaseAdapter
 
class  APFMeshAdapter
 
class  BasicIdentifierAdapter
 This class represents a collection of global Identifiers and their associated weights, if any. More...
 
class  BasicKokkosIdentifierAdapter
 This class represents a collection of global Identifiers and their associated weights, if any. More...
 
class  BasicVectorAdapter
 BasicVectorAdapter represents a vector (plus optional weights) supplied by the user as pointers to strided arrays. More...
 
class  GraphAdapter
 GraphAdapter defines the interface for graph-based user data. More...
 
class  IdentifierAdapter
 IdentifierAdapter defines the interface for identifiers. More...
 
class  BasicUserTypes
 A simple class that can be the User template argument for an InputAdapter. More...
 
struct  InputTraits
 The traits required of User input classes or structures. More...
 
class  MatrixAdapter
 MatrixAdapter defines the adapter interface for matrices. More...
 
class  MeshAdapter
 MeshAdapter defines the interface for mesh input. More...
 
class  PamgenMeshAdapter
 This class represents a mesh. More...
 
class  TpetraRowGraphAdapter
 Provides access for Zoltan2 to Tpetra::RowGraph data. More...
 
class  TpetraRowMatrixAdapter
 Provides access for Zoltan2 to Tpetra::RowMatrix data. More...
 
class  VectorAdapter
 VectorAdapter defines the interface for vector input. More...
 
class  XpetraCrsGraphAdapter
 Provides access for Zoltan2 to Xpetra::CrsGraph data. More...
 
class  XpetraCrsMatrixAdapter
 Provides access for Zoltan2 to Xpetra::CrsMatrix data. More...
 
class  XpetraMultiVectorAdapter
 An adapter for Xpetra::MultiVector. More...
 
struct  XpetraTraits
 Defines the traits required for Tpetra, Eptra and Xpetra objects. More...
 
class  CoordinateModel
 This class provides geometric coordinates with optional weights to the Zoltan2 algorithm. More...
 
class  GraphModel
 GraphModel defines the interface required for graph models. More...
 
class  HyperGraphModel
 HyperGraphModel defines the interface required for hyper graph models. More...
 
class  IdentifierModel
 IdentifierModel defines the interface for all identifier models. More...
 
class  Model
 The base class for all model classes. More...
 
class  ColoringProblem
 ColoringProblem sets up coloring problems for the user. More...
 
class  ColoringSolution
 The class containing coloring solution. More...
 
class  MappingProblem
 MappingProblem enables mapping of a partition (either computed or input) to MPI ranks. More...
 
class  MappingSolution
 PartitionMapping maps a solution or an input distribution to ranks. More...
 
class  MatrixPartitioningProblem
 MatrixPartitioningProblem sets up partitioning problems for the user. More...
 
class  MatrixPartitioningSolution
 A PartitioningSolution is a solution to a partitioning problem. More...
 
class  OrderingProblem
 OrderingProblem sets up ordering problems for the user. More...
 
class  OrderingSolution
 The class containing ordering solutions. More...
 
class  LocalOrderingSolution
 
class  GlobalOrderingSolution
 
class  PartitioningProblem
 PartitioningProblem sets up partitioning problems for the user. More...
 
class  PartitioningSolution
 A PartitioningSolution is a solution to a partitioning problem. More...
 
class  PartitionMapping
 PartitionMapping maps a solution or an input distribution to ranks. More...
 
class  ProblemRoot
 ProblemRoot allows ptr storage and safe dynamic_cast of all. More...
 
class  Problem
 Problem base class from which other classes (PartitioningProblem, ColoringProblem, OrderingProblem, MatchingProblem, etc.) derive. More...
 
class  Solution
 Just a placeholder for now. More...
 
class  BaseClassMetrics
 
class  perProcessorComponentMetrics
 
class  EvaluateBaseClassRoot
 A base class for EvaluatePartition, EvaluateOrdering, ... More...
 
class  EvaluateBaseClass
 
class  EvaluateMapping
 A class that computes and returns quality metrics. More...
 
class  EvaluateOrdering
 A class that computes and returns quality metrics. base class for the local and global ordering versions. More...
 
class  EvaluateLocalOrdering
 
class  EvaluateGlobalOrdering
 
class  EvaluatePartition
 A class that computes and returns quality metrics. More...
 
class  GraphMetrics
 
class  ImbalanceMetrics
 
class  StridedData
 The StridedData class manages lists of weights or coordinates. More...
 

Typedefs

typedef
::Tpetra::Details::DefaultTypes::local_ordinal_type 
default_lno_t
 
typedef
::Tpetra::Details::DefaultTypes::global_ordinal_type 
default_gno_t
 
typedef size_t default_offset_t
 
typedef
::Tpetra::Details::DefaultTypes::scalar_type 
default_scalar_t
 
typedef
::Tpetra::Details::DefaultTypes::node_type 
default_node_t
 
typedef int default_part_t
 
typedef std::bitset
< NUM_MODEL_FLAGS
modelFlag_t
 
typedef Tpetra::global_size_t global_size_t
 

Enumerations

enum  blockParams {
  block_balanceCount, block_balanceWeight, block_minTotalWeight, block_minMaximumWeight,
  block_balanceTotalMaximum, NUM_BLOCK_PARAMS
}
 The boolean parameters of interest to the Block algorithm. More...
 
enum  RangeType { RANGE_INCLUDES_ALL, RANGE_IS_EMPTY, RANGE_IS_LISTED, NUM_RANGE_TYPES }
 Codes that indicate how to interpret the Array<int> representing the user's integer range list. More...
 
enum  AssertionLevel {
  NO_ASSERTIONS, BASIC_ASSERTION, COMPLEX_ASSERTION, DEBUG_MODE_ASSERTION,
  NUM_ASSERTION_LEVELS
}
 Level of error checking or assertions desired. More...
 
enum  MessageOutputLevel {
  NO_STATUS, BASIC_STATUS, DETAILED_STATUS, VERBOSE_DETAILED_STATUS,
  NUM_STATUS_OUTPUT_LEVELS
}
 The amount of debugging or status output to print. More...
 
enum  TimerType {
  NO_TIMERS, MACRO_TIMERS, MICRO_TIMERS, BOTH_TIMERS,
  TEST_TIMERS, NUM_TIMING_OPTIONS
}
 The type of timers which should be active. More...
 
enum  OSType { COUT_STREAM, CERR_STREAM, NULL_STREAM, NUM_OUTPUT_STREAMS }
 Output stream types. More...
 
enum  multiCriteriaNorm { normMinimizeTotalWeight, normBalanceTotalMaximum, normMinimizeMaximumWeight, normNumNorms }
 Enumerator used in code for multicriteria norm choice. More...
 
enum  BaseAdapterType {
  InvalidAdapterType = 0, IdentifierAdapterType, VectorAdapterType, MatrixAdapterType,
  GraphAdapterType, MeshAdapterType
}
 An enum to identify general types of adapters. More...
 
enum  GraphEntityType { GRAPH_VERTEX, GRAPH_EDGE }
 Enumerated entity type for graphs: Vertices or Edges. More...
 
enum  MatrixEntityType { MATRIX_ROW, MATRIX_COLUMN, MATRIX_NONZERO }
 
enum  MeshEntityType { MESH_VERTEX, MESH_EDGE, MESH_FACE, MESH_REGION }
 Enumerate entity types for meshes: Regions, Faces, Edges, or Vertices. More...
 
enum  EntityTopologyType {
  POINT, LINE_SEGMENT, POLYGON, TRIANGLE,
  QUADRILATERAL, POLYHEDRON, TETRAHEDRON, HEXAHEDRON,
  PRISM, PYRAMID
}
 Enumerate entity topology types for meshes: points,lines,polygons,triangles,quadrilaterals, polyhedrons, tetrahedrons, hexhedrons, prisms, or pyramids. More...
 
enum  CentricView { HYPEREDGE_CENTRIC, VERTEX_CENTRIC }
 Enumerate the views for the pins: HYPEREDGE_CENTRIC: pins are the global ids of the vertices as seen by the hyperedges VERTEX_CENTRIC: pins are the global ids of the hyperedges as seen by the vertices. More...
 
enum  ModelType {
  HypergraphModelType, GraphModelType, CoordinateModelType, IdentifierModelType,
  MAX_NUM_MODEL_TYPES
}
 An identifier for the general type of model. More...
 
enum  ModelFlags {
  GENERATE_CONSECUTIVE_IDS, BUILD_LOCAL_GRAPH, SYMMETRIZE_INPUT_TRANSPOSE, SYMMETRIZE_INPUT_BIPARTITE,
  VERTICES_ARE_MATRIX_ROWS, VERTICES_ARE_MATRIX_COLUMNS, VERTICES_ARE_MATRIX_NONZEROS, VERTICES_ARE_MESH_NODES,
  VERTICES_ARE_MESH_ELEMENTS, REMOVE_SELF_EDGES, BUILD_SUBSET_GRAPH, NUM_MODEL_FLAGS
}
 Flags are set by a Problem to tell a Model what transformations it may need to do on the user's input. More...
 

Functions

template<typename vtx_t , typename wgt_t >
static bool compare_triplets (GMWM_triplet< vtx_t, wgt_t > a, GMWM_triplet< vtx_t, wgt_t > b)
 
template<typename vtx_t , typename wgt_t >
vtx_t GreedyMWM (int *idx, vtx_t *adj, wgt_t *wgt, vtx_t tnVtx, vtx_t *match)
 
template<typename Adapter >
int AlgSpectral (const RCP< GraphModel< Adapter > > &model, const RCP< LocalOrderingSolution< typename Adapter::lno_t > > &solution, const RCP< Teuchos::ParameterList > &pl, const RCP< const Teuchos::Comm< int > > &comm)
 
template<typename T >
T * allocMemory (size_t size)
 Allocates memory for the given size. More...
 
template<typename T >
void freeArray (T *&array)
 Frees the given array. More...
 
template<class IT , class WT >
void uqsort (IT n, uSortItem< IT, WT > *arr)
 Quick sort function. Sorts the arr of uSortItems, with respect to increasing vals. More...
 
template<class IT , class WT , class SIGN >
void uqSignsort (IT n, uSignedSortItem< IT, WT, SIGN > *arr)
 Quick sort function. Sorts the arr of uSignedSortItems, with respect to increasing vals. More...
 
static void getScotchParameters (Teuchos::ParameterList &pl)
 
template<typename it >
it z2Fact (it x)
 
template<typename IT >
void ithPermutation (const IT n, IT i, IT *perm)
 
template<typename part_t >
void getGridCommunicationGraph (part_t taskCount, part_t *&task_comm_xadj, part_t *&task_comm_adj, std::vector< int > grid_dims)
 
template<typename Adapter , typename scalar_t , typename part_t >
void getSolutionCenterCoordinates (const Environment *envConst, const Teuchos::Comm< int > *comm, const Zoltan2::CoordinateModel< typename Adapter::base_adapter_t > *coords, const part_t *parts, int coordDim, part_t ntasks, scalar_t **partCenters)
 
template<typename Adapter , typename scalar_t , typename part_t >
void getCoarsenedPartGraph (const Environment *envConst, const Teuchos::Comm< int > *comm, const Zoltan2::GraphModel< typename Adapter::base_adapter_t > *graph, part_t np, const part_t *parts, ArrayRCP< part_t > &g_part_xadj, ArrayRCP< part_t > &g_part_adj, ArrayRCP< scalar_t > &g_part_ew)
 
template<typename T >
void fillContinousArray (T *arr, size_t arrSize, T *val)
 fillContinousArray function More...
 
template<typename part_t , typename pcoord_t , typename tcoord_t >
void coordinateTaskMapperInterface (RCP< const Teuchos::Comm< int > > problemComm, int proc_dim, int num_processors, pcoord_t **machine_coords, int task_dim, part_t num_tasks, tcoord_t **task_coords, part_t *task_comm_xadj, part_t *task_comm_adj, pcoord_t *task_communication_edge_weight_, part_t *proc_to_task_xadj, part_t *proc_to_task_adj, int recursion_depth, part_t *part_no_array, const part_t *machine_dimensions, int num_ranks_per_node=1, bool divide_to_prime_first=false)
 Constructor The interface function that calls CoordinateTaskMapper which will also perform the mapping operation. The result mapping can be obtained by -proc_to_task_xadj: which holds the beginning and end indices of tasks on proc_to_task_adj that is assigned to a processor. the tasks assigned to processor i are between proc_to_task_xadj[i] and proc_to_task_xadj[i+1] on proc_to_task_adj. More...
 
template<typename proc_coord_t , typename v_lno_t >
void visualize_mapping (int myRank, const int machine_coord_dim, const int num_ranks, proc_coord_t **machine_coords, const v_lno_t num_tasks, const v_lno_t *task_communication_xadj, const v_lno_t *task_communication_adj, const int *task_to_rank)
 
template<typename Adapter >
static int zoltanNumObj (void *data, int *ierr)
 
template<typename Adapter >
static void zoltanObjList (void *data, int nGidEnt, int nLidEnt, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int wdim, float *wgts, int *ierr)
 
template<typename Adapter >
static void zoltanParts (void *data, int, int nLidEnt, int nObj, ZOLTAN_ID_PTR, ZOLTAN_ID_PTR lids, int *parts, int *ierr)
 
template<typename Adapter >
static int zoltanNumGeom (void *data, int *ierr)
 
template<typename Adapter >
static void zoltanGeom (void *data, int, int nLidEnt, int nObj, ZOLTAN_ID_PTR, ZOLTAN_ID_PTR lids, int nDim, double *coords, int *ierr)
 
template<typename Adapter >
static void zoltanHGSizeCS_withGraphAdapter (void *data, int *nLists, int *nPins, int *format, int *ierr)
 
template<typename Adapter >
static void zoltanHGCS_withGraphAdapter (void *data, int nGidEnt, int nLists, int, int, ZOLTAN_ID_PTR listIds, int *listIdx, ZOLTAN_ID_PTR pinIds, int *ierr)
 
template<typename Adapter >
static void zoltanHGSizeEdgeWts_withGraphAdapter (void *data, int *nEdges, int *ierr)
 
template<typename Adapter >
static void zoltanHGEdgeWts_withGraphAdapter (void *data, int nGidEnt, int nLidEnt, int nEdges, int, ZOLTAN_ID_PTR edgeGids, ZOLTAN_ID_PTR edgeLids, float *edgeWgts, int *ierr)
 
template<typename Adapter >
static void zoltanHGSizeCS_withMatrixAdapter (void *data, int *nLists, int *nPins, int *format, int *ierr)
 
template<typename Adapter >
static void zoltanHGCS_withMatrixAdapter (void *data, int nGidEnt, int nLists, int nPins, int format, ZOLTAN_ID_PTR listIds, int *listIdx, ZOLTAN_ID_PTR pinIds, int *ierr)
 
template<typename Adapter >
static void zoltanHGSizeCS_withMeshAdapter (void *data, int *nLists, int *nPins, int *format, int *ierr)
 
template<typename Adapter >
static void zoltanHGCS_withMeshAdapter (void *data, int nGidEnt, int nLists, int nPins, int format, ZOLTAN_ID_PTR listIds, int *listIdx, ZOLTAN_ID_PTR pinIds, int *ierr)
 
template<typename Adapter >
static int zoltanHGNumObj_withModel (void *data, int *ierr)
 
template<typename Adapter >
static void zoltanHGObjList_withModel (void *data, int nGidEnt, int nLidEnt, ZOLTAN_ID_PTR gids, ZOLTAN_ID_PTR lids, int wdim, float *wgts, int *ierr)
 
template<typename Adapter >
static void zoltanHGSizeCS_withModel (void *data, int *nEdges, int *nPins, int *format, int *ierr)
 
template<typename Adapter >
static void zoltanHGCS_withModel (void *data, int nGidEnt, int nEdges, int nPins, int format, ZOLTAN_ID_PTR edgeIds, int *edgeIdx, ZOLTAN_ID_PTR pinIds, int *ierr)
 
void makeDebugManager (int rank, bool iPrint, int level, std::string fname, int ost, Teuchos::RCP< DebugManager > &mgr)
 Create an output manager for debugging or status information. More...
 
template<typename metric_t >
void makeMetricOutputManager (int rank, bool iPrint, std::string fname, int ost, Teuchos::RCP< MetricOutputManager< metric_t > > &mgr, std::string units, int fieldWidth, RCP< std::ofstream > &fptr)
 Create an output manager for a metric value. More...
 
template<typename Integral >
bool validIntegralRangeList (const Teuchos::Array< Integral > &vals)
 A helper function that indicates whether an array is a valid integer range list. More...
 
template<typename Integral >
bool allValuesAreInRangeList (const Teuchos::Array< Integral > &vals)
 A helper function that determines if all values are in the list. More...
 
template<typename Integral >
bool allValuesAreInRangeList (const Teuchos::ParameterEntry &e)
 A helper function that determines if all values are in the list. More...
 
template<typename Integral >
bool noValuesAreInRangeList (const Teuchos::Array< Integral > &vals)
 A helper function that determines if no values are in the list. More...
 
template<typename Integral >
bool noValuesAreInRangeList (const Teuchos::ParameterEntry &e)
 A helper function that determines if no values are in the list. More...
 
template<typename Integral >
bool IsInRangeList (const Integral val, const Teuchos::Array< Integral > &valList, bool sorted=true)
 A helper function that determines if a value is in the list. More...
 
template<typename Integral >
bool IsInRangeList (const Integral val, const Teuchos::ParameterEntry &e)
 A helper function that determines if a value is in the list. More...
 
template<typename Integral >
Teuchos::ArrayView< Integral > getList (Teuchos::Array< Integral > &irl)
 A helper function that returns a view of the list. More...
 
template<typename Integral >
void printIntegralRangeList (std::ostream &os, Teuchos::Array< Integral > &irl)
 A helper function that prints the meaning of an encoded integer range list. More...
 
void createAllParameters (Teuchos::ParameterList &pList)
 Create a list of all Zoltan2 parameters and validators. More...
 
static void setValidatorsInList (const Teuchos::ParameterList &plSome, const Teuchos::ParameterList &plAll, Teuchos::ParameterList &plVal)
 Create a parameter list that can validate a specific list of parameters. More...
 
void createValidatorList (const Teuchos::ParameterList &plIn, Teuchos::ParameterList &plOut)
 Create a list by adding validators to the users parameter list. More...
 
void printListDocumentation (const Teuchos::ParameterList &pl, std::ostream &os, std::string listNames)
 
template<typename User >
RCP< Tpetra::CrsMatrix< int,
typename MeshAdapter< User >
::lno_t, typename MeshAdapter
< User >::gno_t, typename
MeshAdapter< User >::node_t > > 
get2ndAdjsMatFromAdjs (const Teuchos::RCP< const MeshAdapter< User > > &ia, const RCP< const Comm< int > > comm, Zoltan2::MeshEntityType sourcetarget, Zoltan2::MeshEntityType through)
 
template<typename User >
void get2ndAdjsViewFromAdjs (const Teuchos::RCP< const MeshAdapter< User > > &ia, const RCP< const Comm< int > > comm, Zoltan2::MeshEntityType sourcetarget, Zoltan2::MeshEntityType through, Teuchos::ArrayRCP< typename MeshAdapter< User >::offset_t > &offsets, Teuchos::ArrayRCP< typename MeshAdapter< User >::gno_t > &adjacencyIds)
 
template<typename SolutionAdapter , typename DataAdapter >
size_t getImportList (const PartitioningSolution< SolutionAdapter > &solution, const DataAdapter *const data, ArrayRCP< typename DataAdapter::gno_t > &imports)
 From a PartitioningSolution, get a list of IDs to be imported. Assumes part numbers in PartitioningSolution are to be used as rank numbers. More...
 
void AlltoAllCount (const Comm< int > &comm, const Environment &env, const ArrayView< const int > &sendCount, const ArrayView< int > &recvCount)
 Each process sends a value to every process, an all-to-all. More...
 
template<>
void AlltoAllv (const Comm< int > &comm, const Environment &env, const ArrayView< const std::string > &sendBuf, const ArrayView< const int > &sendCount, ArrayRCP< std::string > &recvBuf, const ArrayView< int > &recvCount)
 
template<>
void AlltoAllv (const Comm< int > &comm, const Environment &env, const ArrayView< const unsigned short > &sendBuf, const ArrayView< const int > &sendCount, ArrayRCP< unsigned short > &recvBuf, const ArrayView< int > &recvCount)
 
template<>
void AlltoAllv (const Comm< int > &comm, const Environment &env, const ArrayView< const unsigned char > &sendBuf, const ArrayView< const int > &sendCount, ArrayRCP< unsigned char > &recvBuf, const ArrayView< int > &recvCount)
 
template<typename T >
void AlltoAllv (const Comm< int > &comm, const Environment &env, const ArrayView< const T > &sendBuf, const ArrayView< const int > &sendCount, ArrayRCP< T > &recvBuf, const ArrayView< int > &recvCount)
 AlltoAllv sends/receives data to/from all processes. More...
 
template<typename gno_t >
size_t findUniqueGidsCommon (size_t num_keys, int num_gid, ZOLTAN_ID_PTR ddkeys, char *ddnewgids, MPI_Comm mpicomm)
 
template<typename lno_t , typename gno_t >
size_t findUniqueGids (Tpetra::MultiVector< gno_t, lno_t, gno_t > &keys, Tpetra::Vector< gno_t, lno_t, gno_t > &gids)
 
template<typename key_t , typename gno_t >
size_t findUniqueGids (std::vector< key_t > &keys, std::vector< gno_t > &gids, const Teuchos::Comm< int > &comm)
 
template<typename Adapter , typename MachineRep = MachineRepresentation<typename Adapter::scalar_t, typename Adapter::part_t>>
void globalWeightedByPart (const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, const RCP< const GraphModel< typename Adapter::base_adapter_t > > &graph, const ArrayView< const typename Adapter::part_t > &parts, typename Adapter::part_t &numParts, ArrayRCP< RCP< BaseClassMetrics< typename Adapter::scalar_t > > > &metrics, ArrayRCP< typename Adapter::scalar_t > &globalSums, bool bMessages=true, const RCP< const MachineRep > machine=Teuchos::null)
 Given the local partitioning, compute the global weighted cuts in each part. More...
 
template<typename scalar_t , typename part_t >
void printGraphMetricsHeader (std::ostream &os, part_t targetNumParts, part_t numParts)
 Print out header info for graph metrics. More...
 
template<typename scalar_t , typename part_t >
void printGraphMetrics (std::ostream &os, part_t targetNumParts, part_t numParts, const ArrayView< RCP< BaseClassMetrics< scalar_t > > > &infoList)
 Print out list of graph metrics. More...
 
template<typename scalar_t , typename part_t >
void printGraphMetrics (std::ostream &os, part_t targetNumParts, part_t numParts, RCP< BaseClassMetrics< scalar_t >> metricValue)
 Print out header and a single graph metric. More...
 
template<typename scalar_t , typename lno_t , typename part_t >
void globalSumsByPart (const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, const ArrayView< const part_t > &part, int vwgtDim, const ArrayView< StridedData< lno_t, scalar_t > > &vwgts, multiCriteriaNorm mcNorm, part_t targetNumParts, part_t &numExistingParts, part_t &numNonemptyParts, ArrayRCP< RCP< BaseClassMetrics< scalar_t > > > &metrics, ArrayRCP< scalar_t > &globalSums)
 Given the local partitioning, compute the global sums in each part. More...
 
template<typename Adapter >
void imbalanceMetrics (const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, multiCriteriaNorm mcNorm, const Adapter *ia, const PartitioningSolution< Adapter > *solution, const ArrayView< const typename Adapter::part_t > &partArray, const RCP< const GraphModel< typename Adapter::base_adapter_t > > &graphModel, typename Adapter::part_t &numExistingParts, typename Adapter::part_t &numNonemptyParts, ArrayRCP< RCP< BaseClassMetrics< typename Adapter::scalar_t > > > &metrics)
 Compute imbalance metrics for a distribution. More...
 
template<typename scalar_t , typename part_t >
void printImbalanceMetricsHeader (std::ostream &os, part_t targetNumParts, part_t numExistingParts, part_t numNonemptyParts)
 Print out header info for imbalance metrics. More...
 
template<typename scalar_t , typename part_t >
void printImbalanceMetrics (std::ostream &os, part_t targetNumParts, part_t numExistingParts, part_t numNonemptyParts, const ArrayView< RCP< BaseClassMetrics< scalar_t > > > &infoList)
 Print out list of imbalance metrics. More...
 
template<typename scalar_t , typename part_t >
void printImbalanceMetrics (std::ostream &os, part_t targetNumParts, part_t numExistingParts, part_t numNonemptyParts, RCP< BaseClassMetrics< scalar_t >> metricValue)
 Print out header and a single imbalance metric. More...
 
void addNumberToFileName (int number, std::string fname, std::string &newf)
 Helper method to add number to a file name. More...
 
template<typename metric_t , typename scalar_t >
RCP< metric_t > addNewMetric (const RCP< const Environment > &env, ArrayRCP< RCP< BaseClassMetrics< scalar_t > > > &metrics)
 
template<typename scalar_t >
void getStridedStats (const ArrayView< scalar_t > &v, int stride, int offset, scalar_t &min, scalar_t &max, scalar_t &sum)
 Find min, max and sum of metric values. More...
 
template<typename scalar_t >
void getStridedStats (const ArrayView< scalar_t > &v, int stride, int offset, scalar_t &max, scalar_t &sum)
 Find max and sum of graph metric values. More...
 
template<typename scalar_t , typename lno_t , typename part_t >
void normedPartWeights (const RCP< const Environment > &env, part_t numberOfParts, const ArrayView< const part_t > &parts, const ArrayView< StridedData< lno_t, scalar_t > > &vwgts, multiCriteriaNorm mcNorm, scalar_t *weights)
 Compute the total weight in each part on this process. More...
 
template<typename scalar_t , typename part_t >
void computeImbalances (part_t numExistingParts, part_t targetNumParts, const scalar_t *psizes, scalar_t sumVals, const scalar_t *vals, scalar_t &min, scalar_t &max, scalar_t &avg)
 Compute the imbalance. More...
 
template<typename scalar_t , typename part_t >
void computeImbalances (part_t numExistingParts, part_t targetNumParts, int numSizes, ArrayView< ArrayRCP< scalar_t > > psizes, scalar_t sumVals, const scalar_t *vals, scalar_t &min, scalar_t &max, scalar_t &avg)
 Compute the imbalance in the case of multiple part sizes. More...
 
template<typename scalar_t >
scalar_t normedWeight (ArrayView< scalar_t > weights, multiCriteriaNorm norm)
 Compute the norm of the vector of weights. More...
 
template<typename lno_t , typename scalar_t >
scalar_t normedWeight (ArrayView< StridedData< lno_t, scalar_t > > weights, lno_t idx, multiCriteriaNorm norm)
 Compute the norm of the vector of weights stored as StridedData. More...
 
template<typename scalar_t , typename T >
static void getInputArrayHelper (ArrayRCP< const T > &target, const ArrayRCP< const scalar_t > &src)
 
template<typename scalar_t >
static void getInputArrayHelper (ArrayRCP< const scalar_t > &target, const ArrayRCP< const scalar_t > &src)
 
long getProcessKilobytes ()
 
template<typename scalar_t >
bool outsideRegion (scalar_t val, scalar_t mark, double epsilon)
 
std::string Zoltan2_Version ()
 

Typedef Documentation

typedef ::Tpetra::Details::DefaultTypes::local_ordinal_type Zoltan2::default_lno_t

Definition at line 73 of file Zoltan2_InputTraits.hpp.

typedef ::Tpetra::Details::DefaultTypes::global_ordinal_type Zoltan2::default_gno_t

Definition at line 76 of file Zoltan2_InputTraits.hpp.

typedef size_t Zoltan2::default_offset_t

Definition at line 79 of file Zoltan2_InputTraits.hpp.

typedef ::Tpetra::Details::DefaultTypes::scalar_type Zoltan2::default_scalar_t

Definition at line 82 of file Zoltan2_InputTraits.hpp.

typedef ::Tpetra::Details::DefaultTypes::node_type Zoltan2::default_node_t

Definition at line 85 of file Zoltan2_InputTraits.hpp.

Definition at line 88 of file Zoltan2_InputTraits.hpp.

typedef std::bitset<NUM_MODEL_FLAGS> Zoltan2::modelFlag_t

Definition at line 93 of file Zoltan2_Model.hpp.

typedef Tpetra::global_size_t Zoltan2::global_size_t

Definition at line 119 of file Zoltan2_Standards.hpp.

Enumeration Type Documentation

The boolean parameters of interest to the Block algorithm.

Enumerator
block_balanceCount 

objective = balance_object_count

block_balanceWeight 

objective = balance_object_weight

block_minTotalWeight 

objective = mc_minimize_total_weight

block_minMaximumWeight 

objective = mc_minimize_maximum_weight

block_balanceTotalMaximum 

objective = mc_balance_total_maximum

NUM_BLOCK_PARAMS 

Definition at line 64 of file Zoltan2_AlgBlock.hpp.

Codes that indicate how to interpret the Array<int> representing the user's integer range list.

Enumerator
RANGE_INCLUDES_ALL 

all values were listed

RANGE_IS_EMPTY 

no values were listed

RANGE_IS_LISTED 

the listed values are in the Array<int>

NUM_RANGE_TYPES 

Definition at line 76 of file Zoltan2_IntegerRangeList.hpp.

Level of error checking or assertions desired.

Each assertion in the code must have a level. Tests for logic errors should always be level DEBUG_MODE_ASSERTION. Quick tests are BASIC, longer tests for input errors are COMPLEX.

The user sets the assertion level with the parameter error_check_level.

If compiled with Z2_OMIT_ALL_ERROR_CHECKING, error checks don't happen.

Enumerator
NO_ASSERTIONS 

no assertion checks will be done

BASIC_ASSERTION 

fast typical checks for valid arguments

COMPLEX_ASSERTION 

more involved, like validate a graph

DEBUG_MODE_ASSERTION 

checks for logic errors

NUM_ASSERTION_LEVELS 

Definition at line 81 of file Zoltan2_Parameters.hpp.

The amount of debugging or status output to print.

Each debug/status message must have an output level. The user specfies the level desired with the debug_level parameter.

If Zoltan2 is compiled with Z2_OMIT_ALL_STATUS_MESSAGES, no messages will be processed.

Enumerator
NO_STATUS 

don't display status/debug messages

BASIC_STATUS 

the status at each high level step

DETAILED_STATUS 

sub-steps, each method's entry and exit

VERBOSE_DETAILED_STATUS 

include more detail about sub-steps

NUM_STATUS_OUTPUT_LEVELS 

Definition at line 98 of file Zoltan2_Parameters.hpp.

The type of timers which should be active.

If timing is requested, timer_type can specify MACRO timing or MICRO timing. For example, a MACRO timer would time an algorithm. A MICRO timer would time steps in the algorithm. You can also ask for BOTH, but be aware that your MACRO timer is also timing the MICRO timers as well as the algorithm.

If Zoltan2 is compiled with Z2_OMIT_ALL_PROFILING timing messages are ignored.

Enumerator
NO_TIMERS 

No timing data will be collected (the default).

MACRO_TIMERS 

Time an algorithm (or other entity) as a whole.

MICRO_TIMERS 

Time the substeps of an entity.

BOTH_TIMERS 

Run both MACRO and MICRO timers.

TEST_TIMERS 

Timers added while testing, removed later.

NUM_TIMING_OPTIONS 

Definition at line 118 of file Zoltan2_Parameters.hpp.

Output stream types.

Enumerator
COUT_STREAM 

std::cout

CERR_STREAM 

std::cerr

NULL_STREAM 

/dev/null: do actions but don't output results

NUM_OUTPUT_STREAMS 

Definition at line 130 of file Zoltan2_Parameters.hpp.

Enumerator used in code for multicriteria norm choice.

Enumerator
normMinimizeTotalWeight 

1-norm = Manhattan norm

normBalanceTotalMaximum 

2-norm = sqrt of sum of squares

normMinimizeMaximumWeight 

inf-norm = maximum norm

normNumNorms 

Definition at line 139 of file Zoltan2_Parameters.hpp.

An enum to identify general types of adapters.

Enumerator
InvalidAdapterType 

unused value

IdentifierAdapterType 

identifier data, just a list of IDs

VectorAdapterType 

vector data

MatrixAdapterType 

matrix data

GraphAdapterType 

graph data

MeshAdapterType 

mesh data

Definition at line 63 of file Zoltan2_Adapter.hpp.

Enumerated entity type for graphs: Vertices or Edges.

Enumerator
GRAPH_VERTEX 
GRAPH_EDGE 

Definition at line 61 of file Zoltan2_GraphAdapter.hpp.

Enumerator
MATRIX_ROW 
MATRIX_COLUMN 
MATRIX_NONZERO 

Definition at line 58 of file Zoltan2_MatrixAdapter.hpp.

Enumerate entity types for meshes: Regions, Faces, Edges, or Vertices.

Enumerator
MESH_VERTEX 
MESH_EDGE 
MESH_FACE 
MESH_REGION 

Definition at line 63 of file Zoltan2_MeshAdapter.hpp.

Enumerate entity topology types for meshes: points,lines,polygons,triangles,quadrilaterals, polyhedrons, tetrahedrons, hexhedrons, prisms, or pyramids.

Enumerator
POINT 
LINE_SEGMENT 
POLYGON 
TRIANGLE 
QUADRILATERAL 
POLYHEDRON 
TETRAHEDRON 
HEXAHEDRON 
PRISM 
PYRAMID 

Definition at line 75 of file Zoltan2_MeshAdapter.hpp.

Enumerate the views for the pins: HYPEREDGE_CENTRIC: pins are the global ids of the vertices as seen by the hyperedges VERTEX_CENTRIC: pins are the global ids of the hyperedges as seen by the vertices.

Enumerator
HYPEREDGE_CENTRIC 
VERTEX_CENTRIC 

Definition at line 74 of file Zoltan2_HyperGraphModel.hpp.

An identifier for the general type of model.

Enumerator
HypergraphModelType 
GraphModelType 
CoordinateModelType 
IdentifierModelType 
MAX_NUM_MODEL_TYPES 

Definition at line 60 of file Zoltan2_Model.hpp.

Flags are set by a Problem to tell a Model what transformations it may need to do on the user's input.

Enumerator
GENERATE_CONSECUTIVE_IDS 

algorithm requires consecutive ids

BUILD_LOCAL_GRAPH 

model represents graph within only one rank

SYMMETRIZE_INPUT_TRANSPOSE 

model must symmetrize input

SYMMETRIZE_INPUT_BIPARTITE 

model must symmetrize input

VERTICES_ARE_MATRIX_ROWS 

use matrix rows as graph vertices

VERTICES_ARE_MATRIX_COLUMNS 

use columns as graph vertices

VERTICES_ARE_MATRIX_NONZEROS 

use nonzeros as graph vertices

VERTICES_ARE_MESH_NODES 

use mesh nodes as vertices

VERTICES_ARE_MESH_ELEMENTS 

use mesh elements as vertices

REMOVE_SELF_EDGES 

algorithm requires no self edges

BUILD_SUBSET_GRAPH 

ignore invalid neighbors

NUM_MODEL_FLAGS 

Definition at line 74 of file Zoltan2_Model.hpp.

Function Documentation

template<typename vtx_t , typename wgt_t >
static bool Zoltan2::compare_triplets ( GMWM_triplet< vtx_t, wgt_t >  a,
GMWM_triplet< vtx_t, wgt_t >  b 
)
static

Definition at line 77 of file Zoltan2_GreedyMWM.hpp.

template<typename vtx_t , typename wgt_t >
vtx_t Zoltan2::GreedyMWM ( int *  idx,
vtx_t *  adj,
wgt_t *  wgt,
vtx_t  tnVtx,
vtx_t *  match 
)

Definition at line 85 of file Zoltan2_GreedyMWM.hpp.

template<typename Adapter >
int Zoltan2::AlgSpectral ( const RCP< GraphModel< Adapter > > &  model,
const RCP< LocalOrderingSolution< typename Adapter::lno_t > > &  solution,
const RCP< Teuchos::ParameterList > &  pl,
const RCP< const Teuchos::Comm< int > > &  comm 
)

Definition at line 62 of file Zoltan2_AlgSpectral.hpp.

template<typename T >
T* Zoltan2::allocMemory ( size_t  size)

Allocates memory for the given size.

Definition at line 156 of file Zoltan2_AlgMultiJagged.hpp.

template<typename T >
void Zoltan2::freeArray ( T *&  array)

Frees the given array.

Definition at line 173 of file Zoltan2_AlgMultiJagged.hpp.

template<class IT , class WT >
void Zoltan2::uqsort ( IT  n,
uSortItem< IT, WT > *  arr 
)

Quick sort function. Sorts the arr of uSortItems, with respect to increasing vals.

Definition at line 296 of file Zoltan2_AlgMultiJagged.hpp.

template<class IT , class WT , class SIGN >
void Zoltan2::uqSignsort ( IT  n,
uSignedSortItem< IT, WT, SIGN > *  arr 
)

Quick sort function. Sorts the arr of uSignedSortItems, with respect to increasing vals.

Definition at line 447 of file Zoltan2_AlgMultiJagged.hpp.

static void Zoltan2::getScotchParameters ( Teuchos::ParameterList &  pl)
inlinestatic

Definition at line 64 of file Zoltan2_AlgScotch.hpp.

template<typename it >
it Zoltan2::z2Fact ( it  x)
inline

Definition at line 71 of file Zoltan2_TaskMapping.hpp.

template<typename IT >
void Zoltan2::ithPermutation ( const IT  n,
IT  i,
IT *  perm 
)

Definition at line 84 of file Zoltan2_TaskMapping.hpp.

template<typename part_t >
void Zoltan2::getGridCommunicationGraph ( part_t  taskCount,
part_t *&  task_comm_xadj,
part_t *&  task_comm_adj,
std::vector< int >  grid_dims 
)

Definition at line 113 of file Zoltan2_TaskMapping.hpp.

template<typename Adapter , typename scalar_t , typename part_t >
void Zoltan2::getSolutionCenterCoordinates ( const Environment *  envConst,
const Teuchos::Comm< int > *  comm,
const Zoltan2::CoordinateModel< typename Adapter::base_adapter_t > *  coords,
const part_t parts,
int  coordDim,
part_t  ntasks,
scalar_t **  partCenters 
)

Definition at line 140 of file Zoltan2_TaskMapping.hpp.

template<typename Adapter , typename scalar_t , typename part_t >
void Zoltan2::getCoarsenedPartGraph ( const Environment *  envConst,
const Teuchos::Comm< int > *  comm,
const Zoltan2::GraphModel< typename Adapter::base_adapter_t > *  graph,
part_t  np,
const part_t parts,
ArrayRCP< part_t > &  g_part_xadj,
ArrayRCP< part_t > &  g_part_adj,
ArrayRCP< scalar_t > &  g_part_ew 
)

Definition at line 237 of file Zoltan2_TaskMapping.hpp.

template<typename T >
void Zoltan2::fillContinousArray ( T *  arr,
size_t  arrSize,
T *  val 
)

fillContinousArray function

Parameters
arrarray to be filled in with values.
arrSizethe size of the array.
valthe pointer to the value to be filled. if given NULL, the filling performs arr[i] = i.

Definition at line 865 of file Zoltan2_TaskMapping.hpp.

template<typename part_t , typename pcoord_t , typename tcoord_t >
void Zoltan2::coordinateTaskMapperInterface ( RCP< const Teuchos::Comm< int > >  problemComm,
int  proc_dim,
int  num_processors,
pcoord_t **  machine_coords,
int  task_dim,
part_t  num_tasks,
tcoord_t **  task_coords,
part_t task_comm_xadj,
part_t task_comm_adj,
pcoord_t *  task_communication_edge_weight_,
part_t proc_to_task_xadj,
part_t proc_to_task_adj,
int  recursion_depth,
part_t part_no_array,
const part_t machine_dimensions,
int  num_ranks_per_node = 1,
bool  divide_to_prime_first = false 
)

Constructor The interface function that calls CoordinateTaskMapper which will also perform the mapping operation. The result mapping can be obtained by -proc_to_task_xadj: which holds the beginning and end indices of tasks on proc_to_task_adj that is assigned to a processor. the tasks assigned to processor i are between proc_to_task_xadj[i] and proc_to_task_xadj[i+1] on proc_to_task_adj.

-proc_to_task_adj: holds the task adj array.

-task_comm_xadj, task_comm_adj, task_communication_edge_weight_ can be provided NULL. In this case all processors will calculate the same mapping. -If task_comm_xadj, task_comm_adj and provided, algorithm will perform rotations, and processors will calculate different mappings, and best one will be reduced. -If task_communication_edge_weight_ is provided with task_comm_xadj, task_comm_adj, this will be used when cost is calculated. -recursion_depth is a mandatory argument. In the case part_no_array is not null, this parameter should represent the length of part_no_array. If part_no_array is given as NULL, then this will give the recursion depth for the algorithm, Maximum number is ceil(log_2(min(num_processors, num_tasks))), and providing a higher number will be equivalant to this. Partitioning algorithm will work as RCB when maximum number is given, which performs the best mapping results. -part_no_array: The best results are obtained when this parameter is given as NULL. But if this is provided, partitioning will use this array for partitioning each dimension to the given numbers. The multiplication of these numbers should be equal to min(num_processors, num_tasks). -machine_dimensions: This can be NULL, but if provided the algorithm will perform shift of the machine coords so that the largest gap is treated as wrap-around link.

Parameters
problemCommis the communication object.
proc_dimdimensions of the processor coordinates.
num_processorsis the number of processors
machine_coordsis the coordinates of the processors.
task_dimis the dimension of the tasks.
num_tasksis the number of tasks.
task_coordsis the coordinates of the tasks.
task_comm_xadjis the task communication graphs xadj array. (task i's adjacency is between task_comm_xadj[i] and task_comm_xadj[i+1])
task_comm_adjis task communication graphs adj array.
task_communication_edge_weight_is the weight of the communication in task graph.
proc_to_task_xadjis is the output for tasks showing which proc has the which parts. (proc-i will own the tasks from proc_to_task_xadj[i] to proc_to_task_xadj[i+1])
proc_to_task_adjis the ouput list of tasks pointed by proc_to_task_xadj
recursion_depthis the recursion depth that will be applied to partitioning. If part_no_array is provided, then it is the length of this array.
part_no_arrayif part_no_array is provided, partitioning algorithm will be forced to use * this array for partitioning. However, the multiplication of each entries in this array should be equal to min(num_processors, num_tasks).
*machine_dimensions,:the dimensions of the machine network. For example for hopper 17x8x24 This can be NULL, but if provided the algorithm will perform shift of the machine coords so that the largest gap is treated as wrap-around link.

Definition at line 2877 of file Zoltan2_TaskMapping.hpp.

template<typename proc_coord_t , typename v_lno_t >
void Zoltan2::visualize_mapping ( int  myRank,
const int  machine_coord_dim,
const int  num_ranks,
proc_coord_t **  machine_coords,
const v_lno_t  num_tasks,
const v_lno_t *  task_communication_xadj,
const v_lno_t *  task_communication_adj,
const int *  task_to_rank 
)
inline

Definition at line 2954 of file Zoltan2_TaskMapping.hpp.

template<typename Adapter >
static int Zoltan2::zoltanNumObj ( void *  data,
int *  ierr 
)
static

Definition at line 74 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanObjList ( void *  data,
int  nGidEnt,
int  nLidEnt,
ZOLTAN_ID_PTR  gids,
ZOLTAN_ID_PTR  lids,
int  wdim,
float *  wgts,
int *  ierr 
)
static

Definition at line 83 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanParts ( void *  data,
int  ,
int  nLidEnt,
int  nObj,
ZOLTAN_ID_PTR  ,
ZOLTAN_ID_PTR  lids,
int *  parts,
int *  ierr 
)
static

Definition at line 126 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static int Zoltan2::zoltanNumGeom ( void *  data,
int *  ierr 
)
static

Definition at line 146 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanGeom ( void *  data,
int  ,
int  nLidEnt,
int  nObj,
ZOLTAN_ID_PTR  ,
ZOLTAN_ID_PTR  lids,
int  nDim,
double *  coords,
int *  ierr 
)
static

Definition at line 156 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanHGSizeCS_withGraphAdapter ( void *  data,
int *  nLists,
int *  nPins,
int *  format,
int *  ierr 
)
static

Definition at line 186 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanHGCS_withGraphAdapter ( void *  data,
int  nGidEnt,
int  nLists,
int  ,
int  ,
ZOLTAN_ID_PTR  listIds,
int *  listIdx,
ZOLTAN_ID_PTR  pinIds,
int *  ierr 
)
static

Definition at line 204 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanHGSizeEdgeWts_withGraphAdapter ( void *  data,
int *  nEdges,
int *  ierr 
)
static

Definition at line 257 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanHGEdgeWts_withGraphAdapter ( void *  data,
int  nGidEnt,
int  nLidEnt,
int  nEdges,
int  ,
ZOLTAN_ID_PTR  edgeGids,
ZOLTAN_ID_PTR  edgeLids,
float *  edgeWgts,
int *  ierr 
)
static

Definition at line 275 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanHGSizeCS_withMatrixAdapter ( void *  data,
int *  nLists,
int *  nPins,
int *  format,
int *  ierr 
)
static

Definition at line 338 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanHGCS_withMatrixAdapter ( void *  data,
int  nGidEnt,
int  nLists,
int  nPins,
int  format,
ZOLTAN_ID_PTR  listIds,
int *  listIdx,
ZOLTAN_ID_PTR  pinIds,
int *  ierr 
)
static

Definition at line 379 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanHGSizeCS_withMeshAdapter ( void *  data,
int *  nLists,
int *  nPins,
int *  format,
int *  ierr 
)
static

Definition at line 450 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanHGCS_withMeshAdapter ( void *  data,
int  nGidEnt,
int  nLists,
int  nPins,
int  format,
ZOLTAN_ID_PTR  listIds,
int *  listIdx,
ZOLTAN_ID_PTR  pinIds,
int *  ierr 
)
static

Definition at line 487 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static int Zoltan2::zoltanHGNumObj_withModel ( void *  data,
int *  ierr 
)
static

Definition at line 558 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanHGObjList_withModel ( void *  data,
int  nGidEnt,
int  nLidEnt,
ZOLTAN_ID_PTR  gids,
ZOLTAN_ID_PTR  lids,
int  wdim,
float *  wgts,
int *  ierr 
)
static

Definition at line 568 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanHGSizeCS_withModel ( void *  data,
int *  nEdges,
int *  nPins,
int *  format,
int *  ierr 
)
static

Definition at line 623 of file Zoltan2_AlgZoltanCallbacks.hpp.

template<typename Adapter >
static void Zoltan2::zoltanHGCS_withModel ( void *  data,
int  nGidEnt,
int  nEdges,
int  nPins,
int  format,
ZOLTAN_ID_PTR  edgeIds,
int *  edgeIdx,
ZOLTAN_ID_PTR  pinIds,
int *  ierr 
)
static

Definition at line 641 of file Zoltan2_AlgZoltanCallbacks.hpp.

void Zoltan2::makeDebugManager ( int  rank,
bool  iPrint,
int  level,
std::string  fname,
int  ost,
Teuchos::RCP< DebugManager > &  mgr 
)

Create an output manager for debugging or status information.

Parameters
rankthe MPI rank of the calling process in the application
iPrinttrue if this process should output information
fnamename of file to which output is to be appended, or or Z2_UNSET_STRING
ostoutput stream type
mgron return, a pointer to the created output manager

Definition at line 77 of file Zoltan2_Environment.cpp.

template<typename metric_t >
void Zoltan2::makeMetricOutputManager ( int  rank,
bool  iPrint,
std::string  fname,
int  ost,
Teuchos::RCP< MetricOutputManager< metric_t > > &  mgr,
std::string  units,
int  fieldWidth,
RCP< std::ofstream > &  fptr 
)

Create an output manager for a metric value.

Parameters
rankthe MPI rank of the calling process in the application
iPrinttrue if this process should print metric information
fnamename of file to which output is to be appended, or or Z2_UNSET_STRING
ostoutput stream type
mgron return, a pointer to the created output manager
fptron return, an RCP to an ofstream if one was created.

The template parameter is the data type of the entity being measured.

Definition at line 663 of file Zoltan2_Environment.hpp.

template<typename Integral >
bool Zoltan2::validIntegralRangeList ( const Teuchos::Array< Integral > &  vals)

A helper function that indicates whether an array is a valid integer range list.

Parameters
valsAn array that may encode an integer range list.
Returns
true if the array encodes such a list, false otherwise.

Definition at line 96 of file Zoltan2_IntegerRangeList.hpp.

template<typename Integral >
bool Zoltan2::allValuesAreInRangeList ( const Teuchos::Array< Integral > &  vals)

A helper function that determines if all values are in the list.

Parameters
valsAn array encoding an integer range list.
Returns
true if the array encoding implies all values, false otherwise.

If the array is not a valid encoding of an integer range list, a std::runtime_error will be thrown.

If the user's parameter value was "all", then after validation the parameter value will be an array of size one containing a code that indicates all values are included, and this function will return true.

Definition at line 126 of file Zoltan2_IntegerRangeList.hpp.

template<typename Integral >
bool Zoltan2::allValuesAreInRangeList ( const Teuchos::ParameterEntry &  e)

A helper function that determines if all values are in the list.

Parameters
eA parameter entry
Returns
true if the entry value is an array encoding all values, false otherwise.

If the entry value is not a valid encoding of an integer range list, a std::runtime_error will be thrown.

If the user's parameter value was "all", then after validation the parameter value will be an array of size one containing a code that indicates all values are included, and this function will return true.

Definition at line 148 of file Zoltan2_IntegerRangeList.hpp.

template<typename Integral >
bool Zoltan2::noValuesAreInRangeList ( const Teuchos::Array< Integral > &  vals)

A helper function that determines if no values are in the list.

Parameters
valsAn array encoding an integer range list.
Returns
true if the array encoding implies no values, false otherwise.

If the array is not a valid encoding of an integer range list, a std::runtime_error will be thrown.

If the user's parameter value was empty, then after validation the parameter value will be an array of size one containing a code that indicates no values are included, and this function will return true.

Definition at line 173 of file Zoltan2_IntegerRangeList.hpp.

template<typename Integral >
bool Zoltan2::noValuesAreInRangeList ( const Teuchos::ParameterEntry &  e)

A helper function that determines if no values are in the list.

Parameters
eA parameter entry
Returns
true if the entry value is an array encoding no values, false otherwise.

If the entry value is not a valid encoding of an integer range list, a std::runtime_error will be thrown.

If the user's parameter value was empty, then after validation the parameter value will be an array of size one containing a code that indicates no values are included, and this function will return true.

Definition at line 195 of file Zoltan2_IntegerRangeList.hpp.

template<typename Integral >
bool Zoltan2::IsInRangeList ( const Integral  val,
const Teuchos::Array< Integral > &  valList,
bool  sorted = true 
)

A helper function that determines if a value is in the list.

Parameters
valA value that could be in the list.
valsAn array encoding an integer range list.
sortedSet to false if the integer range list is not sorted
Returns
true if the encoding of vals implies val is in the list, false otherwise.

If vals is not a valid encoding of an integer range list, a std::runtime_error will be thrown.

Definition at line 220 of file Zoltan2_IntegerRangeList.hpp.

template<typename Integral >
bool Zoltan2::IsInRangeList ( const Integral  val,
const Teuchos::ParameterEntry &  e 
)

A helper function that determines if a value is in the list.

Parameters
valA value that could be in the list.
eA parameter entry
Returns
true if the entry value implies val is in the list, false otherwise.

If the entry value is not a valid encoding of an integer range list, a std::runtime_error will be thrown.

Definition at line 255 of file Zoltan2_IntegerRangeList.hpp.

template<typename Integral >
Teuchos::ArrayView<Integral> Zoltan2::getList ( Teuchos::Array< Integral > &  irl)

A helper function that returns a view of the list.

Parameters
irlThe value of an integer range list parameter after it has been validated
Returns
If the user's parameter value did not imply "all" or "none", then a view of the array of integers implied by the value is returned. Otherwise an empty array is returned.

Definition at line 297 of file Zoltan2_IntegerRangeList.hpp.

template<typename Integral >
void Zoltan2::printIntegralRangeList ( std::ostream &  os,
Teuchos::Array< Integral > &  irl 
)

A helper function that prints the meaning of an encoded integer range list.

Parameters
osAn output stream to which the list will be printed.
valA value of an integer range list parameter after it has been validated.

Definition at line 317 of file Zoltan2_IntegerRangeList.hpp.

void Zoltan2::createAllParameters ( Teuchos::ParameterList &  pList)

Create a list of all Zoltan2 parameters and validators.

Parameters
pListon return, pList is the parameter list that was created.

This is the validating parameter list that can be used to process the user's parameter list.

Definition at line 71 of file Zoltan2_Parameters.cpp.

static void Zoltan2::setValidatorsInList ( const Teuchos::ParameterList &  plSome,
const Teuchos::ParameterList &  plAll,
Teuchos::ParameterList &  plVal 
)
static

Create a parameter list that can validate a specific list of parameters.

Parameters
plSomethe user's parameter list
plAlla parameter list with all Zoltan2 parameters and their validators
plValon return is a parameter list with all of the user's parameters, but with validators.

Environment::commitParameters() calls validateParametersAndSetDefaults() on the user's parameter list rather than validateParameters() because we want the validators' validateAndModify() methods to be called rather than the validate() methods. But unfortunately, validateAndModify() in addition to modifying the parameter if necessary also sets it to a default if the parameter does not appear in the user's parameter list.

We want the user's parameters to be modified, but we do not want unset parameters to appear in the validated user's parameter list. To achieve this, we create a validating list that contains only the parameters that appear in the user's parameter list.

Definition at line 120 of file Zoltan2_Parameters.cpp.

void Zoltan2::createValidatorList ( const Teuchos::ParameterList &  plIn,
Teuchos::ParameterList &  plOut 
)

Create a list by adding validators to the users parameter list.

Parameters
plInthe user's parameter list
plOuta new parameter list which is the user's list with our validators added.

Definition at line 151 of file Zoltan2_Parameters.cpp.

void Zoltan2::printListDocumentation ( const Teuchos::ParameterList &  pl,
std::ostream &  os,
std::string  listNames 
)

Definition at line 167 of file Zoltan2_Parameters.cpp.

template<typename User >
RCP<Tpetra::CrsMatrix<int, typename MeshAdapter<User>::lno_t, typename MeshAdapter<User>::gno_t, typename MeshAdapter<User>::node_t> > Zoltan2::get2ndAdjsMatFromAdjs ( const Teuchos::RCP< const MeshAdapter< User > > &  ia,
const RCP< const Comm< int > >  comm,
Zoltan2::MeshEntityType  sourcetarget,
Zoltan2::MeshEntityType  through 
)

Definition at line 64 of file Zoltan2_ModelHelpers.hpp.

template<typename User >
void Zoltan2::get2ndAdjsViewFromAdjs ( const Teuchos::RCP< const MeshAdapter< User > > &  ia,
const RCP< const Comm< int > >  comm,
Zoltan2::MeshEntityType  sourcetarget,
Zoltan2::MeshEntityType  through,
Teuchos::ArrayRCP< typename MeshAdapter< User >::offset_t > &  offsets,
Teuchos::ArrayRCP< typename MeshAdapter< User >::gno_t > &  adjacencyIds 
)

Definition at line 194 of file Zoltan2_ModelHelpers.hpp.

template<typename SolutionAdapter , typename DataAdapter >
size_t Zoltan2::getImportList ( const PartitioningSolution< SolutionAdapter > &  solution,
const DataAdapter *const  data,
ArrayRCP< typename DataAdapter::gno_t > &  imports 
)

From a PartitioningSolution, get a list of IDs to be imported. Assumes part numbers in PartitioningSolution are to be used as rank numbers.

The list returned by solution.getPartListView() is an export list, detailing to which part each ID should move. This method provides a new list, listing the IDs to be imported to this processor.

Parameters
importson return is the list of global Ids assigned to this process under the Solution.

TODO: Add a version that takes a Mapping solution as well for k!=p.

Definition at line 80 of file Zoltan2_PartitioningHelpers.hpp.

void Zoltan2::AlltoAllCount ( const Comm< int > &  comm,
const Environment &  env,
const ArrayView< const int > &  sendCount,
const ArrayView< int > &  recvCount 
)

Each process sends a value to every process, an all-to-all.

Parameters
commThe communicator for the process group involved
envThe environment, required for error messages
sendCountThe number to send to process p is in sendCount[p].
recvCountOn return, The number received from process p will be in recvCount[p].

Note: If Teuchos::Comm adds an AlltoAll method, we should use it instead of this function. TODO

Definition at line 72 of file Zoltan2_AlltoAll.cpp.

template<>
void Zoltan2::AlltoAllv ( const Comm< int > &  comm,
const Environment &  env,
const ArrayView< const std::string > &  sendBuf,
const ArrayView< const int > &  sendCount,
ArrayRCP< std::string > &  recvBuf,
const ArrayView< int > &  recvCount 
)

Definition at line 131 of file Zoltan2_AlltoAll.cpp.

template<>
void Zoltan2::AlltoAllv ( const Comm< int > &  comm,
const Environment &  env,
const ArrayView< const unsigned short > &  sendBuf,
const ArrayView< const int > &  sendCount,
ArrayRCP< unsigned short > &  recvBuf,
const ArrayView< int > &  recvCount 
)

Definition at line 249 of file Zoltan2_AlltoAll.cpp.

template<>
void Zoltan2::AlltoAllv ( const Comm< int > &  comm,
const Environment &  env,
const ArrayView< const unsigned char > &  sendBuf,
const ArrayView< const int > &  sendCount,
ArrayRCP< unsigned char > &  recvBuf,
const ArrayView< int > &  recvCount 
)

Definition at line 271 of file Zoltan2_AlltoAll.cpp.

template<typename T >
void Zoltan2::AlltoAllv ( const Comm< int > &  comm,
const Environment &  env,
const ArrayView< const T > &  sendBuf,
const ArrayView< const int > &  sendCount,
ArrayRCP< T > &  recvBuf,
const ArrayView< int > &  recvCount 
)

AlltoAllv sends/receives data to/from all processes.

Parameters
commThe communicator for the process group involved
envThe environment, required for error messages
sendBufThe data to be sent, in destination process rank order
sendCountThe number of Ts to send to process p is in sendCount[p].
recvBufOn return, recvBuf has been allocated and contains the packets sent to this process by others.
recvCountOn return, The number of Ts received from process p will be in recvCount[p].

The data type T must be a type for which either Zoltan2::IdentifierTraits are defined or Teuchos::DirectSerializationTraits is defined.

AlltoAll uses only point-to-point messages. This is to avoid the MPI limitation of integer offsets and counters in collective operations. In other words, sendBuf.size() can exceed a value that fits into 32 bits. However each point to point message size must fit in an int.

It also avoids non-scalable MPI data structures that are associated with collective operations.

In addition it can be used for Zoltan2 global ID data types that are not serializable by Teuchos point-to-point messages.

Definition at line 93 of file Zoltan2_AlltoAll.hpp.

template<typename gno_t >
size_t Zoltan2::findUniqueGidsCommon ( size_t  num_keys,
int  num_gid,
ZOLTAN_ID_PTR  ddkeys,
char *  ddnewgids,
MPI_Comm  mpicomm 
)

Definition at line 69 of file Zoltan2_findUniqueGids.hpp.

template<typename lno_t , typename gno_t >
size_t Zoltan2::findUniqueGids ( Tpetra::MultiVector< gno_t, lno_t, gno_t > &  keys,
Tpetra::Vector< gno_t, lno_t, gno_t > &  gids 
)

Definition at line 125 of file Zoltan2_findUniqueGids.hpp.

template<typename key_t , typename gno_t >
size_t Zoltan2::findUniqueGids ( std::vector< key_t > &  keys,
std::vector< gno_t > &  gids,
const Teuchos::Comm< int > &  comm 
)

Definition at line 196 of file Zoltan2_findUniqueGids.hpp.

template<typename Adapter , typename MachineRep = MachineRepresentation<typename Adapter::scalar_t, typename Adapter::part_t>>
void Zoltan2::globalWeightedByPart ( const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  comm,
const RCP< const GraphModel< typename Adapter::base_adapter_t > > &  graph,
const ArrayView< const typename Adapter::part_t > &  parts,
typename Adapter::part_t numParts,
ArrayRCP< RCP< BaseClassMetrics< typename Adapter::scalar_t > > > &  metrics,
ArrayRCP< typename Adapter::scalar_t > &  globalSums,
bool  bMessages = true,
const RCP< const MachineRep >  machine = Teuchos::null 
)

Given the local partitioning, compute the global weighted cuts in each part.

Parameters
envEnvironment for error handling
commcommunicator
graphGraph model
partpart[i] is the part ID for local object i
numPartson return this is the global number of parts.
metricson return points to a list of named GraphMetricValues cuts that each contains the global max and sum over parts of the item being measured. The list may contain "edge cuts", or "weight 0", "weight 1" and so on in that order. If uniform weights were given, then only "edge cuts" appears. If one set of non-uniform weights were given, then "weight 0" appear. Finally, if multiple weights were given, we have the individual weights "weight 0", "weight 1", and so on.
globalSumsIf weights are uniform, the globalSums is the numParts totals of global number of cuts in each part. Suppose the number of weights is W. If W is 1, then on return this is an array of length numParts . The numParts entries are the total weight in each part. If W is greater than one, then the length of this array is W*numParts . The entries are the sum of the individual weights in each part, by weight index by part number. The array is allocated here.

globalWeightedByPart() must be called by all processes in comm.

Definition at line 94 of file Zoltan2_GraphMetricsUtility.hpp.

template<typename scalar_t , typename part_t >
void Zoltan2::printGraphMetricsHeader ( std::ostream &  os,
part_t  targetNumParts,
part_t  numParts 
)

Print out header info for graph metrics.

Definition at line 502 of file Zoltan2_GraphMetricsUtility.hpp.

template<typename scalar_t , typename part_t >
void Zoltan2::printGraphMetrics ( std::ostream &  os,
part_t  targetNumParts,
part_t  numParts,
const ArrayView< RCP< BaseClassMetrics< scalar_t > > > &  infoList 
)

Print out list of graph metrics.

Definition at line 515 of file Zoltan2_GraphMetricsUtility.hpp.

template<typename scalar_t , typename part_t >
void Zoltan2::printGraphMetrics ( std::ostream &  os,
part_t  targetNumParts,
part_t  numParts,
RCP< BaseClassMetrics< scalar_t >>  metricValue 
)

Print out header and a single graph metric.

Definition at line 529 of file Zoltan2_GraphMetricsUtility.hpp.

template<typename scalar_t , typename lno_t , typename part_t >
void Zoltan2::globalSumsByPart ( const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  comm,
const ArrayView< const part_t > &  part,
int  vwgtDim,
const ArrayView< StridedData< lno_t, scalar_t > > &  vwgts,
multiCriteriaNorm  mcNorm,
part_t  targetNumParts,
part_t numExistingParts,
part_t numNonemptyParts,
ArrayRCP< RCP< BaseClassMetrics< scalar_t > > > &  metrics,
ArrayRCP< scalar_t > &  globalSums 
)

Given the local partitioning, compute the global sums in each part.

Parameters
envEnvironment for error handling
commcommunicator
partpart[i] is the part ID for local object i
vwgtsvwgts[w] is the StridedData object representing weight index w. The number of weights (which must be at least one TODO WHY?) is taken to be vwgts.size().
mcNormthe multiCriteria norm to be used if the number of weights is greater than one.
targetNumPartsinput: number of requested parts
numExistingPartson return this is the maximum part ID + 1.
numNonemptyPartson return this is the number of those parts that are non-empty.
metricson return points to a list of named MetricValues objects that each contains the global min, max and avg over parts of the item being measured. The list may contain "object count", "normed weight", "weight 0", "weight 1" and so on in that order. If uniform weights were given, then only "object count" appears. If one set of non-uniform weights were given, then "object count" and "weight 0" appear. Finally, if multiple weights were given, we have "object count", then "normed weight", then the individual weights "weight 0", "weight 1", and so on.
globalSumsIf weights are uniform, the globalSums is the numExistingParts totals of global number of objects in each part. Suppose the number of weights is W. If W is 1, then on return this is an array of length 2*numExistingParts . The first numExistingParts entries are the count of objects in each part and the second is the total weight in each part. If W is greater than one, then the length of this array is (2+W)*numExistingParts . The first numExistingParts entries are the count of objects in each part. The next numExistingParts entries are the sum of the normed weights in each part. The final entries are the sum of the individual weights in each part, by weight index by part number. The array is allocated here.

() must be called by all processes in comm. The imbalance metrics are not yet set in the MetricValues objects, because they require part size information.

Definition at line 101 of file Zoltan2_ImbalanceMetricsUtility.hpp.

template<typename Adapter >
void Zoltan2::imbalanceMetrics ( const RCP< const Environment > &  env,
const RCP< const Comm< int > > &  comm,
multiCriteriaNorm  mcNorm,
const Adapter *  ia,
const PartitioningSolution< Adapter > *  solution,
const ArrayView< const typename Adapter::part_t > &  partArray,
const RCP< const GraphModel< typename Adapter::base_adapter_t > > &  graphModel,
typename Adapter::part_t numExistingParts,
typename Adapter::part_t numNonemptyParts,
ArrayRCP< RCP< BaseClassMetrics< typename Adapter::scalar_t > > > &  metrics 
)

Compute imbalance metrics for a distribution.

Parameters
envThe problem environment.
commThe problem communicator.
iathe InputAdapter object which corresponds to the Solution.
solutionthe PartitioningSolution to be evaluated.
mcNormis the multicriteria norm to use if the number of weights is greater than one. See the multiCriteriaNorm enumerator for mcNorm values.
graphModelthe graph model.
numExistingPartson return is the max Part ID + 1.
numNonemptyPartson return is the global number of parts to which objects are assigned.
metricson return points to a list of named MetricValues objects that each contains the global min, max and avg over parts and also imbalance measures of the item being measured. The list may contain "object count", "normed weight", "weight 0", "weight 1" and so on in that order. If uniform weights were given, then only "object count" appears. If one set of non-uniform weights were given, then "object count" and "weight 0" appear. Finally, if multiple weights were given, we have "object count", then "normed weight", then the individual weights "weight 0", "weight 1", and so on.

objectMetrics() must be called by all processes in comm. See the metricOffset enumerator in the MetricValues class for the interpretation of the metric quantities.

Todo:
check that part sizes sum to one if we're doing COMPLEX_ASSERTION

Definition at line 349 of file Zoltan2_ImbalanceMetricsUtility.hpp.

template<typename scalar_t , typename part_t >
void Zoltan2::printImbalanceMetricsHeader ( std::ostream &  os,
part_t  targetNumParts,
part_t  numExistingParts,
part_t  numNonemptyParts 
)

Print out header info for imbalance metrics.

Definition at line 541 of file Zoltan2_ImbalanceMetricsUtility.hpp.

template<typename scalar_t , typename part_t >
void Zoltan2::printImbalanceMetrics ( std::ostream &  os,
part_t  targetNumParts,
part_t  numExistingParts,
part_t  numNonemptyParts,
const ArrayView< RCP< BaseClassMetrics< scalar_t > > > &  infoList 
)

Print out list of imbalance metrics.

Definition at line 561 of file Zoltan2_ImbalanceMetricsUtility.hpp.

template<typename scalar_t , typename part_t >
void Zoltan2::printImbalanceMetrics ( std::ostream &  os,
part_t  targetNumParts,
part_t  numExistingParts,
part_t  numNonemptyParts,
RCP< BaseClassMetrics< scalar_t >>  metricValue 
)

Print out header and a single imbalance metric.

Definition at line 582 of file Zoltan2_ImbalanceMetricsUtility.hpp.

void Zoltan2::addNumberToFileName ( int  number,
std::string  fname,
std::string &  newf 
)

Helper method to add number to a file name.

Parameters
numberthe number (such as process rank) to add
fnamethe file name to modify
newfon return newf is fname with the rank added to the name.

If fname has no dot in it, then the rank is added to the end of the name. Otherwise the rank is added before the first dot in fname.

Definition at line 56 of file Zoltan2_IO.cpp.

template<typename metric_t , typename scalar_t >
RCP<metric_t> Zoltan2::addNewMetric ( const RCP< const Environment > &  env,
ArrayRCP< RCP< BaseClassMetrics< scalar_t > > > &  metrics 
)

Definition at line 65 of file Zoltan2_MetricUtility.hpp.

template<typename scalar_t >
void Zoltan2::getStridedStats ( const ArrayView< scalar_t > &  v,
int  stride,
int  offset,
scalar_t &  min,
scalar_t &  max,
scalar_t &  sum 
)

Find min, max and sum of metric values.

Parameters
va list of values
stridethe value such that v[offset + stride*i] will be included in the calculation for all possible i.
offsetthe offset at which calculation will begin.
minon return, min will hold the minimum of the values.
maxon return, max will hold the maximum of the values.
sumon return, sum will hold the sum of the values.

Definition at line 90 of file Zoltan2_MetricUtility.hpp.

template<typename scalar_t >
void Zoltan2::getStridedStats ( const ArrayView< scalar_t > &  v,
int  stride,
int  offset,
scalar_t &  max,
scalar_t &  sum 
)

Find max and sum of graph metric values.

Parameters
va list of values
stridethe value such that v[offset + stride*i] will be included in the calculation for all possible i.
offsetthe offset at which calculation will begin.
maxon return, max will hold the maximum of the values.
sumon return, sum will hold the sum of the values.

Definition at line 112 of file Zoltan2_MetricUtility.hpp.

template<typename scalar_t , typename lno_t , typename part_t >
void Zoltan2::normedPartWeights ( const RCP< const Environment > &  env,
part_t  numberOfParts,
const ArrayView< const part_t > &  parts,
const ArrayView< StridedData< lno_t, scalar_t > > &  vwgts,
multiCriteriaNorm  mcNorm,
scalar_t *  weights 
)

Compute the total weight in each part on this process.

Parameters
envthe Environment for error messages
numberOfPartsthe number of Parts with respect to which weights should be computed.
partsthe part Id for each object, which may range from 0 to one less than numberOfParts
vwgtsvwgts[w] is the StridedData object representing weight index w. vwgts[w][i] is the w'th weight for object i.
mcNormthe multiCriteria norm, to be used if the number of weights is greater than one.
weightson return, weights[p] is the total weight for part p. weights is allocated by the caller
Todo:
  • Zoltan_norm() in Zoltan may scale the weight. Do we ever need this?

< 1-norm = Manhattan norm

< 2-norm = sqrt of sum of squares

< inf-norm = maximum norm

Definition at line 143 of file Zoltan2_MetricUtility.hpp.

template<typename scalar_t , typename part_t >
void Zoltan2::computeImbalances ( part_t  numExistingParts,
part_t  targetNumParts,
const scalar_t *  psizes,
scalar_t  sumVals,
const scalar_t *  vals,
scalar_t &  min,
scalar_t &  max,
scalar_t &  avg 
)

Compute the imbalance.

Parameters
numExistingPartsthe max Part ID + 1, which is the length of the vals array.
targetNumPartsthe number of parts desired, which is the length of the psizes array if it is defined.
psizesif part sizes are not uniform then psizes[p] is the part size for part p, for p ranging from zero to one less than targetNumParts. Part sizes must sum to one. If part sizes are uniform, psizes should be NULL.
sumValsis the sum of the values in the vals list.
vals vals[p] is the amount in part p, for p ranging from zero to one less than numExistingParts.
minon return, min will be the minimum (best) imbalance of all the parts.
maxon return, max will be the maximum imbalance of all the parts.
avgon return avg will be the average imbalance across the parts.

Imbalance is a value between zero and one. If target is the desired amount in part p and actual is the actual amount in part p, then the imbalance is:

abs(target - actual) / target

If the part is supposed to be empty (target is zero), then no imbalance is computed for that part. If actual for that part is non-zero, then other parts are too small and the imbalance will be found in those other parts.

Definition at line 240 of file Zoltan2_MetricUtility.hpp.

template<typename scalar_t , typename part_t >
void Zoltan2::computeImbalances ( part_t  numExistingParts,
part_t  targetNumParts,
int  numSizes,
ArrayView< ArrayRCP< scalar_t > >  psizes,
scalar_t  sumVals,
const scalar_t *  vals,
scalar_t &  min,
scalar_t &  max,
scalar_t &  avg 
)

Compute the imbalance in the case of multiple part sizes.

Parameters
numExistingPartsthe max Part ID + 1, which is the length of the vals array.
targetNumPartsthe number of parts desired, which is the length of the psizes array if it is defined.
numSizesthe number of part size arrays
psizesis an array of numSizes pointers to part size arrays. If the part sizes for index w are uniform, then psizes[w] should be NULL. Otherwise it should point to targetNumParts sizes, and the sizes for each index should sum to one.
sumValsis the sum of the values in the vals list.
vals vals[p] is the amount in part p, for p ranging from zero to one less than numExistingParts.
minon return, min will be the minimum (best) imbalance of all the parts.
maxon return, max will be the maximum imbalance of all the parts.
avgon return avg will be the average imbalance across the parts.

Imbalance is a value between zero and one. If target is the desired amount in part p and actual is the actual amount in part p, then the imbalance is:

abs(target - actual) / target

If the part is supposed to be empty (target is zero), then no imbalance is computed for that part. If actual for that part is non-zero, then other parts are too small and the imbalance will be found in those other parts.

Definition at line 338 of file Zoltan2_MetricUtility.hpp.

template<typename scalar_t >
scalar_t Zoltan2::normedWeight ( ArrayView< scalar_t >  weights,
multiCriteriaNorm  norm 
)

Compute the norm of the vector of weights.

< 1-norm = Manhattan norm

< 2-norm = sqrt of sum of squares

< inf-norm = maximum norm

Definition at line 456 of file Zoltan2_MetricUtility.hpp.

template<typename lno_t , typename scalar_t >
scalar_t Zoltan2::normedWeight ( ArrayView< StridedData< lno_t, scalar_t > >  weights,
lno_t  idx,
multiCriteriaNorm  norm 
)

Compute the norm of the vector of weights stored as StridedData.

Definition at line 505 of file Zoltan2_MetricUtility.hpp.

template<typename scalar_t , typename T >
static void Zoltan2::getInputArrayHelper ( ArrayRCP< const T > &  target,
const ArrayRCP< const scalar_t > &  src 
)
static

Definition at line 168 of file Zoltan2_StridedData.hpp.

template<typename scalar_t >
static void Zoltan2::getInputArrayHelper ( ArrayRCP< const scalar_t > &  target,
const ArrayRCP< const scalar_t > &  src 
)
static

Definition at line 191 of file Zoltan2_StridedData.hpp.

long Zoltan2::getProcessKilobytes ( )

Definition at line 70 of file Zoltan2_Util.cpp.

template<typename scalar_t >
bool Zoltan2::outsideRegion ( scalar_t  val,
scalar_t  mark,
double  epsilon 
)
inline

Definition at line 63 of file Zoltan2_Util.hpp.

std::string Zoltan2::Zoltan2_Version ( )

Definition at line 59 of file Zoltan2_Version.cpp.