|
Zoltan2
Version of the Day
|
Classes | |
| struct | GMWM_triplet |
| class | pqJagged_PartVertices |
| A helper class containing array representation of coordinate linked lists. More... | |
| class | uMultiSortItem |
| struct | uSortItem |
| 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 | 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 | 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 | IntegerRangeListValidator |
| A ParameterList validator for integer range lists. More... | |
| class | IntegerRangeListValidatorXMLConverter |
| XML conversion code for IntegerRangeListValidator. More... | |
| class | MachineRepresentation |
| MachineRepresentation Class Finds the coordinate of the processor. Used to find the processor coordinates or graph. More... | |
| class | MetricOutputManager |
| MetricOutputManager handles output of profiling messages. More... | |
| class | TimerManager |
| class | BasicCoordinateInput |
| BasicCoordinateInput represents geometric coordinates that are supplied by the user as pointers to strided arrays. More... | |
| class | BasicIdentifierInput |
| This class represents a collection of global Identifiers and their associated weights, if any. More... | |
| class | BasicVectorInput |
| BasicVectorInput represents a vector (plus optional weights) supplied by the user as pointers to strided arrays. More... | |
| class | CoordinateInput |
| CoordinateInput defines the interface for input geometric coordinates. More... | |
| class | GraphInput |
| GraphInput defines the interface for graph input adapters. More... | |
| class | IdentifierInput |
| IdentifierInput defines the interface for identifiers. More... | |
| class | InputAdapter |
| InputAdapter defines methods required by all InputAdapters. More... | |
| class | MatrixInput |
| MatrixInput defines the interface for input adapters for matrices. More... | |
| class | MeshInput |
| MeshInput defines the interface for mesh input adapters. More... | |
| class | VectorInput |
| VectorInput defines the interface for vector input adapters. More... | |
| class | XpetraCrsGraphInput |
| Provides access for Zoltan2 to Xpetra::CrsGraph data. More... | |
| class | XpetraCrsMatrixInput |
| Provides access for Zoltan2 to Xpetra::CrsMatrix data. More... | |
| class | XpetraMultiVectorInput |
| An input adapter for Xpetra::MultiVector. More... | |
| class | XpetraRowMatrixInput |
| Provides access for Zoltan2 to Xpetra::CRowatrix data. More... | |
| struct | XpetraTraits |
| Defines the traits required for Tpetra, Eptra and Xpetra objects. More... | |
| class | XpetraVectorInput |
| Provides access for Zoltan2 to an Xpetra::Vector. 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 | IdentifierModel |
| IdentifierModel defines the interface for all identifier models. More... | |
| class | Model |
| The base class for all model classes. More... | |
| class | OrderingProblem |
| OrderingProblem sets up ordering problems for the user. More... | |
| class | OrderingSolution |
| The class containing ordering solutions and metrics. More... | |
| 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 | Problem |
| Problem base class from which other classes (PartitioningProblem, ColoringProblem, OrderingProblem, MatchingProblem, etc.) derive. More... | |
| class | Solution |
| Just a placeholder for now. More... | |
| 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 | GidLookupHelper |
| A class to do GID lookups. More... | |
| class | IdentifierMap |
| An IdentifierMap manages a global space of object identifiers. More... | |
| class | Zoltan2_MinMaxOperation |
| Teuchos reduction operation. More... | |
| struct | UndefIdTraits |
| Structure to catch invalid user ID types. More... | |
| struct | IdentifierTraits |
| The functions to be defined for users' global ID types. More... | |
| class | MetricValues |
| A class containing the metrics for one measurable item. More... | |
| class | PartitioningSolutionQuality |
| A class that computes and returns quality metrics. More... | |
| class | StridedData |
| The StridedData class manages lists of weights or coordinates. More... | |
Typedefs | |
| typedef int | default_lno_t |
| typedef double | default_scalar_t |
| typedef int | default_gno_t |
| typedef std::bitset < NUM_MODEL_FLAGS > | modelFlag_t |
| typedef size_t | global_size_t |
| typedef zoltan2_partId_t | partId_t |
| typedef Kokkos::DefaultNode::DefaultNodeType | default_node_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 | AlgAMD (const RCP< GraphModel< Adapter > > &model, const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > &solution, const RCP< Teuchos::ParameterList > &pl, const RCP< Teuchos::Comm< int > > &comm) |
| template<typename Adapter > | |
| int | AlgIncDegree (const RCP< GraphModel< Adapter > > &model, const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > &solution, const RCP< Teuchos::ParameterList > &pl, const RCP< Teuchos::Comm< int > > &comm) |
| template<typename Adapter > | |
| int | AlgNatural (const RCP< IdentifierModel< Adapter > > &model, const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > &solution, const RCP< Teuchos::ParameterList > &pl, const RCP< Teuchos::Comm< int > > &comm) |
| template<typename Adapter > | |
| int | AlgRandom (const RCP< IdentifierModel< Adapter > > &model, const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > &solution, const RCP< Teuchos::ParameterList > &pl, const RCP< Teuchos::Comm< int > > &comm) |
| template<typename Adapter > | |
| int | AlgRCM (const RCP< GraphModel< Adapter > > &model, const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > &solution, const RCP< Teuchos::ParameterList > &pl, const RCP< Teuchos::Comm< int > > &comm) |
| template<typename Adapter > | |
| int | AlgSpectral (const RCP< GraphModel< Adapter > > &model, const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > &solution, const RCP< Teuchos::ParameterList > &pl, const RCP< const Teuchos::Comm< int > > &comm) |
| template<typename Adapter > | |
| void | AlgBlock (const RCP< const Environment > &env, const RCP< Comm< int > > &problemComm, const RCP< const IdentifierModel< typename Adapter::base_adapter_t > > &ids, RCP< PartitioningSolution< Adapter > > &solution) |
| template<typename T > | |
| void | firstTouch (T *arrayName, size_t arraySize) |
| template<typename scalar_t > | |
| scalar_t | pivotPos (scalar_t *cutUpperBounds, scalar_t *cutLowerBounds, size_t currentCutIndex, scalar_t *cutUpperWeight, scalar_t *cutLowerWeight, scalar_t ew, scalar_t _EPSILON) |
| Function that calculates the next pivot position, according to given coordinates of upper bound and lower bound, the weights at upper and lower bounds, and the expected weight. More... | |
| template<typename T > | |
| void | get_partitioning_params (const Teuchos::ParameterList &pl, T &imbalanceTolerance, multiCriteriaNorm &mcnorm, std::bitset< NUM_RCB_PARAMS > ¶ms, int &numTestCuts, bool &ignoreWeights) |
| template<typename T > | |
| void | pqJagged_getParameters (const Teuchos::ParameterList &pl, bool &allowNonrectilinear, partId_t &concurrentPartCount, int &migration_actualMigration_option, int &migration_check_option, int &migration_all2all_option, T &migration_imbalance_cut_off, int &migration_assignment_type, int &keep_part_boxes, int &enable_rcb, int &recursion_depth) |
| Returns the parameters such as: Partitioning problem parameters of interest: Partitioning objective imbalance_tolerance. More... | |
| template<typename Adapter > | |
| void | pqJagged_getCoordinateValues (const RCP< const CoordinateModel< typename Adapter::base_adapter_t > > &coords, int &coordDim, int &weightDim, size_t &numLocalCoords, global_size_t &numGlobalCoords, int &criteriaDim, const bool &ignoreWeights) |
| Returns the input coordinate value parameters. More... | |
| template<typename Adapter , typename scalar_t , typename gno_t > | |
| void | pqJagged_getInputValues (const RCP< const Environment > &env, const RCP< const CoordinateModel< typename Adapter::base_adapter_t > > &coords, RCP< PartitioningSolution< Adapter > > &solution, std::bitset< NUM_RCB_PARAMS > ¶ms, const int &coordDim, const int &weightDim, const size_t &numLocalCoords, size_t &numGlobalParts, int &pqJagged_multiVectorDim, scalar_t **pqJagged_values, const int &criteriaDim, scalar_t **pqJagged_weights, ArrayView< const gno_t > &pqJagged_gnos, bool &ignoreWeights, bool *pqJagged_uniformWeights, bool *pqJagged_uniformParts, scalar_t **pqJagged_partSizes) |
| Function returning the input values for the problem such as the coordinates, weights and desiredPartSizes. More... | |
| template<typename scalar_t , typename gno_t > | |
| void | pqJagged_printInput (int coordDim, int weightDim, size_t numLocalCoords, global_size_t numGlobalCoords, int criteriaDim, scalar_t **pqJagged_values, scalar_t **pqJagged_weights, bool *pqJagged_uniformParts, bool *pqJagged_uniformWeights, gno_t *pqJagged_gnos, bool ignoreWeights, size_t numGlobalParts, scalar_t **pqJagged_partSizes) |
| Printing the input values, to check configuration. More... | |
| template<typename scalar_t , typename lno_t > | |
| void | pqJagged_getLocalMinMaxTotalCoord (lno_t *partitionedPointPermutations, scalar_t *pqJagged_coordinates, bool pqJagged_uniformWeights, scalar_t *pqJagged_weights, int numThreads, lno_t coordinateBegin, lno_t coordinateEnd, scalar_t *max_min_array, scalar_t maxScalar, scalar_t minScalar, scalar_t &minCoordinate, scalar_t &maxCoordinate, scalar_t &totalWeight) |
| Function to determine the local minimum and maximum coordinate, and local total weight in the given set of local points. More... | |
| template<typename partId_t > | |
| partId_t | getPartCount (partId_t numFuture, float root, float fEpsilon) |
| template<typename scalar_t > | |
| void | pqJagged_getGlobalMinMaxTotalCoord (RCP< Comm< int > > &comm, const RCP< const Environment > &env, partId_t concurrentPartCount, scalar_t *localMinMaxTotal, scalar_t *globalMinMaxTotal) |
| Function that reduces global minimum and maximum coordinates with global total weight from given local arrays. More... | |
| template<typename scalar_t > | |
| void | pqJagged_getCutCoord_Weights (scalar_t minCoordinate, scalar_t maxCoordinate, bool pqJagged_uniformParts, bool pqJagged_uniformWeights, scalar_t *pqJagged_partSizes, partId_t noCuts, scalar_t globalTotalWeight, scalar_t *cutCoordinates, scalar_t *cutPartRatios, int numThreads, vector< partId_t > *currentPartitions, vector< partId_t > *futurePartitions, partId_t partIndex, partId_t futureArrayIndex) |
| Function that calculates the new coordinates for the cut lines. Function is called inside the parallel region. More... | |
| template<typename scalar_t > | |
| void | getNewCoordinates (const RCP< const Environment > &env, RCP< Comm< int > > &comm, const size_t &total_part_count, const partId_t &noCuts, const scalar_t &maxCoordinate, const scalar_t &minCoordinate, const scalar_t &globalTotalWeight, const scalar_t &imbalanceTolerance, scalar_t *globalPartWeights, const scalar_t *localPartWeights, const scalar_t *targetPartWeightRatios, bool *isDone, scalar_t *cutCoordinates, scalar_t *cutUpperBounds, scalar_t *cutLowerBounds, scalar_t *leftClosestDistance, scalar_t *rightClosestDistance, scalar_t *cutLowerWeight, scalar_t *cutUpperWeight, scalar_t *newCutCoordinates, bool allowNonRectelinearPart, float *nonRectelinearPartRatios, partId_t *rectilinearCutCount, scalar_t *localCutWeights, scalar_t *globalCutWeights, partId_t &myNoneDoneCount) |
| Function that calculates the new coordinates for the cut lines. Function is called inside the parallel region. More... | |
| template<typename scalar_t , typename lno_t > | |
| void | pqJagged_1DPart_getPartWeights (size_t total_part_count, partId_t noCuts, scalar_t maxCoordinate, scalar_t minCoordinate, scalar_t _EPSILON, int numThreads, lno_t coordinateBegin, lno_t coordinateEnd, lno_t *partitionedPointPermutations, scalar_t *pqJagged_coordinates, bool pqJagged_uniformWeights, scalar_t *pqJagged_weights, scalar_t *cutCoordinates_tmp, bool *isDone, double *myPartWeights, scalar_t *myLeftClosest, scalar_t *myRightClosest, bool useBinarySearch, partId_t *partIds) |
| Function that calculates the new coordinates for the cut lines. Function is called inside the parallel region. More... | |
| template<typename scalar_t > | |
| void | accumulateThreadResults (const vector< partId_t > &pVector, partId_t vBegin, partId_t concurrentPartCount, int numThreads, bool *isDone, scalar_t **leftClosestPoints, scalar_t **rightClosestPoints, double **partWeights, scalar_t *totalPartWeights_leftClosest_rightCloset) |
| Function that reduces the result of multiple threads for left and right closest points and part weights in a single mpi. More... | |
| template<typename scalar_t , typename lno_t > | |
| void | pqJagged_1D_Partition (const RCP< const Environment > &env, RCP< Comm< int > > &comm, lno_t *partitionedPointPermutations, scalar_t *pqJagged_coordinates, bool pqJagged_uniformWeights, scalar_t *pqJagged_weights, scalar_t *targetPartWeightRatios, scalar_t *globalMinMaxTotal, scalar_t *localMinMaxTotal, int numThreads, scalar_t imbalanceTolerance, partId_t currentPartBeginIndex, partId_t concurrentPartCount, lno_t *inTotalCounts, scalar_t *cutCoordinates, scalar_t *cutCoordinatesWork, scalar_t **leftClosestDistance, scalar_t **rightClosestDistance, scalar_t *cutUpperBounds, scalar_t *cutLowerBounds, scalar_t *cutUpperWeight, scalar_t *cutLowerWeight, bool *isDone, double **partWeights, scalar_t *local_totalPartWeights_leftClosest_rightCloset, scalar_t *global_totalPartWeights_leftClosest_rightCloset, bool allowNonRectelinearPart, float *nonRectelinearPartRatios, scalar_t *localCutWeights, scalar_t *globalCutWeights, partId_t allDone, partId_t *myNonDoneCounts, bool useBinarySearch, partId_t *partIds, vector< partId_t > &pVector) |
| Function that is responsible from 1D partitioning of the given range of coordinates. More... | |
| template<typename T > | |
| T * | allocMemory (size_t size) |
| template<typename T > | |
| void | freeArray (T *&array) |
| template<typename tt > | |
| std::string | toString (tt obj) |
| template<class IT , class WT > | |
| void | uqsort (IT n, uSortItem< IT, WT > *arr) |
| template<typename scalar_t , typename partId_t > | |
| partId_t | getPartitionArrays (const partId_t *partNo, vector< partId_t > &pAlongI, vector< partId_t > *currentPartitions, vector< partId_t > *newFuturePartitions, partId_t &futurePartNumbers, partId_t currentPartitionCount, int partArraySize, int i, partId_t maxPartNo, int keep_part_boxes, RCP< vector< coordinateModelPartBox< scalar_t, partId_t > > > inPartBoxes, RCP< vector< coordinateModelPartBox< scalar_t, partId_t > > > outPartBoxes) |
| template<typename scalar_t , typename lno_t , typename partId_t > | |
| void | getInitialPartAssignments (scalar_t &maxCoordinate, scalar_t &minCoordinate, partId_t ¤tPart, lno_t *inTotalCounts, lno_t *partitionedPointCoordinates, scalar_t *pqCoord, partId_t *partIds, scalar_t _EPSILON, partId_t &partition) |
| Function that calculates the new coordinates for the cut lines. Function is called inside the parallel region. More... | |
| template<typename partId_t > | |
| void | getPartSpecifications (const partId_t *partNo, int partArraySize, size_t &numGlobalParts, partId_t &totalDimensionCut, partId_t &totalPartCount, partId_t &maxPartNo, partId_t &reduceAllCount, partId_t &maxTotalCumulativePartCount, partId_t &maxCutNo, size_t &maxTotalPartCount) |
| template<typename lno_t , typename scalar_t > | |
| void | getChunksFromCoordinates (partId_t partNo, int noThreads, lno_t *partitionedPointPermutations, scalar_t *pqJagged_coordinates, bool pqJagged_uniformWeights, scalar_t *coordWeights, scalar_t *cutCoordinates, lno_t coordinateBegin, lno_t coordinateEnd, bool allowNonRectelinearPart, float *actual_ratios, scalar_t *localPartWeights, double **partWeights, float **nonRectelinearRatios, lno_t **partPointCounts, lno_t *newpartitionedPointPermutations, lno_t *totalCounts, partId_t *partIds, bool isSequentialAndPricise, scalar_t **pqJaggedAllCoordinates, int pqCoordDim, int currentCoord) |
| Function that determines the permutation indices of the coordinates. More... | |
| template<typename scalar_t , typename lno_t , typename partId_t > | |
| void | sequentialTaskPartitioning (const RCP< const Environment > &env, lno_t numLocalCoords, lno_t actualNumCoords, size_t numGlobalParts, int coordDim, scalar_t **pqJagged_coordinates, lno_t *output_permutation, lno_t *output_partIndices) |
| template<typename Adapter > | |
| void | AlgPQJagged (const RCP< const Environment > &env, RCP< Comm< int > > &problemComm, const RCP< const CoordinateModel< typename Adapter::base_adapter_t > > &coords, RCP< PartitioningSolution< Adapter > > &solution) |
| PQJagged coordinate partitioning algorithm. More... | |
| template<typename Adapter > | |
| void | AlgRCB (const RCP< const Environment > &env, RCP< Comm< int > > &problemComm, const RCP< const CoordinateModel< typename Adapter::base_adapter_t > > &coords, RCP< PartitioningSolution< Adapter > > &solution) |
| Recursive coordinate bisection algorithm. More... | |
| template<typename Adapter > | |
| void | getFractionLeft (const RCP< const Environment > &env, partId_t part0, partId_t part1, const RCP< PartitioningSolution< Adapter > > &solution, ArrayRCP< double > &fractionLeft, partId_t &numPartsLeftHalf) |
| Determine the fraction of work in the left half. More... | |
| template<typename mvector_t > | |
| void | getCutDimension (const RCP< const Environment > &env, const RCP< Comm< int > > &comm, int coordDim, const RCP< mvector_t > &vectors, ArrayView< typename mvector_t::local_ordinal_type > index, int &dimension, typename mvector_t::scalar_type &minCoord, typename mvector_t::scalar_type &maxCoord) |
| Choose a coordinate dimension for the next cut. More... | |
| template<typename mvector_t > | |
| void | migrateData (const RCP< const Environment > &env, const RCP< Comm< int > > &comm, ArrayView< unsigned char > lrflags, RCP< mvector_t > &vectors, int &leftNumProcs) |
| Migrate coordinates and weights to new processes. More... | |
| template<typename lno_t , typename scalar_t > | |
| scalar_t | getCoordWeight (lno_t id, multiCriteriaNorm mcnorm, ArrayView< StridedData< lno_t, scalar_t > > weights) |
| template<typename scalar_t > | |
| bool | emptyPartsCheck (const RCP< const Environment > &env, const ArrayView< double > fractionLeft, scalar_t minCoord, scalar_t maxCoord, leftRightFlag &lrf, scalar_t &cutValue) |
| Solve partitioning if there are empty parts. More... | |
| template<typename lno_t , typename gno_t , typename scalar_t > | |
| void | testCoordinatesOnRightBoundary (const RCP< const Environment > &env, const RCP< Comm< int > > &comm, scalar_t totalWeightLeft, scalar_t targetLeftScalar, int cutLocation, ArrayView< scalar_t > localSums, ArrayView< scalar_t > globalSums, ArrayView< lno_t > index, ArrayView< StridedData< lno_t, scalar_t > > weights, multiCriteriaNorm mcnorm, ArrayView< unsigned char > lrFlags, scalar_t &globalWeightMovedRight) |
| Move boundary coordinates to the right. More... | |
| template<typename mvector_t > | |
| void | BSPfindCut (const RCP< const Environment > &env, const RCP< Comm< int > > &comm, const std::bitset< NUM_RCB_PARAMS > ¶ms, int numTestCuts, typename mvector_t::scalar_type tolerance, int cutDim, int coordDim, const RCP< mvector_t > &vectors, ArrayView< typename mvector_t::local_ordinal_type > index, ArrayView< double > fractionLeft, ArrayView< bool > uniformWeights, typename mvector_t::scalar_type coordGlobalMin, typename mvector_t::scalar_type coordGlobalMax, typename mvector_t::scalar_type &cutValue, ArrayView< unsigned char > lrFlags, typename mvector_t::scalar_type &totalWeightLeft, typename mvector_t::scalar_type &totalWeightRight, typename mvector_t::local_ordinal_type &localCountLeft, typename mvector_t::scalar_type &imbalance) |
| Find the point in space that divides the data evenly with respect to the weights, part sizes, and the user's objective. More... | |
| template<typename mvector_t , typename Adapter > | |
| void | determineCut (const RCP< const Environment > &env, const RCP< Comm< int > > &comm, const std::bitset< NUM_RCB_PARAMS > ¶ms, int numTestCuts, typename mvector_t::scalar_type tolerance, int coordDim, const RCP< mvector_t > &vectors, const ArrayView< bool > uniformWeights, multiCriteriaNorm mcnorm, const RCP< PartitioningSolution< Adapter > > &solution, partId_t part0, partId_t part1, ArrayView< unsigned char > lrflags, int &cutDimension, typename mvector_t::scalar_type &cutValue, typename mvector_t::scalar_type &imbalance, partId_t &numPartsLeftHalf, typename mvector_t::scalar_type &weightLeftHalf, typename mvector_t::scalar_type &weightRightHalf) |
| Divide the coordinates into a "left" half and "right" half. More... | |
| template<typename mvector_t , typename Adapter > | |
| void | serialRCB (const RCP< const Environment > &env, int depth, const std::bitset< NUM_RCB_PARAMS > ¶ms, int numTestCuts, typename mvector_t::scalar_type tolerance, int coordDim, const RCP< mvector_t > &vectors, ArrayView< typename mvector_t::local_ordinal_type > index, const ArrayView< bool > uniformWeights, const RCP< PartitioningSolution< Adapter > > &solution, partId_t part0, partId_t part1, ArrayView< partId_t > partNum) |
| Perform RCB on the local process only. More... | |
| template<typename Adapter > | |
| void | AlgPTScotch (const RCP< const Environment > &env, const RCP< const Comm< int > > &problemComm, const RCP< GraphModel< typename Adapter::base_adapter_t > > &model, RCP< PartitioningSolution< Adapter > > &solution) |
| template<typename it > | |
| it | z2Fact (it x) |
| template<typename IT > | |
| void | ithPermutation (const IT n, IT i, IT *perm) |
| template<typename partId_t > | |
| void | getGridCommunicationGraph (partId_t taskCount, partId_t *&task_comm_xadj, partId_t *&task_comm_adj, vector< int > grid_dims) |
| template<typename Adapter , typename scalar_t , typename partId_t > | |
| void | getSolutionCenterCoordinates (const Environment *envConst, const Teuchos::Comm< int > *comm, const Zoltan2::CoordinateModel< typename Adapter::base_adapter_t > *coords, const Zoltan2::PartitioningSolution< Adapter > *soln_, int coordDim, partId_t ntasks, scalar_t **partCenters) |
| template<typename T > | |
| void | fillContinousArray (T *arr, size_t arrSize, T *val) |
| fillContinousArray function More... | |
| 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) |
| void | printListDocumentation (const Teuchos::ParameterList &pl, ostream &os, string listNames=string("")) |
| template<typename User > | |
| size_t | removeUndesiredEdges (const RCP< const Environment > &env, int myRank, bool removeSelfEdges, bool removeOffProcessEdges, bool removeOffGroupEdges, ArrayView< const typename InputTraits< User >::gid_t > &gids, ArrayView< const typename InputTraits< User >::gid_t > &gidNbors, ArrayView< const int > &procIds, ArrayView< StridedData< typename InputTraits< User >::lno_t, typename InputTraits< User >::scalar_t > > &edgeWeights, ArrayView< const typename InputTraits< User >::lno_t > &offsets, ArrayRCP< const typename InputTraits< User >::gid_t > &newGidNbors, typename InputTraits< User >::scalar_t **&newWeights, ArrayRCP< const typename InputTraits< User >::lno_t > &newOffsets) |
| Helper function to remove undesired edges from a graph. More... | |
| template<typename User > | |
| size_t | computeLocalEdgeList (const RCP< const Environment > &env, int rank, size_t numLocalEdges, size_t numLocalGraphEdges, RCP< const IdentifierMap< User > > &idMap, ArrayRCP< const typename InputTraits< User >::gid_t > &allEdgeIds, ArrayRCP< int > &allProcs, ArrayRCP< const typename InputTraits< User >::lno_t > &allOffs, ArrayRCP< StridedData< typename InputTraits< User >::lno_t, typename InputTraits< User >::scalar_t > > &allWeights, ArrayRCP< const typename InputTraits< User >::lno_t > &edgeLocalIds, ArrayRCP< const typename InputTraits< User >::lno_t > &offsets, ArrayRCP< StridedData< typename InputTraits< User >::lno_t, typename InputTraits< User >::scalar_t > > &eWeights) |
| Helper function to create new edges lists containing only edges connected to a neighbor on this process. More... | |
| long | measure_stays (partId_t *remap, int *idx, partId_t *adj, long *wgt, partId_t nrhs, partId_t nlhs) |
| 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 string > &sendBuf, const ArrayView< const int > &sendCount, ArrayRCP< 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... | |
| static void | chaco_flush_line (FILE *infile) |
| helper function for zoltan1 chaco reader code Reader code was copied from zoltan1 test driver code. More... | |
| double | chaco_read_val (FILE *infile, int *end_flag) |
| read a double from a file Reader code was copied from zoltan1 test driver code. More... | |
| int | chaco_read_int (FILE *infile, int *end_flag) |
| read a int from a file Reader code was copied from zoltan1 test driver code. More... | |
| int | chaco_input_graph (FILE *fin, char *inname, int **start, int **adjacency, int *nvtxs, int *vwgt_dim, float **vweights, int *ewgt_dim, float **eweights) |
| read a Chaco graph file Reader code was copied from zoltan1 test driver code. File is closed when read is completed. More... | |
| int | chaco_input_geom (FILE *fingeom, char *geomname, int nvtxs, int *igeom, float **x, float **y, float **z) |
| read a Chaco coordinates file Reader code was copied from zoltan1 test driver code. File is closed when read is completed. More... | |
| int | getHashCode (const unsigned char *a, size_t len) |
| helper to hash values larger than int to an int. Hash values do not need to be unique, but there should be as few overlaps as possible. More... | |
| template<typename T > | |
| std::pair< T, T > | z2LocalMinMax (const T *val, size_t n) |
| helper function to find min and max of array of user Ids More... | |
| template<typename T > | |
| void | z2GlobalMinMax (const Comm< int > &comm, bool noLocalValues, T localMin, T localMax, T &globalMin, T &globalMax) |
| helper function to find global min and max of array of user Ids More... | |
| template<typename T > | |
| bool | z2AreConsecutive (const T *val, size_t n) |
| helper function to determine if list of user Ids are consecutive More... | |
| template<typename T > | |
| std::string | stringifyOrdinal (T ordinal) |
| helper function write a user ID to a string More... | |
| void | addNumberToFileName (int number, std::string fname, std::string &newf) |
| Helper method to add number to a file name. More... | |
| 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 , typename pnum_t , typename lno_t > | |
| void | normedPartWeights (const RCP< const Environment > &env, int numberOfParts, const ArrayView< const pnum_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 pnum_t , typename lno_t > | |
| void | globalSumsByPart (const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, const ArrayView< const pnum_t > &part, const ArrayView< StridedData< lno_t, scalar_t > > &vwgts, multiCriteriaNorm mcNorm, partId_t &numParts, partId_t &numNonemptyParts, ArrayRCP< MetricValues< scalar_t > > &metrics, ArrayRCP< scalar_t > &globalSums) |
| Given the local partitioning, compute the global sums in each part. More... | |
| template<typename scalar_t > | |
| void | computeImbalances (partId_t numParts, partId_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 > | |
| void | computeImbalances (partId_t numParts, partId_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 Adapter > | |
| void | objectMetrics (const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, multiCriteriaNorm mcNorm, const RCP< const Adapter > &ia, const RCP< const PartitioningSolution< Adapter > > &solution, partId_t &numParts, partId_t &numNonemptyParts, ArrayRCP< MetricValues< typename Adapter::scalar_t > > &metrics) |
| Compute imbalance metrics for a distribution. More... | |
| template<typename scalar_t > | |
| void | printMetrics (ostream &os, partId_t targetNumParts, partId_t numParts, partId_t numNonemptyParts, const ArrayView< MetricValues< scalar_t > > &infoList) |
| Print out a header and the values for a list of metrics. More... | |
| template<typename scalar_t > | |
| void | printMetrics (ostream &os, partId_t targetNumParts, partId_t numParts, partId_t numNonemptyParts, const MetricValues< scalar_t > &info) |
| Print out a header and the values for a single metric. 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... | |
| long | getProcessKilobytes () |
| template<typename scalar_t > | |
| bool | outsideRegion (scalar_t val, scalar_t mark, double epsilon) |
| std::string | Zoltan2_Version () |
Variables | |
| static char | chaco_line [LINE_LENGTH] |
| static int | chaco_offset = 0 |
| static int | chaco_break_pnt = LINE_LENGTH |
| static int | chaco_save_pnt |
| typedef int Zoltan2::default_lno_t |
Definition at line 67 of file Zoltan2_InputTraits.hpp.
| typedef double Zoltan2::default_scalar_t |
Definition at line 85 of file Zoltan2_InputTraits.hpp.
| typedef int Zoltan2::default_gno_t |
Definition at line 86 of file Zoltan2_InputTraits.hpp.
| typedef std::bitset<NUM_MODEL_FLAGS> Zoltan2::modelFlag_t |
Definition at line 90 of file Zoltan2_Model.hpp.
| typedef size_t Zoltan2::global_size_t |
Definition at line 119 of file Zoltan2_Standards.hpp.
| typedef zoltan2_partId_t Zoltan2::partId_t |
Definition at line 140 of file Zoltan2_Standards.hpp.
| typedef Kokkos::DefaultNode::DefaultNodeType Zoltan2::default_node_t |
Definition at line 163 of file Zoltan2_Standards.hpp.
| enum Zoltan2::blockParams |
The boolean parameters of interest to the Block algorithm.
Definition at line 65 of file Zoltan2_AlgBlock.hpp.
| enum Zoltan2::rcbParams |
The boolean parameters of interest to the RCB algorithm.
Definition at line 136 of file Zoltan2_AlgRCB_methods.hpp.
During partitioning, flags are stored in unsigned char arrays.
Flag is also used to store a region number, but there are at most 251 regions. Therefore region number will not conflict with leftFlag and rightFlag. (Number of regions is number of test cuts plus one.)
| Enumerator | |
|---|---|
| unsetFlag |
253 |
| leftFlag |
254 |
| rightFlag |
255 |
Definition at line 155 of file Zoltan2_AlgRCB_methods.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 71 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 input adapters.
If you change this, update inputAdapterTypeName().
Definition at line 62 of file Zoltan2_InputAdapter.hpp.
| enum Zoltan2::ModelType |
An identifier for the general type of model.
| Enumerator | |
|---|---|
| InvalidModel | |
| HypergraphModelType | |
| GraphModelType | |
| CoordinateModelType | |
| IdentifierModelType | |
Definition at line 61 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 72 of file Zoltan2_Model.hpp.
Identifier translations available from IdentifierMap.
| Enumerator | |
|---|---|
| TRANSLATE_APP_TO_LIB |
convert user ids to internal ids |
| TRANSLATE_LIB_TO_APP |
convert internal ids to user ids |
Definition at line 71 of file Zoltan2_IdentifierMap.hpp.
|
static |
Definition at line 76 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 84 of file Zoltan2_GreedyMWM.hpp.
| int Zoltan2::AlgAMD | ( | const RCP< GraphModel< Adapter > > & | model, |
| const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > & | solution, | ||
| const RCP< Teuchos::ParameterList > & | pl, | ||
| const RCP< Teuchos::Comm< int > > & | comm | ||
| ) |
Definition at line 61 of file Zoltan2_AlgAMD.hpp.
| int Zoltan2::AlgIncDegree | ( | const RCP< GraphModel< Adapter > > & | model, |
| const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > & | solution, | ||
| const RCP< Teuchos::ParameterList > & | pl, | ||
| const RCP< Teuchos::Comm< int > > & | comm | ||
| ) |
Definition at line 66 of file Zoltan2_AlgIncDegree.hpp.
| int Zoltan2::AlgNatural | ( | const RCP< IdentifierModel< Adapter > > & | model, |
| const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > & | solution, | ||
| const RCP< Teuchos::ParameterList > & | pl, | ||
| const RCP< Teuchos::Comm< int > > & | comm | ||
| ) |
Definition at line 60 of file Zoltan2_AlgNatural.hpp.
| int Zoltan2::AlgRandom | ( | const RCP< IdentifierModel< Adapter > > & | model, |
| const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > & | solution, | ||
| const RCP< Teuchos::ParameterList > & | pl, | ||
| const RCP< Teuchos::Comm< int > > & | comm | ||
| ) |
Definition at line 61 of file Zoltan2_AlgRandom.hpp.
| int Zoltan2::AlgRCM | ( | const RCP< GraphModel< Adapter > > & | model, |
| const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > & | solution, | ||
| const RCP< Teuchos::ParameterList > & | pl, | ||
| const RCP< Teuchos::Comm< int > > & | comm | ||
| ) |
Definition at line 61 of file Zoltan2_AlgRCM.hpp.
| int Zoltan2::AlgSpectral | ( | const RCP< GraphModel< Adapter > > & | model, |
| const RCP< OrderingSolution< typename Adapter::gid_t, typename Adapter::lno_t > > & | solution, | ||
| const RCP< Teuchos::ParameterList > & | pl, | ||
| const RCP< const Teuchos::Comm< int > > & | comm | ||
| ) |
Definition at line 61 of file Zoltan2_AlgSpectral.hpp.
| void Zoltan2::AlgBlock | ( | const RCP< const Environment > & | env, |
| const RCP< Comm< int > > & | problemComm, | ||
| const RCP< const IdentifierModel< typename Adapter::base_adapter_t > > & | ids, | ||
| RCP< PartitioningSolution< Adapter > > & | solution | ||
| ) |
Block partitioning method.
| env | library configuration and problem parameters |
| problemComm | the communicator for the problem |
| ids | an Identifier model |
| solution | a Solution object, containing part information |
Preconditions: The parameters in the environment have been processed (committed). No special requirements on the identifiers.
Block partitioning uses one weight only
Block partitioning assumes one part per process.
check for memory allocation failures
The metrics come out really bad. Is it an error in algorithm or in metrics.
Definition at line 94 of file Zoltan2_AlgBlock.hpp.
|
inline |
Definition at line 346 of file Zoltan2_AlgPQJagged.hpp.
|
inline |
Function that calculates the next pivot position, according to given coordinates of upper bound and lower bound, the weights at upper and lower bounds, and the expected weight.
| cutUpperBounds | is the pointer to the array holding the upper bounds coordinates of the cuts. |
| cutLowerBounds | is the pointer to the array holding the lower bound coordinates of the cuts. |
| currentCutIndex | is the index of the current cut, the indices used for lower and upper bound arrays. |
| cutUpperWeight | is the pointer to the array holding the weights at the upper bounds of each cut. |
| cutLowerWeight | is the pointer to the array holding the weights at the lower bounds of each cut. |
| ew | is the expected weight that should be placed on the left of the cut line. |
Definition at line 366 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::get_partitioning_params | ( | const Teuchos::ParameterList & | pl, |
| T & | imbalanceTolerance, | ||
| multiCriteriaNorm & | mcnorm, | ||
| std::bitset< NUM_RCB_PARAMS > & | params, | ||
| int & | numTestCuts, | ||
| bool & | ignoreWeights | ||
| ) |
Definition at line 384 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::pqJagged_getParameters | ( | const Teuchos::ParameterList & | pl, |
| bool & | allowNonrectilinear, | ||
| partId_t & | concurrentPartCount, | ||
| int & | migration_actualMigration_option, | ||
| int & | migration_check_option, | ||
| int & | migration_all2all_option, | ||
| T & | migration_imbalance_cut_off, | ||
| int & | migration_assignment_type, | ||
| int & | keep_part_boxes, | ||
| int & | enable_rcb, | ||
| int & | recursion_depth | ||
| ) |
Returns the parameters such as: Partitioning problem parameters of interest: Partitioning objective imbalance_tolerance.
Geometric partitioning problem parameters of interest: average_cuts rectilinear_blocks bisection_num_test_cuts (experimental)
| pl | is the ParameterList object read from the environment. |
| float-like | value representing imbalance tolerance. An output of the function. (for imbalance 0.03, the user currently inputs 1.03. However, This function will return 0.03 for that case.) |
| mcnorm | multiCriteriaNorm. An output of the function. //not used in pqJagged algorithm currently. |
| params | holding the bits for objective problem description. An output of the function. //not used in pqJagged algorithm currently.. |
| numTestCuts. | An output of the function. //not used in pqJagged algorithm currently. |
| ignoreWeights | is the boolean value to treat the each coordinate as uniform regardless of the given input weights. Output of the function. |
| concurrentPartCount | is the number of parts whose cut lines will be calculated concurrently. |
Definition at line 470 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::pqJagged_getCoordinateValues | ( | const RCP< const CoordinateModel< typename Adapter::base_adapter_t > > & | coords, |
| int & | coordDim, | ||
| int & | weightDim, | ||
| size_t & | numLocalCoords, | ||
| global_size_t & | numGlobalCoords, | ||
| int & | criteriaDim, | ||
| const bool & | ignoreWeights | ||
| ) |
Returns the input coordinate value parameters.
| coords | is the coordinate model representing the input. |
| coordDim | is the output of the function representing the dimension count of the input. |
| weightDim | is the output of the function representing the dimension of the weights. |
| numLocalCoords | is the output representing the count of the local coordinates. |
| numGlobalCoords | is the output representing the count of the global coordinates. |
| criteriaDim | is the output representing the multi-objective count. |
| ignoreWeights | is the boolean input of the function, to treat the each coordinate as uniform regardless of the given input weights. Output of the function. |
Definition at line 587 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::pqJagged_getInputValues | ( | const RCP< const Environment > & | env, |
| const RCP< const CoordinateModel< typename Adapter::base_adapter_t > > & | coords, | ||
| RCP< PartitioningSolution< Adapter > > & | solution, | ||
| std::bitset< NUM_RCB_PARAMS > & | params, | ||
| const int & | coordDim, | ||
| const int & | weightDim, | ||
| const size_t & | numLocalCoords, | ||
| size_t & | numGlobalParts, | ||
| int & | pqJagged_multiVectorDim, | ||
| scalar_t ** | pqJagged_values, | ||
| const int & | criteriaDim, | ||
| scalar_t ** | pqJagged_weights, | ||
| ArrayView< const gno_t > & | pqJagged_gnos, | ||
| bool & | ignoreWeights, | ||
| bool * | pqJagged_uniformWeights, | ||
| bool * | pqJagged_uniformParts, | ||
| scalar_t ** | pqJagged_partSizes | ||
| ) |
Function returning the input values for the problem such as the coordinates, weights and desiredPartSizes.
| env | environment. |
| coords | is the coordinate model representing the input. |
| solution | is the partitioning solution object. |
| params | is the bitset to represent multiple parameters. //not used currently by pqJagged. |
| coordDim | is an integer value to represent the count of coordinate dimensions. |
| weightDim | is an integer value to represent the count of weight dimensions. |
| numLocalCoords | is a size_t value to represent the count of local coordinates. |
| numGlobalParts | is a size_t value to represent the total part count. //not used currently inside the pqJagged algorithm. |
| pqJagged_multiVectorDim | ...//not used by pqJagged algorithm. |
| pqJagged_values | is the output representing the coordinates of local points. Its size is coordDim x numLocalCoords and allocated before the function. |
| criteriaDim | ...//not used currently inside the pqJagged algorithm. |
| pqJagged_weights | is the two dimensional array output, representing the weights of coordinates in each weight dimension. Sized weightDim x numLocalCoords, and allocated before the function. |
| pqJagged_gnos | is the ArrayView output representing the global indices of each vertex. No allocation is needed. |
| ignoreWeights | is the boolean input of the function, to treat the each coordinate |
| pqJagged_uniformWeights | is the boolean array representing whether or not coordinates have uniform weight in each weight dimension. |
| pqJagged_uniformParts | is the boolean array representing whether or not the desired part weights are uniform in each weight dimension. |
| pqJagged_partSizes | is the two dimensional float-like array output that represents the ratio of each part. |
Definition at line 628 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::pqJagged_printInput | ( | int | coordDim, |
| int | weightDim, | ||
| size_t | numLocalCoords, | ||
| global_size_t | numGlobalCoords, | ||
| int | criteriaDim, | ||
| scalar_t ** | pqJagged_values, | ||
| scalar_t ** | pqJagged_weights, | ||
| bool * | pqJagged_uniformParts, | ||
| bool * | pqJagged_uniformWeights, | ||
| gno_t * | pqJagged_gnos, | ||
| bool | ignoreWeights, | ||
| size_t | numGlobalParts, | ||
| scalar_t ** | pqJagged_partSizes | ||
| ) |
Printing the input values, to check configuration.
Definition at line 748 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::pqJagged_getLocalMinMaxTotalCoord | ( | lno_t * | partitionedPointPermutations, |
| scalar_t * | pqJagged_coordinates, | ||
| bool | pqJagged_uniformWeights, | ||
| scalar_t * | pqJagged_weights, | ||
| int | numThreads, | ||
| lno_t | coordinateBegin, | ||
| lno_t | coordinateEnd, | ||
| scalar_t * | max_min_array, | ||
| scalar_t | maxScalar, | ||
| scalar_t | minScalar, | ||
| scalar_t & | minCoordinate, | ||
| scalar_t & | maxCoordinate, | ||
| scalar_t & | totalWeight | ||
| ) |
Function to determine the local minimum and maximum coordinate, and local total weight in the given set of local points.
| partitionedPointPermutations | is the indices of coordinates in the given partition. |
| pqJagged_coordinates | float-like array representing the coordinates in a single dimension. Sized as numLocalCoords. |
| pqJagged_uniformWeights | boolean value whether each coordinate value has a uniform weight or not. If true, pqJagged_weights is not used. |
| pqJagged_weights | float-like array representing the weights of the coordinates in a single criteria dimension. Sized as numLocalCoords. |
| numThreads | is the integer value to represent the number of threads available for each processor. |
| coordinateBegin | is the start index of the given partition on partitionedPointPermutations. |
| coordinateEnd | is the end index of the given partition on partitionedPointPermutations. |
| max_min_array | provided work array sized numThreads * 2. |
| maxScalar | to initialize minimum coordinate if there are no points in the given range. |
| minScalar | to initialize maximum coordinate if there are no points in the given range. |
| minCoordinate | is the output to represent the local minimumCoordinate in given range of coordinates. |
| maxCoordinate | is the output to represent the local maximum coordinate in the given range of coordinates. |
| totalWeight | is the output to represent the local total weight in the coordinate in the given range of coordinates. |
Definition at line 828 of file Zoltan2_AlgPQJagged.hpp.
|
inline |
Definition at line 946 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::pqJagged_getGlobalMinMaxTotalCoord | ( | RCP< Comm< int > > & | comm, |
| const RCP< const Environment > & | env, | ||
| partId_t | concurrentPartCount, | ||
| scalar_t * | localMinMaxTotal, | ||
| scalar_t * | globalMinMaxTotal | ||
| ) |
Function that reduces global minimum and maximum coordinates with global total weight from given local arrays.
| comm | the communicator for the problem |
| env | library configuration and problem parameters |
| concurrentPartCount | is the number of parts whose cut lines will be calculated concurrently. |
| localMinMaxTotal | is the array holding local min and max coordinate values with local total weight. First concurrentPartCount entries are minimums of the parts, next concurrentPartCount entries are max, and then the total weights. |
| localMinMaxTotal | is the output array holding global min and global coordinate values with global total weight. The structure is same as localMinMaxTotal. |
Definition at line 968 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::pqJagged_getCutCoord_Weights | ( | scalar_t | minCoordinate, |
| scalar_t | maxCoordinate, | ||
| bool | pqJagged_uniformParts, | ||
| bool | pqJagged_uniformWeights, | ||
| scalar_t * | pqJagged_partSizes, | ||
| partId_t | noCuts, | ||
| scalar_t | globalTotalWeight, | ||
| scalar_t * | cutCoordinates, | ||
| scalar_t * | cutPartRatios, | ||
| int | numThreads, | ||
| vector< partId_t > * | currentPartitions, | ||
| vector< partId_t > * | futurePartitions, | ||
| partId_t | partIndex, | ||
| partId_t | futureArrayIndex | ||
| ) |
Function that calculates the new coordinates for the cut lines. Function is called inside the parallel region.
| minCoordinate | minimum coordinate in the range. |
| maxCoordinate | maximum coordinate in the range. |
| pqJagged_uniformParts | is a boolean value holding whether the desired partitioning is uniform. |
| pqJagged_uniformWeight | is a boolean value holding whether the coordinates have unit weights. |
| pqJagged_partSizes | holds the desired parts sizes if desired partitioning is not uniform. |
| noCuts | holds the number of cuts in the current partitioning dimension. |
| globalTotalWeight | holds the global total weight in the current part. |
| cutCoordinates | is the output array for the initial cut lines. |
| cutPartRatios | is the output array holding the cumulative ratios of parts in current partitioning. For partitioning to 4 uniformly, cutPartRatios will be (0.25 * globalTotalWeight, 0.5 *globalTotalWeight , 0.75 * globalTotalWeight, globalTotalWeight). |
| numThreads | hold the number of threads available per mpi. |
| currentPartitions | is the vector that holds how many more parts each part will be divided into more for the parts at the beginning of this coordinate partitioning |
| futurePartitions | is the vector that holds how many more parts each part will be divided into more for the parts that will be obtained at the end of this coordinate partitioning. |
| partIndex | is the index of the part in the currentPartitions vector. |
| futureArrayIndex | holds the amount of shift in the futurePartitions for the output parts. |
Definition at line 1041 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::getNewCoordinates | ( | const RCP< const Environment > & | env, |
| RCP< Comm< int > > & | comm, | ||
| const size_t & | total_part_count, | ||
| const partId_t & | noCuts, | ||
| const scalar_t & | maxCoordinate, | ||
| const scalar_t & | minCoordinate, | ||
| const scalar_t & | globalTotalWeight, | ||
| const scalar_t & | imbalanceTolerance, | ||
| scalar_t * | globalPartWeights, | ||
| const scalar_t * | localPartWeights, | ||
| const scalar_t * | targetPartWeightRatios, | ||
| bool * | isDone, | ||
| scalar_t * | cutCoordinates, | ||
| scalar_t * | cutUpperBounds, | ||
| scalar_t * | cutLowerBounds, | ||
| scalar_t * | leftClosestDistance, | ||
| scalar_t * | rightClosestDistance, | ||
| scalar_t * | cutLowerWeight, | ||
| scalar_t * | cutUpperWeight, | ||
| scalar_t * | newCutCoordinates, | ||
| bool | allowNonRectelinearPart, | ||
| float * | nonRectelinearPartRatios, | ||
| partId_t * | rectilinearCutCount, | ||
| scalar_t * | localCutWeights, | ||
| scalar_t * | globalCutWeights, | ||
| partId_t & | myNoneDoneCount | ||
| ) |
Function that calculates the new coordinates for the cut lines. Function is called inside the parallel region.
| env | library configuration and problem parameters |
| comm | the communicator for the problem |
| total_part_count | is the sum of number of cutlines and number of parts. Simply it is 2*P - 1. |
| noCuts | is the number of cut lines. P - 1. |
| maxCoordinate | is the maximum coordinate in the current range of coordinates and in the current dimension. |
| minCoordinate | is the maximum coordinate in the current range of coordinates and in the current dimension. |
| globalTotalWeight | is the global total weight in the current range of coordinates. |
| imbalanceTolerance | is the maximum allowed imbalance ratio. |
| maxCoordinate | is the maximum coordinate in the current part. |
| minCoordinate | is the minumum coordinate in the current part. |
| globalPartWeights | is the array holding the weight of parts. Assumes there are 2*P - 1 parts (cut lines are seperate parts). |
| localPartWeights | is the local totalweight of the processor. |
| targetPartWeightRatios | are the desired cumulative part ratios, sized P. |
| isDone | is the boolean array to determine if the correct position for a cut line is found. |
| cutCoordinates | is the array holding the coordinates of each cut line. Sized P - 1. |
| cutUpperBounds | is the array holding the upper bound coordinate for each cut line. Sized P - 1. |
| cutLowerBounds | is the array holding the lower bound coordinate for each cut line. Sized P - 1. |
| leftClosestDistance | is the array holding the distances to the closest points to the cut lines from left. |
| rightClosestDistance | is the array holding the distances to the closest points to the cut lines from right. |
| cutLowerWeight | is the array holding the weight of the parts at the left of lower bound coordinates. |
| cutUpperWeight | is the array holding the weight of the parts at the left of upper bound coordinates. |
| newCutCoordinates | is the work array, sized P - 1. |
| allowNonRectelinearPart | is the boolean value whether partitioning should allow distributing the points on same coordinate to different parts. |
| nonRectelinearPartRatios | holds how much percentage of the coordinates on the cutline should be put on left side. |
| rectilinearCutCount | is the count of cut lines whose balance can be achived via distributing the points in same coordinate to different parts. |
| localCutWeights | is the local weight of coordinates on cut lines. |
| globalCutWeights | is the global weight of coordinates on cut lines. |
| myNoneDoneCount | is the number of cutlines whose position has not been determined yet. For K > 1 it is the count in a single part (whose cut lines are determined). |
Definition at line 1136 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::pqJagged_1DPart_getPartWeights | ( | size_t | total_part_count, |
| partId_t | noCuts, | ||
| scalar_t | maxCoordinate, | ||
| scalar_t | minCoordinate, | ||
| scalar_t | _EPSILON, | ||
| int | numThreads, | ||
| lno_t | coordinateBegin, | ||
| lno_t | coordinateEnd, | ||
| lno_t * | partitionedPointPermutations, | ||
| scalar_t * | pqJagged_coordinates, | ||
| bool | pqJagged_uniformWeights, | ||
| scalar_t * | pqJagged_weights, | ||
| scalar_t * | cutCoordinates_tmp, | ||
| bool * | isDone, | ||
| double * | myPartWeights, | ||
| scalar_t * | myLeftClosest, | ||
| scalar_t * | myRightClosest, | ||
| bool | useBinarySearch, | ||
| partId_t * | partIds | ||
| ) |
Function that calculates the new coordinates for the cut lines. Function is called inside the parallel region.
| total_part_count | is the sum of number of cutlines and number of parts. Simply it is 2*P - 1. |
| noCuts | is the number of cut lines. P - 1. |
| maxCoordinate | is the maximum coordinate in the part. |
| minCoordinate | is the min coordinate in the part. |
| _EPSILON | is the smallest error value for scalar_t. |
| numThreads | hold the number of threads available per processor. |
| coordinateBegin | is the index of the first coordinate in current part. |
| coordinateEnd | is the index of the last coordinate in current part. |
| partitionedPointPermutations | is the indices of coordinates in the given partition. |
| pqJagged_coordinates | is 1 dimensional array holding coordinate values. |
| pqJagged_uniformWeights | is a boolean value if the points have uniform weights. |
| pqJagged_weights | is 1 dimensional array holding the weights of points. |
| globalPartWeights | is the array holding the weight of parts. Assumes there are 2*P - 1 parts (cut lines are seperate parts). |
| localPartWeights | is the local totalweight of the processor. |
| targetPartWeightRatios | are the desired cumulative part ratios, sized P. |
| cutCoordinates_tmp | is the array holding the coordinates of each cut line. Sized P - 1. |
| isDone | is the boolean array to determine if the correct position for a cut line is found. |
| myPartWeights | is the array holding the part weights for the calling thread. |
| myLeftClosest | is the array holding the coordinate of the closest points to the cut lines from left for the calling thread.. |
| myRightClosest | is the array holding the coordinate of the closest points to the cut lines from right for the calling thread. |
| useBinarySearch | is boolean parameter whether to search for cut lines with binary search of linear search. |
| partIds | is the array that holds the part ids of the coordinates |
Definition at line 1493 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::accumulateThreadResults | ( | const vector< partId_t > & | pVector, |
| partId_t | vBegin, | ||
| partId_t | concurrentPartCount, | ||
| int | numThreads, | ||
| bool * | isDone, | ||
| scalar_t ** | leftClosestPoints, | ||
| scalar_t ** | rightClosestPoints, | ||
| double ** | partWeights, | ||
| scalar_t * | totalPartWeights_leftClosest_rightCloset | ||
| ) |
Function that reduces the result of multiple threads for left and right closest points and part weights in a single mpi.
| pVector | is the vector that holds the number of cut lines for each part. |
| vBegin | holds the index of the first part (important when concurrent parts are used.) |
| concurrentPartCount | is the number of parts whose cut lines will be calculated concurrently. |
| numThreads | hold the number of threads available per processor. |
| isDone | is the boolean array to determine if the correct position for a cut line is found. |
| leftClosestDistance | is the 2 dimensional array holding the coordinates of the closest points to the cut lines from left for each thread. |
| rightClosestDistance | is the 2 dimensional array holding the coordinates of the closest points to the cut lines from right for each thread. |
| partWeights | is the array holding the weight of parts for each thread. Assumes there are 2*P - 1 parts (cut lines are seperate parts). |
| localMinMaxTotal | is the array holding the local minimum and maximum coordinate and local total weight of each part. |
| totalPartWeights_leftClosest_rightCloset | is the output array of accumulation, where total part weights (2P - 1), then left closest distances (P -1), then right closest distance (P -1) are stored. |
Definition at line 2022 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::pqJagged_1D_Partition | ( | const RCP< const Environment > & | env, |
| RCP< Comm< int > > & | comm, | ||
| lno_t * | partitionedPointPermutations, | ||
| scalar_t * | pqJagged_coordinates, | ||
| bool | pqJagged_uniformWeights, | ||
| scalar_t * | pqJagged_weights, | ||
| scalar_t * | targetPartWeightRatios, | ||
| scalar_t * | globalMinMaxTotal, | ||
| scalar_t * | localMinMaxTotal, | ||
| int | numThreads, | ||
| scalar_t | imbalanceTolerance, | ||
| partId_t | currentPartBeginIndex, | ||
| partId_t | concurrentPartCount, | ||
| lno_t * | inTotalCounts, | ||
| scalar_t * | cutCoordinates, | ||
| scalar_t * | cutCoordinatesWork, | ||
| scalar_t ** | leftClosestDistance, | ||
| scalar_t ** | rightClosestDistance, | ||
| scalar_t * | cutUpperBounds, | ||
| scalar_t * | cutLowerBounds, | ||
| scalar_t * | cutUpperWeight, | ||
| scalar_t * | cutLowerWeight, | ||
| bool * | isDone, | ||
| double ** | partWeights, | ||
| scalar_t * | local_totalPartWeights_leftClosest_rightCloset, | ||
| scalar_t * | global_totalPartWeights_leftClosest_rightCloset, | ||
| bool | allowNonRectelinearPart, | ||
| float * | nonRectelinearPartRatios, | ||
| scalar_t * | localCutWeights, | ||
| scalar_t * | globalCutWeights, | ||
| partId_t | allDone, | ||
| partId_t * | myNonDoneCounts, | ||
| bool | useBinarySearch, | ||
| partId_t * | partIds, | ||
| vector< partId_t > & | pVector | ||
| ) |
Function that is responsible from 1D partitioning of the given range of coordinates.
| env | library configuration and problem parameters |
| comm | the communicator for the problem |
| partitionedPointPermutations | is the indices of coordinates in the given partition. |
| pqJagged_coordinates | is 1 dimensional array holding coordinate values. |
| pqJagged_uniformWeights | is a boolean value if the points have uniform weights. |
| pqJagged_weights | is 1 dimensional array holding the weights of points. |
| targetPartWeightRatios | is the cumulative desired weight ratios for each part. Sized P. |
| globalMinMaxTotal | is the array holding the global min,max and total weight. minimum of part k is on k, maximum is on k + concurrentPartcount, totalweight is on k + 2*concurrentPartCount |
| localMinMaxTotal | is the array holding the local min,max and total weight. Structure is same with globalMinMaxTotal array. |
| partNo | is the total number of parts. |
| numThreads | is the number of available threads by each processor. |
| imbalanceTolerance | is the maximum allowed imbalance ratio. |
| currentPartBeginIndex | is the beginning index of concurrentPartCount parts on inTotalCounts array. |
| concurrentPartCount | is the number of parts whose cut lines will be calculated concurrently. |
| inTotalCounts | is the array holding the beginning indices of the parts from previous dimension partitioning. |
| cutCoordinates | is the array holding the coordinates of the cut. |
| cutCoordinatesWork | is a work array sized P - 1. |
| leftClosestDistance | is the two dimensional array holding the distances to the closest points to the cut lines from left. One dimension for each thread. |
| rightClosestDistance | is the two dimensional array holding the distances to the closest points to the cut lines from right. One dimension for each thread. |
| cutUpperBounds | is the array holding the upper bound coordinate for each cut line. Sized P - 1. |
| cutLowerBounds | is the array holding the lower bound coordinate for each cut line. Sized P - 1. |
| cutUpperWeight | is the array holding the weight of the parts at the left of upper bound coordinates. |
| cutLowerWeight | is the array holding the weight of the parts at the left of lower bound coordinates. |
| isDone | is the boolean array to determine if the correct position for a cut line is found. |
| partWeights | is the two dimensional array holding the part weights. One dimension for each thread. |
| local_totalPartWeights_leftClosest_rightCloset | is one dimensional array holding the local part weights, left and right closest points. Convenient for mpi-reduction. |
| global_totalPartWeights_leftClosest_rightCloset | is one dimensional array holding the local part weights, left and right closest points. Convenient for mpi-reduction. |
| allowNonRectelinearPart | is whether to allow distribution of points on same coordinate to different parts or not. |
| nonRectelinearPartRatios | is one dimensional array holding the ratio of the points on cut lines representing how many of them will be put to left of the line. |
| localCutWeights | is one dimensional array holding the local part weights only on cut lines. |
| globalCutWeights | is one dimensional array holding the global part weights only on cut lines. |
| allDone | is the number of cut lines whose positions should be calculated. |
| myNonDoneCounts | is one dimensional array holding the number of cut lines in each part whose positions should be calculated. |
| useBinarySearch | is boolean parameter whether to search for cut lines with binary search of linear search. |
| partIds | is the array that holds the part ids of the coordinates |
| pVector | is the vector that holds how many parts each part will be divided into. |
Definition at line 2148 of file Zoltan2_AlgPQJagged.hpp.
| T* Zoltan2::allocMemory | ( | size_t | size | ) |
Definition at line 2520 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::freeArray | ( | T *& | array | ) |
Definition at line 2534 of file Zoltan2_AlgPQJagged.hpp.
| std::string Zoltan2::toString | ( | tt | obj | ) |
Definition at line 2544 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::uqsort | ( | IT | n, |
| uSortItem< IT, WT > * | arr | ||
| ) |
Definition at line 2660 of file Zoltan2_AlgPQJagged.hpp.
| partId_t Zoltan2::getPartitionArrays | ( | const partId_t * | partNo, |
| vector< partId_t > & | pAlongI, | ||
| vector< partId_t > * | currentPartitions, | ||
| vector< partId_t > * | newFuturePartitions, | ||
| partId_t & | futurePartNumbers, | ||
| partId_t | currentPartitionCount, | ||
| int | partArraySize, | ||
| int | i, | ||
| partId_t | maxPartNo, | ||
| int | keep_part_boxes, | ||
| RCP< vector< coordinateModelPartBox< scalar_t, partId_t > > > | inPartBoxes, | ||
| RCP< vector< coordinateModelPartBox< scalar_t, partId_t > > > | outPartBoxes | ||
| ) |
Definition at line 4882 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::getInitialPartAssignments | ( | scalar_t & | maxCoordinate, |
| scalar_t & | minCoordinate, | ||
| partId_t & | currentPart, | ||
| lno_t * | inTotalCounts, | ||
| lno_t * | partitionedPointCoordinates, | ||
| scalar_t * | pqCoord, | ||
| partId_t * | partIds, | ||
| scalar_t | _EPSILON, | ||
| partId_t & | partition | ||
| ) |
Function that calculates the new coordinates for the cut lines. Function is called inside the parallel region.
| minCoordinate | minimum coordinate in the range. |
| maxCoordinate | maximum coordinate in the range. |
| currentPart | is the index of the part in the inTotalCounts vector. |
| inTotalCounts | holds the beginning and end of the coordinates in each part on partitionedPointCoordinates array. |
| partitionedPointCoordinates | is the permutation array, holds the real indices of coordinates on pqCoord array. |
| pqCoord | is the 1D array holding the coordinates. |
| partIds | is the array holding the partIds of each coordinate. |
| _EPSILON | is min element can be differentiated by scalar_t |
| partition | is the number of parts that the current part will be partitioned into. |
Definition at line 5011 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::getPartSpecifications | ( | const partId_t * | partNo, |
| int | partArraySize, | ||
| size_t & | numGlobalParts, | ||
| partId_t & | totalDimensionCut, | ||
| partId_t & | totalPartCount, | ||
| partId_t & | maxPartNo, | ||
| partId_t & | reduceAllCount, | ||
| partId_t & | maxTotalCumulativePartCount, | ||
| partId_t & | maxCutNo, | ||
| size_t & | maxTotalPartCount | ||
| ) |
Definition at line 5060 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::getChunksFromCoordinates | ( | partId_t | partNo, |
| int | noThreads, | ||
| lno_t * | partitionedPointPermutations, | ||
| scalar_t * | pqJagged_coordinates, | ||
| bool | pqJagged_uniformWeights, | ||
| scalar_t * | coordWeights, | ||
| scalar_t * | cutCoordinates, | ||
| lno_t | coordinateBegin, | ||
| lno_t | coordinateEnd, | ||
| bool | allowNonRectelinearPart, | ||
| float * | actual_ratios, | ||
| scalar_t * | localPartWeights, | ||
| double ** | partWeights, | ||
| float ** | nonRectelinearRatios, | ||
| lno_t ** | partPointCounts, | ||
| lno_t * | newpartitionedPointPermutations, | ||
| lno_t * | totalCounts, | ||
| partId_t * | partIds, | ||
| bool | isSequentialAndPricise, | ||
| scalar_t ** | pqJaggedAllCoordinates, | ||
| int | pqCoordDim, | ||
| int | currentCoord | ||
| ) |
Function that determines the permutation indices of the coordinates.
| partNo | is the number of parts. |
| noThreads | is the number of threads avaiable for each processor. |
| partitionedPointPermutations | is the indices of coordinates in the given partition. |
| pqJagged_coordinates | is 1 dimensional array holding the coordinate values. |
| pqJagged_uniformWeights | is a boolean value if the points have uniform weights. |
| coordWeights | is 1 dimensional array holding the weights of points. |
| cutCoordinates | is 1 dimensional array holding the cut coordinates. |
| coordinateBegin | is the start index of the given partition on partitionedPointPermutations. |
| coordinateEnd | is the end index of the given partition on partitionedPointPermutations. |
| allowNonRectelinearPart | is the boolean value whether partitioning should allow distributing the points on same coordinate to different parts. |
| actual_ratios | holds how much weight of the coordinates on the cutline should be put on left side. |
| localPartWeights | is the local totalweight of the processor. |
| partWeights | is the two dimensional array holding the weight of parts for each thread. Assumes there are 2*P - 1 parts (cut lines are seperate parts). |
| nonRectelinearRatios | is the two dimensional work array holding ratios of weights to be put left and right of the cut line. |
| partPointCounts | is the two dimensional array holding the number of points in each part for each thread. |
| newpartitionedPointPermutations | is the indices of coordinates calculated for the partition on next dimension. |
| totalCounts | are the number points in each output part. |
| partIds | is the array that holds the part ids of the coordinates |
| isSequentialAndPricise | is the boolean value. This is true when the pricise and deterministic result is required. |
| pqJaggedAllCoordinates | is the array that holds the coordinates of points. |
| pqCoordDim | is dimension of the input |
| currentCoord | is the index according to which the partitioning is done. |
Definition at line 5153 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::sequentialTaskPartitioning | ( | const RCP< const Environment > & | env, |
| lno_t | numLocalCoords, | ||
| lno_t | actualNumCoords, | ||
| size_t | numGlobalParts, | ||
| int | coordDim, | ||
| scalar_t ** | pqJagged_coordinates, | ||
| lno_t * | output_permutation, | ||
| lno_t * | output_partIndices | ||
| ) |
Definition at line 5583 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::AlgPQJagged | ( | const RCP< const Environment > & | env, |
| RCP< Comm< int > > & | problemComm, | ||
| const RCP< const CoordinateModel< typename Adapter::base_adapter_t > > & | coords, | ||
| RCP< PartitioningSolution< Adapter > > & | solution | ||
| ) |
PQJagged coordinate partitioning algorithm.
| env | library configuration and problem parameters |
| comm | the communicator for the problem |
| coords | a CoordinateModel with user data |
| solution | a PartitioningSolution, on input it contains part information, on return it also contains the solution and quality metrics. |
Definition at line 6283 of file Zoltan2_AlgPQJagged.hpp.
| void Zoltan2::AlgRCB | ( | const RCP< const Environment > & | env, |
| RCP< Comm< int > > & | problemComm, | ||
| const RCP< const CoordinateModel< typename Adapter::base_adapter_t > > & | coords, | ||
| RCP< PartitioningSolution< Adapter > > & | solution | ||
| ) |
Recursive coordinate bisection algorithm.
| env | library configuration and problem parameters |
| comm | the communicator for the problem |
| coords | a CoordinateModel with user data |
| solution | a PartitioningSolution, on input it contains part information, on return it also contains the solution and quality metrics. |
timing and memory usage profiling and debug messages
catch errors and pass back
write the rcb tree back to the solution
for "repartition", start with the tree in the solution
work on performance issues. Some of the global communication can probably be consolidated into fewer messages.
The algorithm is documented in Recursive Coordinate Bisection (RCB). Please document changes at this page.
Definition at line 83 of file Zoltan2_AlgRCB.hpp.
| void Zoltan2::getFractionLeft | ( | const RCP< const Environment > & | env, |
| partId_t | part0, | ||
| partId_t | part1, | ||
| const RCP< PartitioningSolution< Adapter > > & | solution, | ||
| ArrayRCP< double > & | fractionLeft, | ||
| partId_t & | numPartsLeftHalf | ||
| ) |
Determine the fraction of work in the left half.
| env | the Environment for the application. |
| part0 | is the first part of the parts to bisected. |
| part1 | is the last part of the parts to bisected. |
| solution | which contains the part sizes. |
| fractionLeft | on return fractionLeft[w] is the fraction of work wanted in the left half for weight dimension w. |
| numPartsLeftHalf | on return is the number of parts in the left half. |
Definition at line 179 of file Zoltan2_AlgRCB_methods.hpp.
| void Zoltan2::getCutDimension | ( | const RCP< const Environment > & | env, |
| const RCP< Comm< int > > & | comm, | ||
| int | coordDim, | ||
| const RCP< mvector_t > & | vectors, | ||
| ArrayView< typename mvector_t::local_ordinal_type > | index, | ||
| int & | dimension, | ||
| typename mvector_t::scalar_type & | minCoord, | ||
| typename mvector_t::scalar_type & | maxCoord | ||
| ) |
Choose a coordinate dimension for the next cut.
| env | the Environment for the application. |
| comm | the communicator |
| coordDim | the first coordDim vectors in the vectors list are coordinates, the rest are weights. |
| vectors | lists of coordinates and non-uniform weights |
| index | is the index into the vectors arrays for the coordinates to be included in the partitioning. If index.size() is zero, then include all coordinates. |
| dimension | on return is the dimension to cut |
| minCoord | on the return is the minimum coordinate value in this dimension. |
| maxCoord | on the return is the maximum coordinate value in this dimension. |
Definition at line 238 of file Zoltan2_AlgRCB_methods.hpp.
| void Zoltan2::migrateData | ( | const RCP< const Environment > & | env, |
| const RCP< Comm< int > > & | comm, | ||
| ArrayView< unsigned char > | lrflags, | ||
| RCP< mvector_t > & | vectors, | ||
| int & | leftNumProcs | ||
| ) |
Migrate coordinates and weights to new processes.
| env | the Environment for the application. |
| comm | the communicator for this step. |
| lrflags | each element in this array must have the value leftFlag or rightFlag to indicate whether the corresponding coordinate is on the left of on the right of the cut. |
| vectors | is a list of the data to be migrated. On return, vectors contains the new data belonging to this process. param leftNumProcs on return is the number of processes receiving the left half. |
Definition at line 347 of file Zoltan2_AlgRCB_methods.hpp.
| scalar_t Zoltan2::getCoordWeight | ( | lno_t | id, |
| multiCriteriaNorm | mcnorm, | ||
| ArrayView< StridedData< lno_t, scalar_t > > | weights | ||
| ) |
Definition at line 473 of file Zoltan2_AlgRCB_methods.hpp.
| bool Zoltan2::emptyPartsCheck | ( | const RCP< const Environment > & | env, |
| const ArrayView< double > | fractionLeft, | ||
| scalar_t | minCoord, | ||
| scalar_t | maxCoord, | ||
| leftRightFlag & | lrf, | ||
| scalar_t & | cutValue | ||
| ) |
Solve partitioning if there are empty parts.
| fractionLeft | amount of work in left half |
| minCoord | minimum coordinate value |
| maxCoord | maximum coordinate value |
| lrf | on return, if one side is empty, lrf will be leftFlag or rightFlag to indicate which side is empty. |
| imbalance | on return, if one half is empty, the imbalance will be set to 0.0 (perfect balance) |
| cutValue | on return, if one half is empty, the cutValue will be set to minCoord or maxCoord depending on which half is empty. |
Definition at line 514 of file Zoltan2_AlgRCB_methods.hpp.
| void Zoltan2::testCoordinatesOnRightBoundary | ( | const RCP< const Environment > & | env, |
| const RCP< Comm< int > > & | comm, | ||
| scalar_t | totalWeightLeft, | ||
| scalar_t | targetLeftScalar, | ||
| int | cutLocation, | ||
| ArrayView< scalar_t > | localSums, | ||
| ArrayView< scalar_t > | globalSums, | ||
| ArrayView< lno_t > | index, | ||
| ArrayView< StridedData< lno_t, scalar_t > > | weights, | ||
| multiCriteriaNorm | mcnorm, | ||
| ArrayView< unsigned char > | lrFlags, | ||
| scalar_t & | globalWeightMovedRight | ||
| ) |
Move boundary coordinates to the right.
| env | the environment |
| comm | the communicator |
| totalWeightLeft | the total weight in the left region at the end of the last iteration. |
| targetWeightLeft | the ideal weight for the left part. |
| cutLocation | index into sums of boundary sum. each boundary. |
Definition at line 568 of file Zoltan2_AlgRCB_methods.hpp.
| void Zoltan2::BSPfindCut | ( | const RCP< const Environment > & | env, |
| const RCP< Comm< int > > & | comm, | ||
| const std::bitset< NUM_RCB_PARAMS > & | params, | ||
| int | numTestCuts, | ||
| typename mvector_t::scalar_type | tolerance, | ||
| int | cutDim, | ||
| int | coordDim, | ||
| const RCP< mvector_t > & | vectors, | ||
| ArrayView< typename mvector_t::local_ordinal_type > | index, | ||
| ArrayView< double > | fractionLeft, | ||
| ArrayView< bool > | uniformWeights, | ||
| typename mvector_t::scalar_type | coordGlobalMin, | ||
| typename mvector_t::scalar_type | coordGlobalMax, | ||
| typename mvector_t::scalar_type & | cutValue, | ||
| ArrayView< unsigned char > | lrFlags, | ||
| typename mvector_t::scalar_type & | totalWeightLeft, | ||
| typename mvector_t::scalar_type & | totalWeightRight, | ||
| typename mvector_t::local_ordinal_type & | localCountLeft, | ||
| typename mvector_t::scalar_type & | imbalance | ||
| ) |
Find the point in space that divides the data evenly with respect to the weights, part sizes, and the user's objective.
| env | the Environment for the application. |
| comm | the communicator for this step. |
| params | a bit map of boolean parameters. |
| numTestCuts | the number of test cuts to make in one round. |
| tolerance | the maximum acceptable imbalance (0,1). |
| cutDim | the dimension of the coordinates to cut. |
| coordDim | the first coordDim vectors in the vectors list are coordinates, the rest are weights. |
| vectors | lists of coordinates and non-uniform weights |
| index | is the index into the vectors arrays for the coordinates to be included in the partitioning. If index.size() is zero, then all coordinates are included. |
| fractionLeft | the size of the left part for each weight, the right part should measure 1.0 - fractionLeft. |
| uniformWeights | element w is true if weights for weight dimension w are all 1.0. |
| coordGlobalMin | the global minimum of coordinates in dimension cutDim |
| coordGlobalMax | the global maximum of coordinates in dimension cutDim |
| cutValue | on return this is the computed cut location. |
| lrflags | on return lists the values leftFlag or rightFlag to indicate whether the corresponding coordinate is on the left of on the right of the cut. Allocated by caller. In particular, if index.size() is non-zero, then lrflags[i] is the flag for coordinate vectors[index[i]]. Otherwise it is the flag for coordinate vectors[i]. |
| totalWeightLeft | on return is the global total weight left of the cut. |
| totalWeightRight | on return is the global total weight right of the cut. |
| localCountLeft | on return is the local number of objects left of the cut. |
| imbalance | on return is the imbalance for the computed partitioning (0, 1). |
a separate simpler function when weightDim <= 1
During the first global comm, ensure all procs have same values for cutDim and fractionLeft.
Definition at line 710 of file Zoltan2_AlgRCB_methods.hpp.
| void Zoltan2::determineCut | ( | const RCP< const Environment > & | env, |
| const RCP< Comm< int > > & | comm, | ||
| const std::bitset< NUM_RCB_PARAMS > & | params, | ||
| int | numTestCuts, | ||
| typename mvector_t::scalar_type | tolerance, | ||
| int | coordDim, | ||
| const RCP< mvector_t > & | vectors, | ||
| const ArrayView< bool > | uniformWeights, | ||
| multiCriteriaNorm | mcnorm, | ||
| const RCP< PartitioningSolution< Adapter > > & | solution, | ||
| partId_t | part0, | ||
| partId_t | part1, | ||
| ArrayView< unsigned char > | lrflags, | ||
| int & | cutDimension, | ||
| typename mvector_t::scalar_type & | cutValue, | ||
| typename mvector_t::scalar_type & | imbalance, | ||
| partId_t & | numPartsLeftHalf, | ||
| typename mvector_t::scalar_type & | weightLeftHalf, | ||
| typename mvector_t::scalar_type & | weightRightHalf | ||
| ) |
Divide the coordinates into a "left" half and "right" half.
| env | the Environment for the application. |
| comm | the communicator for this step. |
| params | a bit map of boolean parameters. |
| numTestCuts | the number of test cuts to make in one round. |
| tolerance | the maximum acceptable imbalance (0,1). |
| coordDim | the first coordDim vectors in the vectors list are coordinates, the rest are weights. |
| vectors | lists of coordinates and non-uniform weights |
| uniformWeights | element w is true if weights for weight dimension w are all 1.0. |
| solution | for obtaining the part sizes |
| part0 | is the first part of the parts to bisected. |
| part1 | is the last part of the parts to bisected. |
| lrflags | on return has the value leftFlag or rightFlag to indicate whether the corresponding coordinate is on the left of on the right of the cut. Allocated by caller. |
| cutDimension | on return coordinate dimension that was cut. |
| cutValue | on return this is the computed cut location. |
| imbalance | on return is the imbalance for the computed partitioning for cutDim and fractionLeft (0,1). |
| numPartsLeftHalf | on return the number of parts in the left half. |
| weightLeftHalf | on return the total weight in the left half. |
| weightRightHalf | on return the total weight in the right half. |
Definition at line 1227 of file Zoltan2_AlgRCB_methods.hpp.
| void Zoltan2::serialRCB | ( | const RCP< const Environment > & | env, |
| int | depth, | ||
| const std::bitset< NUM_RCB_PARAMS > & | params, | ||
| int | numTestCuts, | ||
| typename mvector_t::scalar_type | tolerance, | ||
| int | coordDim, | ||
| const RCP< mvector_t > & | vectors, | ||
| ArrayView< typename mvector_t::local_ordinal_type > | index, | ||
| const ArrayView< bool > | uniformWeights, | ||
| const RCP< PartitioningSolution< Adapter > > & | solution, | ||
| partId_t | part0, | ||
| partId_t | part1, | ||
| ArrayView< partId_t > | partNum | ||
| ) |
Perform RCB on the local process only.
| env | the Environment for the application. |
| depth | depth of recursion, for debugging, call with "1" first time. |
| params | a bit map of boolean parameters. |
| numTestCuts | the number of test cuts to make in one round. |
| tolerance | the maximum acceptable imbalance (0,1). |
| coordDim | the first coordDim vectors in the vectors list are coordinates, the rest are weights. |
| vectors | lists of coordinates and non-uniform weights |
| index | is the index into the vectors arrays for the coordinates to be included in the partitioning. If index.size() is zero then indexing will not be used. |
| uniformWeights | element w is true if weights for weight dimension w are all 1.0. |
| solution | for obtaining part sizes. |
| part0 | is the first part of the parts to bisected. |
| part1 | is the last part of the parts to bisected. |
| partNum | on return partNum[i] is the new part number for coordinate i. |
Definition at line 1392 of file Zoltan2_AlgRCB_methods.hpp.
| void Zoltan2::AlgPTScotch | ( | const RCP< const Environment > & | env, |
| const RCP< const Comm< int > > & | problemComm, | ||
| const RCP< GraphModel< typename Adapter::base_adapter_t > > & | model, | ||
| RCP< PartitioningSolution< Adapter > > & | solution | ||
| ) |
Scotch partitioning method.
| env | parameters for the problem and library configuration |
| problemComm | the communicator for the problem |
| model | a graph |
| solution | a Solution object |
Preconditions: The parameters in the environment have been processed (committed).
Definition at line 73 of file Zoltan2_AlgScotch.hpp.
|
inline |
Definition at line 56 of file Zoltan2_TaskMapping.hpp.
| void Zoltan2::ithPermutation | ( | const IT | n, |
| IT | i, | ||
| IT * | perm | ||
| ) |
Definition at line 69 of file Zoltan2_TaskMapping.hpp.
| void Zoltan2::getGridCommunicationGraph | ( | partId_t | taskCount, |
| partId_t *& | task_comm_xadj, | ||
| partId_t *& | task_comm_adj, | ||
| vector< int > | grid_dims | ||
| ) |
Definition at line 98 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 Zoltan2::PartitioningSolution< Adapter > * | soln_, | ||
| int | coordDim, | ||
| partId_t | ntasks, | ||
| scalar_t ** | partCenters | ||
| ) |
Definition at line 124 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 561 of file Zoltan2_TaskMapping.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 614 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 91 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 121 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 143 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 168 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 190 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 215 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 250 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 292 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 312 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 76 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 145 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 178 of file Zoltan2_Parameters.cpp.
| void Zoltan2::printListDocumentation | ( | const Teuchos::ParameterList & | pl, |
| std::ostream & | os, | ||
| std::string | listNames | ||
| ) |
Definition at line 194 of file Zoltan2_Parameters.cpp.
| void Zoltan2::printListDocumentation | ( | const Teuchos::ParameterList & | pl, |
| ostream & | os, | ||
| string | listNames = string("") |
||
| ) |
| size_t Zoltan2::removeUndesiredEdges | ( | const RCP< const Environment > & | env, |
| int | myRank, | ||
| bool | removeSelfEdges, | ||
| bool | removeOffProcessEdges, | ||
| bool | removeOffGroupEdges, | ||
| ArrayView< const typename InputTraits< User >::gid_t > & | gids, | ||
| ArrayView< const typename InputTraits< User >::gid_t > & | gidNbors, | ||
| ArrayView< const int > & | procIds, | ||
| ArrayView< StridedData< typename InputTraits< User >::lno_t, typename InputTraits< User >::scalar_t > > & | edgeWeights, | ||
| ArrayView< const typename InputTraits< User >::lno_t > & | offsets, | ||
| ArrayRCP< const typename InputTraits< User >::gid_t > & | newGidNbors, | ||
| typename InputTraits< User >::scalar_t **& | newWeights, | ||
| ArrayRCP< const typename InputTraits< User >::lno_t > & | newOffsets | ||
| ) |
Helper function to remove undesired edges from a graph.
| env | the environment |
| myRank | is my rank in the problem communicator |
| removeSelfEdges | true if self-edges (edges such that both vertices are the same) should be removed. If true then gids must be set. |
| removeOffProcessEdges | true if edges belonging to processes other than my process should be removed (in which case procIds must be set). |
| removeOffGroupEdges | true if edges belonging to processes outside of our communicator should be removed (in which case procIds must be set). |
| gids | vertex global Id list |
| gidNbors | list of vertex neighbor global ids (edges) |
| procIds | is the list of processes owning the vertices in the gidNbors list. |
| edgeWeights | weights for edges in gidNbors list |
| offsets | offset into above lists for each vertex in gids. |
| newGidNbors | on return a list of the desired neighbors |
| newWeights | if wdim is the edge weight dimension, then on return this points to wdim pointers to arrays of weights for the desired edges. If it is NULL on return, then one of these must be true: |
wdim is zero| newOffsets | on return a list of offsets into the above list for the start of the neighbors for each vertex |
The template parameter is an InputAdapter type.
Definition at line 104 of file Zoltan2_GraphModel.hpp.
| size_t Zoltan2::computeLocalEdgeList | ( | const RCP< const Environment > & | env, |
| int | rank, | ||
| size_t | numLocalEdges, | ||
| size_t | numLocalGraphEdges, | ||
| RCP< const IdentifierMap< User > > & | idMap, | ||
| ArrayRCP< const typename InputTraits< User >::gid_t > & | allEdgeIds, | ||
| ArrayRCP< int > & | allProcs, | ||
| ArrayRCP< const typename InputTraits< User >::lno_t > & | allOffs, | ||
| ArrayRCP< StridedData< typename InputTraits< User >::lno_t, typename InputTraits< User >::scalar_t > > & | allWeights, | ||
| ArrayRCP< const typename InputTraits< User >::lno_t > & | edgeLocalIds, | ||
| ArrayRCP< const typename InputTraits< User >::lno_t > & | offsets, | ||
| ArrayRCP< StridedData< typename InputTraits< User >::lno_t, typename InputTraits< User >::scalar_t > > & | eWeights | ||
| ) |
Helper function to create new edges lists containing only edges connected to a neighbor on this process.
Definition at line 258 of file Zoltan2_GraphModel.hpp.
| long Zoltan2::measure_stays | ( | partId_t * | remap, |
| int * | idx, | ||
| partId_t * | adj, | ||
| long * | wgt, | ||
| partId_t | nrhs, | ||
| partId_t | nlhs | ||
| ) |
Definition at line 55 of file Zoltan2_PartitioningSolution.cpp.
| 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 string > & | sendBuf, | ||
| const ArrayView< const int > & | sendCount, | ||
| ArrayRCP< 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 250 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 272 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.
|
static |
helper function for zoltan1 chaco reader code Reader code was copied from zoltan1 test driver code.
Definition at line 258 of file Zoltan2_ChacoReader.cpp.
| double Zoltan2::chaco_read_val | ( | FILE * | infile, |
| int * | end_flag | ||
| ) |
read a double from a file Reader code was copied from zoltan1 test driver code.
Definition at line 68 of file Zoltan2_ChacoReader.cpp.
| int Zoltan2::chaco_read_int | ( | FILE * | infile, |
| int * | end_flag | ||
| ) |
read a int from a file Reader code was copied from zoltan1 test driver code.
Definition at line 163 of file Zoltan2_ChacoReader.cpp.
| int Zoltan2::chaco_input_graph | ( | FILE * | fin, |
| char * | inname, | ||
| int ** | start, | ||
| int ** | adjacency, | ||
| int * | nvtxs, | ||
| int * | vwgt_dim, | ||
| float ** | vweights, | ||
| int * | ewgt_dim, | ||
| float ** | eweights | ||
| ) |
read a Chaco graph file Reader code was copied from zoltan1 test driver code. File is closed when read is completed.
Definition at line 275 of file Zoltan2_ChacoReader.cpp.
| int Zoltan2::chaco_input_geom | ( | FILE * | fingeom, |
| char * | geomname, | ||
| int | nvtxs, | ||
| int * | igeom, | ||
| float ** | x, | ||
| float ** | y, | ||
| float ** | z | ||
| ) |
read a Chaco coordinates file Reader code was copied from zoltan1 test driver code. File is closed when read is completed.
Definition at line 548 of file Zoltan2_ChacoReader.cpp.
| int Zoltan2::getHashCode | ( | const unsigned char * | a, |
| size_t | len | ||
| ) |
helper to hash values larger than int to an int. Hash values do not need to be unique, but there should be as few overlaps as possible.
Definition at line 73 of file Zoltan2_IdentifierTraits.cpp.
| std::pair<T, T> Zoltan2::z2LocalMinMax | ( | const T * | val, |
| size_t | n | ||
| ) |
helper function to find min and max of array of user Ids
Definition at line 82 of file Zoltan2_IdentifierTraits.hpp.
| void Zoltan2::z2GlobalMinMax | ( | const Comm< int > & | comm, |
| bool | noLocalValues, | ||
| T | localMin, | ||
| T | localMax, | ||
| T & | globalMin, | ||
| T & | globalMax | ||
| ) |
helper function to find global min and max of array of user Ids
Definition at line 118 of file Zoltan2_IdentifierTraits.hpp.
| bool Zoltan2::z2AreConsecutive | ( | const T * | val, |
| size_t | n | ||
| ) |
helper function to determine if list of user Ids are consecutive
Definition at line 148 of file Zoltan2_IdentifierTraits.hpp.
| std::string Zoltan2::stringifyOrdinal | ( | T | ordinal | ) |
helper function write a user ID to a string
Definition at line 167 of file Zoltan2_IdentifierTraits.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.
| 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, max will hold the sum of the values. |
Definition at line 262 of file Zoltan2_Metric.hpp.
| void Zoltan2::normedPartWeights | ( | const RCP< const Environment > & | env, |
| int | numberOfParts, | ||
| const ArrayView< const pnum_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 dimension w. vwgts[w][i] is the w'th weight for object i. |
| mcNorm | the multiCriteria norm, to be used if weight dimension 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 294 of file Zoltan2_Metric.hpp.
| void Zoltan2::globalSumsByPart | ( | const RCP< const Environment > & | env, |
| const RCP< const Comm< int > > & | comm, | ||
| const ArrayView< const pnum_t > & | part, | ||
| const ArrayView< StridedData< lno_t, scalar_t > > & | vwgts, | ||
| multiCriteriaNorm | mcNorm, | ||
| partId_t & | numParts, | ||
| partId_t & | numNonemptyParts, | ||
| ArrayRCP< MetricValues< 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 dimension w. The weight dimension (which must be at least one) is taken to be vwgts.size(). If vwgts[wdim].size() == 0, we assume uniform weights for weight dimension wdim. |
| mcNorm | the multiCriteria norm, to be used if weight dimension is greater than one. |
| numParts | on return this is the global number of parts. |
| 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 1", "weight 2" and so on in that order. If uniform weights were given, then only "object count" appears. If one dimension of non-uniform weights were given, then "object count" and "weight 1" appear. Finally, if multiple weights were given, we have "object count", then "normed weight", then the individual weights "weight 1", "weight 2", and so on. |
| globalSums | If weights are uniform, the globalSums is the numParts totals of global number of objects in each part. Suppose the weight dimension is W. If W is 1, then on return this is an array of length 2*numParts . The first numParts 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)*numParts . The first numParts entries are the count of objects in each part. The next numParts 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 dimension by part number. The array is allocated here. |
globalSumsByPart() 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 454 of file Zoltan2_Metric.hpp.
| void Zoltan2::computeImbalances | ( | partId_t | numParts, |
| partId_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.
| numParts | the number of parts supplied, 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 numParts. |
| 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 706 of file Zoltan2_Metric.hpp.
| void Zoltan2::computeImbalances | ( | partId_t | numParts, |
| partId_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.
| numParts | the number of parts supplied, 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 dimension w are uniform, then psizes[w] should be NULL. Otherwise it should point to targetNumParts sizes, and the sizes for each dimension 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 numParts. |
| 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 794 of file Zoltan2_Metric.hpp.
| void Zoltan2::objectMetrics | ( | const RCP< const Environment > & | env, |
| const RCP< const Comm< int > > & | comm, | ||
| multiCriteriaNorm | mcNorm, | ||
| const RCP< const Adapter > & | ia, | ||
| const RCP< const PartitioningSolution< Adapter > > & | solution, | ||
| partId_t & | numParts, | ||
| partId_t & | numNonemptyParts, | ||
| ArrayRCP< MetricValues< 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 weight dimension is greater than one. See the multiCriteriaNorm enumerator for mcNorm values. |
| numParts | on return is the global number of parts in the solution |
| 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 1", "weight 2" and so on in that order. If uniform weights were given, then only "object count" appears. If one dimension of non-uniform weights were given, then "object count" and "weight 1" appear. Finally, if multiple weights were given, we have "object count", then "normed weight", then the individual weights "weight 1", "weight 2", 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 929 of file Zoltan2_Metric.hpp.
| void Zoltan2::printMetrics | ( | ostream & | os, |
| partId_t | targetNumParts, | ||
| partId_t | numParts, | ||
| partId_t | numNonemptyParts, | ||
| const ArrayView< MetricValues< scalar_t > > & | infoList | ||
| ) |
Print out a header and the values for a list of metrics.
Definition at line 1074 of file Zoltan2_Metric.hpp.
| void Zoltan2::printMetrics | ( | ostream & | os, |
| partId_t | targetNumParts, | ||
| partId_t | numParts, | ||
| partId_t | numNonemptyParts, | ||
| const MetricValues< scalar_t > & | info | ||
| ) |
Print out a header and the values for a single metric.
Definition at line 1100 of file Zoltan2_Metric.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 1112 of file Zoltan2_Metric.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 1161 of file Zoltan2_Metric.hpp.
| long Zoltan2::getProcessKilobytes | ( | ) |
Definition at line 67 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.
|
static |
Definition at line 58 of file Zoltan2_ChacoReader.cpp.
|
static |
Definition at line 59 of file Zoltan2_ChacoReader.cpp.
|
static |
Definition at line 60 of file Zoltan2_ChacoReader.cpp.
|
static |
Definition at line 61 of file Zoltan2_ChacoReader.cpp.
1.8.5