Zoltan2
|
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 |
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 ::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.
typedef int Zoltan2::default_part_t |
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.
enum Zoltan2::blockParams |
The boolean parameters of interest to the Block algorithm.
Definition at line 64 of file Zoltan2_AlgBlock.hpp.
enum Zoltan2::RangeType |
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.
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.
Definition at line 98 of file Zoltan2_Parameters.hpp.
enum Zoltan2::TimerType |
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.
Definition at line 118 of file Zoltan2_Parameters.hpp.
enum Zoltan2::OSType |
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.
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.
enum Zoltan2::CentricView |
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.
enum Zoltan2::ModelType |
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.
enum Zoltan2::ModelFlags |
Flags are set by a Problem to tell a Model what transformations it may need to do on the user's input.
Definition at line 74 of file Zoltan2_Model.hpp.
|
static |
Definition at line 77 of file Zoltan2_GreedyMWM.hpp.
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.
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.
T* Zoltan2::allocMemory | ( | size_t | size | ) |
Allocates memory for the given size.
Definition at line 156 of file Zoltan2_AlgMultiJagged.hpp.
void Zoltan2::freeArray | ( | T *& | array | ) |
Frees the given array.
Definition at line 173 of file Zoltan2_AlgMultiJagged.hpp.
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.
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.
|
inlinestatic |
Definition at line 64 of file Zoltan2_AlgScotch.hpp.
|
inline |
Definition at line 71 of file Zoltan2_TaskMapping.hpp.
void Zoltan2::ithPermutation | ( | const IT | n, |
IT | i, | ||
IT * | perm | ||
) |
Definition at line 84 of file Zoltan2_TaskMapping.hpp.
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.
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.
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.
void Zoltan2::fillContinousArray | ( | T * | arr, |
size_t | arrSize, | ||
T * | val | ||
) |
fillContinousArray function
arr | array to be filled in with values. |
arrSize | the size of the array. |
val | the 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.
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.
problemComm | is the communication object. |
proc_dim | dimensions of the processor coordinates. |
num_processors | is the number of processors |
machine_coords | is the coordinates of the processors. |
task_dim | is the dimension of the tasks. |
num_tasks | is the number of tasks. |
task_coords | is the coordinates of the tasks. |
task_comm_xadj | is the task communication graphs xadj array. (task i's adjacency is between task_comm_xadj[i] and task_comm_xadj[i+1]) |
task_comm_adj | is task communication graphs adj array. |
task_communication_edge_weight_ | is the weight of the communication in task graph. |
proc_to_task_xadj | is 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_adj | is the ouput list of tasks pointed by proc_to_task_xadj |
recursion_depth | is 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_array | if 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.
|
inline |
Definition at line 2954 of file Zoltan2_TaskMapping.hpp.
|
static |
Definition at line 74 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 83 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 126 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 146 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 156 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 186 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 204 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 257 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 275 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 338 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 379 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 450 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 487 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 558 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 568 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
static |
Definition at line 623 of file Zoltan2_AlgZoltanCallbacks.hpp.
|
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.
rank | the MPI rank of the calling process in the application |
iPrint | true if this process should output information |
fname | name of file to which output is to be appended, or or Z2_UNSET_STRING |
ost | output stream type |
mgr | on return, a pointer to the created output manager |
Definition at line 77 of file Zoltan2_Environment.cpp.
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.
rank | the MPI rank of the calling process in the application |
iPrint | true if this process should print metric information |
fname | name of file to which output is to be appended, or or Z2_UNSET_STRING |
ost | output stream type |
mgr | on return, a pointer to the created output manager |
fptr | on 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.
bool Zoltan2::validIntegralRangeList | ( | const Teuchos::Array< Integral > & | vals | ) |
A helper function that indicates whether an array is a valid integer range list.
vals | An array that may encode an integer range list. |
Definition at line 96 of file Zoltan2_IntegerRangeList.hpp.
bool Zoltan2::allValuesAreInRangeList | ( | const Teuchos::Array< Integral > & | vals | ) |
A helper function that determines if all values are in the list.
vals | An array encoding an integer range list. |
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.
bool Zoltan2::allValuesAreInRangeList | ( | const Teuchos::ParameterEntry & | e | ) |
A helper function that determines if all values are in the list.
e | A parameter entry |
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.
bool Zoltan2::noValuesAreInRangeList | ( | const Teuchos::Array< Integral > & | vals | ) |
A helper function that determines if no values are in the list.
vals | An array encoding an integer range list. |
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.
bool Zoltan2::noValuesAreInRangeList | ( | const Teuchos::ParameterEntry & | e | ) |
A helper function that determines if no values are in the list.
e | A parameter entry |
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.
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.
val | A value that could be in the list. |
vals | An array encoding an integer range list. |
sorted | Set to false if the integer range list is not sorted |
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.
bool Zoltan2::IsInRangeList | ( | const Integral | val, |
const Teuchos::ParameterEntry & | e | ||
) |
A helper function that determines if a value is in the list.
val | A value that could be in the list. |
e | A parameter entry |
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.
Teuchos::ArrayView<Integral> Zoltan2::getList | ( | Teuchos::Array< Integral > & | irl | ) |
A helper function that returns a view of the list.
irl | The value of an integer range list parameter after it has been validated |
Definition at line 297 of file Zoltan2_IntegerRangeList.hpp.
void Zoltan2::printIntegralRangeList | ( | std::ostream & | os, |
Teuchos::Array< Integral > & | irl | ||
) |
A helper function that prints the meaning of an encoded integer range list.
os | An output stream to which the list will be printed. |
val | A 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.
pList | on 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 |
Create a parameter list that can validate a specific list of parameters.
plSome | the user's parameter list |
plAll | a parameter list with all Zoltan2 parameters and their validators |
plVal | on 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.
plIn | the user's parameter list |
plOut | a 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.
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.
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.
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.
imports | on 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.
comm | The communicator for the process group involved |
env | The environment, required for error messages |
sendCount | The number to send to process p is in sendCount[p]. |
recvCount | On 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.
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.
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.
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.
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.
comm | The communicator for the process group involved |
env | The environment, required for error messages |
sendBuf | The data to be sent, in destination process rank order |
sendCount | The number of Ts to send to process p is in sendCount[p]. |
recvBuf | On return, recvBuf has been allocated and contains the packets sent to this process by others. |
recvCount | On 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.
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.
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.
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.
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.
env | Environment for error handling |
comm | communicator |
graph | Graph model |
part | part [i] is the part ID for local object i |
numParts | on return this is the global number of parts. |
metrics | on 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. |
globalSums | If 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.
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.
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.
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.
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.
env | Environment for error handling |
comm | communicator |
part | part [i] is the part ID for local object i |
vwgts | vwgts [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() . |
mcNorm | the multiCriteria norm to be used if the number of weights is greater than one. |
targetNumParts | input: number of requested parts |
numExistingParts | on return this is the maximum part ID + 1. |
numNonemptyParts | on return this is the number of those parts that are non-empty. |
metrics | on 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. |
globalSums | If 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.
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.
env | The problem environment. |
comm | The problem communicator. |
ia | the InputAdapter object which corresponds to the Solution. |
solution | the PartitioningSolution to be evaluated. |
mcNorm | is the multicriteria norm to use if the number of weights is greater than one. See the multiCriteriaNorm enumerator for mcNorm values. |
graphModel | the graph model. |
numExistingParts | on return is the max Part ID + 1. |
numNonemptyParts | on return is the global number of parts to which objects are assigned. |
metrics | on 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.
Definition at line 349 of file Zoltan2_ImbalanceMetricsUtility.hpp.
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.
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.
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.
number | the number (such as process rank) to add |
fname | the file name to modify |
newf | on 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.
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.
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.
v | a list of values |
stride | the value such that v [offset + stride*i] will be included in the calculation for all possible i. |
offset | the offset at which calculation will begin. |
min | on return, min will hold the minimum of the values. |
max | on return, max will hold the maximum of the values. |
sum | on return, sum will hold the sum of the values. |
Definition at line 90 of file Zoltan2_MetricUtility.hpp.
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.
v | a list of values |
stride | the value such that v [offset + stride*i] will be included in the calculation for all possible i. |
offset | the offset at which calculation will begin. |
max | on return, max will hold the maximum of the values. |
sum | on return, sum will hold the sum of the values. |
Definition at line 112 of file Zoltan2_MetricUtility.hpp.
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.
env | the Environment for error messages |
numberOfParts | the number of Parts with respect to which weights should be computed. |
parts | the part Id for each object, which may range from 0 to one less than numberOfParts |
vwgts | vwgts [w] is the StridedData object representing weight index w . vwgts[w][i] is the w'th weight for object i . |
mcNorm | the multiCriteria norm, to be used if the number of weights is greater than one. |
weights | on return, weights [p] is the total weight for part p . weights is allocated by the caller |
< 1-norm = Manhattan norm
< 2-norm = sqrt of sum of squares
< inf-norm = maximum norm
Definition at line 143 of file Zoltan2_MetricUtility.hpp.
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.
numExistingParts | the max Part ID + 1, which is the length of the vals array. |
targetNumParts | the number of parts desired, which is the length of the psizes array if it is defined. |
psizes | if 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. |
sumVals | is 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 . |
min | on return, min will be the minimum (best) imbalance of all the parts. |
max | on return, max will be the maximum imbalance of all the parts. |
avg | on 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:
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.
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.
numExistingParts | the max Part ID + 1, which is the length of the vals array. |
targetNumParts | the number of parts desired, which is the length of the psizes array if it is defined. |
numSizes | the number of part size arrays |
psizes | is 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. |
sumVals | is 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 . |
min | on return, min will be the minimum (best) imbalance of all the parts. |
max | on return, max will be the maximum imbalance of all the parts. |
avg | on 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:
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.
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.
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.
|
static |
Definition at line 168 of file Zoltan2_StridedData.hpp.
|
static |
Definition at line 191 of file Zoltan2_StridedData.hpp.
long Zoltan2::getProcessKilobytes | ( | ) |
Definition at line 70 of file Zoltan2_Util.cpp.
|
inline |
Definition at line 63 of file Zoltan2_Util.hpp.
std::string Zoltan2::Zoltan2_Version | ( | ) |
Definition at line 59 of file Zoltan2_Version.cpp.