Zoltan 2 Version 0.5
Classes | Namespaces | Defines | Functions
Zoltan2_AlgPQJagged.hpp File Reference

Contains the PQ-jagged algorthm. More...

#include <Zoltan2_AlgRCB_methods.hpp>
#include <Zoltan2_CoordinateModel.hpp>
#include <Zoltan2_Metric.hpp>
#include <Teuchos_ParameterList.hpp>
#include <bitset>
Include dependency graph for Zoltan2_AlgPQJagged.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Teuchos::PQJaggedCombinedReductionOp< Ordinal, T >
class  Teuchos::PQJaggedCombinedMinMaxTotalReductionOp< Ordinal, T >
class  Zoltan2::pqJagged_PartVertices< lno_t, partId_t >
 A helper class containing array representation of coordinate linked lists. More...

Namespaces

namespace  Teuchos
namespace  Zoltan2

Defines

#define EPS_SCALE   1
#define LEAST_SIGNIFICANCE   0.0001
#define SIGNIFICANCE_MUL   1000
#define ABS(x)   ((x) >= 0 ? (x) : -(x))
#define LEAF_IMBALANCE_FACTOR   0.1
#define BINARYCUTOFF   32
#define imbalanceOf(Wachieved, totalW, expectedRatio)   (Wachieved) / ((totalW) * (expectedRatio)) - 1

Functions

template<typename T >
void Zoltan2::firstTouch (T *arrayName, size_t arraySize)
template<typename scalar_t >
scalar_t Zoltan2::pivotPos (scalar_t *cutUpperBounds, scalar_t *cutLowerBounds, size_t currentCutIndex, scalar_t *cutUpperWeight, scalar_t *cutLowerWeight, scalar_t ew)
 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.
template<typename T >
void Zoltan2::pqJagged_getParameters (const Teuchos::ParameterList &pl, T &imbalanceTolerance, multiCriteriaNorm &mcnorm, std::bitset< NUM_RCB_PARAMS > &params, int &numTestCuts, bool &ignoreWeights, bool &allowNonrectelinear, partId_t &concurrentPartCount, bool &force_binary, bool &force_linear)
 Returns the parameters such as: Partitioning problem parameters of interest: Partitioning objective imbalance_tolerance.
template<typename Adapter >
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.
template<typename Adapter , typename scalar_t , typename gno_t >
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.
template<typename scalar_t , typename gno_t >
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.
int Zoltan2::pqJagged_getNumThreads ()
 Function returning the available thread number by the processor.
template<typename scalar_t , typename lno_t >
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.
template<typename scalar_t >
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.
template<typename scalar_t >
void Zoltan2::pqJagged_getCutCoord_Weights (scalar_t minCoordinate, scalar_t maxCoordinate, bool pqJagged_uniformParts, scalar_t *pqJagged_partSizes, partId_t noCuts, scalar_t *cutCoordinates, scalar_t *cutPartRatios, int numThreads)
 Function that calculates the new coordinates for the cut lines. Function is called inside the parallel region.
template<typename scalar_t >
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 maxScalar, const 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 *rectelinearCutCount, 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.
template<typename scalar_t , typename lno_t >
void Zoltan2::pqJagged_1DPart_getPartWeights (size_t total_part_count, partId_t noCuts, scalar_t maxScalar, 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.
template<typename scalar_t >
void Zoltan2::accumulateThreadResults (partId_t noCuts, size_t total_part_count, partId_t concurrentPartCount, int numThreads, bool *isDone, scalar_t **leftClosestDistance, scalar_t **rightClosestDistance, double **partWeights, scalar_t *localMinMaxTotal, 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.
template<typename scalar_t , typename lno_t >
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, partId_t partNo, int numThreads, scalar_t maxScalar, scalar_t minScalar, 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)
 Function that is responsible from 1D partitioning of the given range of coordinates.
template<typename lno_t , typename scalar_t >
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)
 Function that determines the permutation indices of the coordinates.
template<typename T >
T * Zoltan2::allocMemory (size_t size)
template<typename T >
void Zoltan2::freeArray (T *&array)
template<typename tt >
std::string Zoltan2::toString (tt obj)
template<typename Adapter >
void Zoltan2::AlgPQJagged (const RCP< const Environment > &env, RCP< Comm< int > > &comm, const RCP< const CoordinateModel< typename Adapter::base_adapter_t > > &coords, RCP< PartitioningSolution< Adapter > > &solution)
 PQJagged coordinate partitioning algorithm.

Detailed Description

Contains the PQ-jagged algorthm.

Definition in file Zoltan2_AlgPQJagged.hpp.


Define Documentation

#define EPS_SCALE   1

Definition at line 61 of file Zoltan2_AlgPQJagged.hpp.

#define LEAST_SIGNIFICANCE   0.0001

Definition at line 62 of file Zoltan2_AlgPQJagged.hpp.

#define SIGNIFICANCE_MUL   1000

Definition at line 63 of file Zoltan2_AlgPQJagged.hpp.

#define ABS (   x)    ((x) >= 0 ? (x) : -(x))

Definition at line 72 of file Zoltan2_AlgPQJagged.hpp.

#define LEAF_IMBALANCE_FACTOR   0.1

Definition at line 74 of file Zoltan2_AlgPQJagged.hpp.

#define BINARYCUTOFF   32

Definition at line 75 of file Zoltan2_AlgPQJagged.hpp.

#define imbalanceOf (   Wachieved,
  totalW,
  expectedRatio 
)    (Wachieved) / ((totalW) * (expectedRatio)) - 1

Definition at line 77 of file Zoltan2_AlgPQJagged.hpp.