Zoltan2
Public Member Functions | List of all members
Zoltan2::AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t > Class Template Reference

Multi Jagged coordinate partitioning algorithm. More...

#include <Zoltan2_AlgMultiJagged.hpp>

Public Member Functions

 AlgMJ ()
 Multi Jagged coordinate partitioning algorithm default constructor. More...
 
void multi_jagged_part (const RCP< const Environment > &env, RCP< Comm< int > > &problemComm, double imbalance_tolerance, size_t num_global_parts, mj_part_t *part_no_array, int recursion_depth, int coord_dim, mj_lno_t num_local_coords, mj_gno_t num_global_coords, const mj_gno_t *initial_mj_gnos, mj_scalar_t **mj_coordinates, int num_weights_per_coord, bool *mj_uniform_weights, mj_scalar_t **mj_weights, bool *mj_uniform_parts, mj_scalar_t **mj_part_sizes, mj_part_t *&result_assigned_part_ids, mj_gno_t *&result_mj_gnos)
 Multi Jagged coordinate partitioning algorithm. More...
 
void set_partitioning_parameters (bool distribute_points_on_cut_lines_, int max_concurrent_part_calculation_, int check_migrate_avoid_migration_option_, mj_scalar_t minimum_migration_imbalance_)
 Multi Jagged coordinate partitioning algorithm. More...
 
void set_to_keep_part_boxes ()
 Function call, if the part boxes are intended to be kept. More...
 
RCP< mj_partBox_tget_global_box () const
 Return the global bounding box: min/max coords of global domain. More...
 
RCP< mj_partBoxVector_t > get_kept_boxes () const
 
RCP< mj_partBoxVector_t > compute_global_box_boundaries (RCP< mj_partBoxVector_t > &localPartBoxes) const
 
void sequential_task_partitioning (const RCP< const Environment > &env, mj_lno_t num_total_coords, mj_lno_t num_selected_coords, size_t num_target_part, int coord_dim, mj_scalar_t **mj_coordinates, mj_lno_t *initial_selected_coords_output_permutation, mj_lno_t *output_xadj, int recursion_depth, const mj_part_t *part_no_array)
 Special function for partitioning for task mapping. Runs sequential, and performs deterministic partitioning for the partitioning the points along a cutline. More...
 

Detailed Description

template<typename mj_scalar_t, typename mj_lno_t, typename mj_gno_t, typename mj_part_t>
class Zoltan2::AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >

Multi Jagged coordinate partitioning algorithm.

Definition at line 539 of file Zoltan2_AlgMultiJagged.hpp.

Constructor & Destructor Documentation

template<typename mj_scalar_t , typename mj_lno_t , typename mj_gno_t , typename mj_part_t >
Zoltan2::AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >::AlgMJ ( )

Multi Jagged coordinate partitioning algorithm default constructor.

Definition at line 1791 of file Zoltan2_AlgMultiJagged.hpp.

Member Function Documentation

template<typename mj_scalar_t , typename mj_lno_t , typename mj_gno_t , typename mj_part_t >
void Zoltan2::AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >::multi_jagged_part ( const RCP< const Environment > &  env,
RCP< Comm< int > > &  problemComm,
double  imbalance_tolerance_,
size_t  num_global_parts_,
mj_part_t *  part_no_array_,
int  recursion_depth_,
int  coord_dim_,
mj_lno_t  num_local_coords_,
mj_gno_t  num_global_coords_,
const mj_gno_t *  initial_mj_gnos_,
mj_scalar_t **  mj_coordinates_,
int  num_weights_per_coord_,
bool *  mj_uniform_weights_,
mj_scalar_t **  mj_weights_,
bool *  mj_uniform_parts_,
mj_scalar_t **  mj_part_sizes_,
mj_part_t *&  result_assigned_part_ids_,
mj_gno_t *&  result_mj_gnos_ 
)

Multi Jagged coordinate partitioning algorithm.

Parameters
envlibrary configuration and problem parameters
problemCommthe communicator for the problem
imbalance_tolerance: the input provided imbalance tolerance.
num_global_partsnumber of target global parts.
part_no_arraypart no array, if provided this will be used for partitioning.
recursion_depthif part no array is provided, it is the length of part no array, if part no is not provided than it is the number of steps that algorithm will divide into num_global_parts parts.
coord_dimcoordinate dimension
num_local_coordsnumber of local coordinates
num_global_coordsnumber of global coordinates
initial_mj_gnosthe list of initial global id's
mj_coordinatesthe two dimensional coordinate array.
num_weights_per_coordnumber of weights per coordinate
mj_uniform_weightsif weight index [i] has uniform weight or not.
mj_weightsthe two dimensional array for weights
mj_uniform_partsif the target partitioning aims uniform parts
mj_part_sizesif the target partitioning does not aim uniform parts, then weight of each part.
result_assigned_part_idsOutput - 1D pointer, should be provided as null. the result partids corresponding to the coordinates given in result_mj_gnos.
result_mj_gnosOutput - 1D pointer, should be provided as null. the result coordinate global id's corresponding to the part_ids array.
envlibrary configuration and problem parameters
problemCommthe communicator for the problem
imbalance_tolerance: the input provided imbalance tolerance.
num_global_partsnumber of target global parts.
part_no_arraypart no array, if provided this will be used for partitioning.
recursion_depthif part no array is provided, it is the length of part no array, if part no is not provided than it is the number of steps that algorithm will divide into num_global_parts parts.
coord_dimcoordinate dimension
num_local_coordsnumber of local coordinates
num_global_coordsnumber of global coordinates
initial_mj_gnosthe list of initial global id's
mj_coordinatesthe two dimensional coordinate array.
num_weights_per_coordnumber of weights per coordinate
mj_uniform_weightsif weight index [i] has uniform weight or not.
mj_weightsthe two dimensional array for weights
mj_uniform_partsif the target partitioning aims uniform parts
mj_part_sizesif the target partitioning does not aim uniform parts, then weight of each part.
result_assigned_part_idsOutput - 1D pointer, should be provided as null. Memory is given in the function. the result partids corresponding to the coordinates given in result_mj_gnos.
result_mj_gnosOutput - 1D pointer, should be provided as null. Memory is given in the function. the result coordinate global id's corresponding to the part_ids array.

Definition at line 5684 of file Zoltan2_AlgMultiJagged.hpp.

template<typename mj_scalar_t , typename mj_lno_t , typename mj_gno_t , typename mj_part_t >
void Zoltan2::AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >::set_partitioning_parameters ( bool  distribute_points_on_cut_lines_,
int  max_concurrent_part_calculation_,
int  check_migrate_avoid_migration_option_,
mj_scalar_t  minimum_migration_imbalance_ 
)

Multi Jagged coordinate partitioning algorithm.

Parameters
distribute_points_on_cut_lines_: if partitioning can distribute points on same coordinate to different parts.
max_concurrent_part_calculation_: how many parts we can calculate concurrently.
check_migrate_avoid_migration_option_: whether to migrate=1, avoid migrate=2, or leave decision to MJ=0
minimum_migration_imbalance_: when MJ decides whether to migrate, the minimum imbalance for migration.

Definition at line 5641 of file Zoltan2_AlgMultiJagged.hpp.

template<typename mj_scalar_t , typename mj_lno_t , typename mj_gno_t , typename mj_part_t >
void Zoltan2::AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >::set_to_keep_part_boxes ( )

Function call, if the part boxes are intended to be kept.

Definition at line 1847 of file Zoltan2_AlgMultiJagged.hpp.

template<typename mj_scalar_t , typename mj_lno_t , typename mj_gno_t , typename mj_part_t >
RCP< typename AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >::mj_partBox_t > Zoltan2::AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >::get_global_box ( ) const

Return the global bounding box: min/max coords of global domain.

Function returns the part boxes stored returns null if boxes are not stored, and prints warning mesage.

Definition at line 1837 of file Zoltan2_AlgMultiJagged.hpp.

template<typename mj_scalar_t , typename mj_lno_t , typename mj_gno_t , typename mj_part_t >
RCP< typename AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >::mj_partBoxVector_t > Zoltan2::AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >::get_kept_boxes ( ) const

Definition at line 6840 of file Zoltan2_AlgMultiJagged.hpp.

template<typename mj_scalar_t , typename mj_lno_t , typename mj_gno_t , typename mj_part_t >
RCP< typename AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >::mj_partBoxVector_t > Zoltan2::AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >::compute_global_box_boundaries ( RCP< mj_partBoxVector_t > &  localPartBoxes) const

Definition at line 6851 of file Zoltan2_AlgMultiJagged.hpp.

template<typename mj_scalar_t , typename mj_lno_t , typename mj_gno_t , typename mj_part_t >
void Zoltan2::AlgMJ< mj_scalar_t, mj_lno_t, mj_gno_t, mj_part_t >::sequential_task_partitioning ( const RCP< const Environment > &  env,
mj_lno_t  num_total_coords,
mj_lno_t  num_selected_coords,
size_t  num_target_part,
int  coord_dim_,
mj_scalar_t **  mj_coordinates_,
mj_lno_t *  inital_adjList_output_adjlist,
mj_lno_t *  output_xadj,
int  rd,
const mj_part_t *  part_no_array_ 
)

Special function for partitioning for task mapping. Runs sequential, and performs deterministic partitioning for the partitioning the points along a cutline.

Parameters
envlibrary configuration and problem parameters
num_total_coordsnumber of total coordinates
num_selected_coords: the number of selected coordinates. This is to set, if there are n processors, but only m<n processors are selected for mapping.
num_target_partnumber of target global parts.
coord_dim_coordinate dimension for coordinates
mj_coordinates_the coordinates
inital_adjList_output_adjlistArray allocated by caller, in the size of num_total_coords, first num_selected_coords elements should list the indices of the selected processors. This is output for output permutation array.
output_xadjThe output part xadj array, pointing beginning and end of each part on output permutation array (inital_adjList_output_adjlist). Returned in CSR format: part i's info in output_xadj[i] : output_xadj[i+1]
rdrecursion depth
part_no_array_possibly null part_no_array, specifying how many parts each should be divided during partitioning.

Definition at line 1371 of file Zoltan2_AlgMultiJagged.hpp.


The documentation for this class was generated from the following file: