|
Zoltan2
|
#include <Zoltan2_TaskMapping.hpp>


Public Member Functions | |
| void | getProcTask (part_t *&proc_to_task_xadj_, part_t *&proc_to_task_adj_) |
| virtual | ~CoordinateTaskMapper () |
| CoordinateTaskMapper (const Teuchos::Comm< int > *comm_, const MachineRepresentation< pcoord_t > *machine_, const Zoltan2::Model< typename Adapter::base_adapter_t > *model_, const Zoltan2::PartitioningSolution< Adapter > *soln_, const Environment *envConst) | |
| Constructor. When this constructor is called, in order to calculate the communication metric, the task adjacency graph is created based on the coordinate model input and partitioning of it. if the communication graph is already calculated, use the other constructors. | |
| CoordinateTaskMapper (const Environment *env_const_, const Teuchos::Comm< int > *problemComm, int proc_dim, int num_processors, pcoord_t **machine_coords, int task_dim, part_t num_tasks, tcoord_t **task_coords, ArrayRCP< part_t >task_comm_xadj, ArrayRCP< part_t >task_comm_adj, pcoord_t *task_communication_edge_weight_, int recursion_depth, part_t *part_no_array, part_t *machine_dimensions) | |
| Constructor The mapping constructor which will also perform the mapping operation. The result mapping can be obtained by. | |
| double | getCommunicationCostMetric () |
| virtual size_t | getLocalNumberOfParts () const |
| Returns the number of parts to be assigned to this process. | |
| pcoord_t ** | shiftMachineCoordinates (int machine_dim, part_t *machine_dimensions, part_t numProcs, pcoord_t **mCoords) |
| Using the machine dimensions provided, create virtual machine coordinates by assigning the largest gap to be as the wrap around link. | |
| virtual void | getProcsForPart (part_t taskId, part_t &numProcs, part_t *procs) const |
| getAssignedProcForTask function, returns the assigned tasks with the number of tasks. | |
| part_t | getAssignedProcForTask (part_t taskId) |
| getAssignedProcForTask function, returns the assigned processor id for the given task | |
| virtual void | getPartsForProc (int procId, part_t &numParts, part_t *parts) const |
| getAssignedProcForTask function, returns the assigned tasks with the number of tasks. | |
| ArrayView< part_t > | getAssignedTaksForProc (part_t procId) |
Public Attributes | |
| const Teuchos::Comm< int > * | comm |
| const Zoltan2::MachineRepresentation < scalar_t > * | machine |
| const Zoltan2::Model< typename Adapter::base_adapter_t > * | model |
| const Zoltan2::PartitioningSolution < Adapter > * | soln |
| const Environment * | env |
Protected Member Functions | |
| void | doMapping (int myRank) |
| doMapping function, calls getMapping function of communicationModel object. | |
| RCP< Comm< int > > | create_subCommunicator () |
| creates and returns the subcommunicator for the processor group. | |
| void | getBestMapping () |
| finds the lowest cost mapping and broadcasts solution to everyone. | |
| void | writeMapping () |
| void | writeMapping2 (int myRank) |
| void | writeGnuPlot (const Teuchos::Comm< int > *comm_, const Zoltan2::PartitioningSolution< Adapter > *soln_, int coordDim, tcoord_t **partCenters) |
Protected Attributes | |
| ArrayRCP< part_t > | proc_to_task_xadj |
| ArrayRCP< part_t > | proc_to_task_adj |
| ArrayRCP< part_t > | task_to_proc |
| bool | isOwnerofModel |
| CoordinateCommunicationModel < pcoord_t, tcoord_t, part_t > * | proc_task_comm |
| part_t | nprocs |
| part_t | ntasks |
| ArrayRCP< part_t > | task_communication_xadj |
| ArrayRCP< part_t > | task_communication_adj |
Definition at line 1026 of file Zoltan2_TaskMapping.hpp.
| virtual Zoltan2::CoordinateTaskMapper< Adapter, part_t >::~CoordinateTaskMapper | ( | ) | [inline, virtual] |
Definition at line 1372 of file Zoltan2_TaskMapping.hpp.
| Zoltan2::CoordinateTaskMapper< Adapter, part_t >::CoordinateTaskMapper | ( | const Teuchos::Comm< int > * | comm_, |
| const MachineRepresentation< pcoord_t > * | machine_, | ||
| const Zoltan2::Model< typename Adapter::base_adapter_t > * | model_, | ||
| const Zoltan2::PartitioningSolution< Adapter > * | soln_, | ||
| const Environment * | envConst | ||
| ) | [inline] |
Constructor. When this constructor is called, in order to calculate the communication metric, the task adjacency graph is created based on the coordinate model input and partitioning of it. if the communication graph is already calculated, use the other constructors.
| comm_ | is the communication object. |
| machine_ | is the machineRepresentation object. Stores the coordinates of machines. |
| model_ | is the input adapter. |
| soln_ | is the solution object. Holds the assignment of points. |
| envConst_ | is the environment object. |
Definition at line 1392 of file Zoltan2_TaskMapping.hpp.
| Zoltan2::CoordinateTaskMapper< Adapter, part_t >::CoordinateTaskMapper | ( | const Environment * | env_const_, |
| const Teuchos::Comm< int > * | problemComm, | ||
| int | proc_dim, | ||
| int | num_processors, | ||
| pcoord_t ** | machine_coords, | ||
| int | task_dim, | ||
| part_t | num_tasks, | ||
| tcoord_t ** | task_coords, | ||
| ArrayRCP< part_t > | task_comm_xadj, | ||
| ArrayRCP< part_t > | task_comm_adj, | ||
| pcoord_t * | task_communication_edge_weight_, | ||
| int | recursion_depth, | ||
| part_t * | part_no_array, | ||
| part_t * | machine_dimensions | ||
| ) | [inline] |
Constructor The mapping constructor which will also perform the mapping operation. The result mapping can be obtained by.
--getAssignedProcForTask function: which returns the assigned processor id for the given task --getPartsForProc: which returns the assigned tasks with the number of tasks.
-task_comm_xadj, task_comm_adj, task_communication_edge_weight_ can be provided NULL. In this case all processors will calculate the same mapping. -If task_comm_xadj, task_comm_adj and provided, algorithm will perform rotations, and processors will calculate different mappings, and best one will be reduced. -If task_communication_edge_weight_ is provided with task_comm_xadj, task_comm_adj this will be used when cost is calculated. -recursion_depth is a mandatory argument. In the case part_no_array is not null, this parameter should represent the length of part_no_array. If part_no_array is given as NULL, then this will give the recursion depth for the algorith, Maximum number is ceil(log_2(min(num_processors, num_tasks))), and providing a higher number will be equivalant to this. Partitioning algorithm will work as RCB when maximum number is given, which performs the best mapping results. -part_no_array: The best results are obtained when this parameter is given as NULL. But if this is provided, partitioning will use this array for partitioning each dimension to the given numbers. The multiplication of these numbers should be equal to min(num_processors, num_tasks). -machine_dimensions: This can be NULL, but if provided the algorithm will perform shift of the machine coords so that the largest gap is treated as wrap-around link.
| env_const_ | the environment object. |
| problemComm | is the communication object. |
| proc_dim | dimensions of the processor coordinates. |
| num_processors | is the number of processors |
| machine_coords | is the coordinates of the processors. |
| task_dim | is the dimension of the tasks. |
| num_tasks | is the number of tasks. |
| task_coords | is the coordinates of the tasks. |
| task_comm_xadj | is the task communication graphs xadj array. (task-i adjacency is between task_comm_xadj[i-1] and task_comm_xadj[i]) |
| task_comm_adj | is task communication graphs adj array. |
| task_communication_edge_weight_ | is the weight of the communication in task graph. |
| recursion_depth | is the recursion depth that will be applied to partitioning. If part_no_array is provided, then it is the length of this array. |
| part_no_array | if part_no_array is provided, partitioning algorithm will be forced to use this array for partitioning. However, the multiplication of each entries in this array should be equal to min(num_processors, num_tasks). |
| *machine_dimensions,: | the dimensions of the machine network. For example for hopper 17x8x24 This can be NULL, but if provided the algorithm will perform shift of the machine coords so that the largest gap is treated as wrap-around link. |
Definition at line 1559 of file Zoltan2_TaskMapping.hpp.
| void Zoltan2::CoordinateTaskMapper< Adapter, part_t >::doMapping | ( | int | myRank | ) | [inline, protected] |
doMapping function, calls getMapping function of communicationModel object.
Definition at line 1050 of file Zoltan2_TaskMapping.hpp.
| RCP<Comm<int> > Zoltan2::CoordinateTaskMapper< Adapter, part_t >::create_subCommunicator | ( | ) | [inline, protected] |
creates and returns the subcommunicator for the processor group.
Definition at line 1070 of file Zoltan2_TaskMapping.hpp.
| void Zoltan2::CoordinateTaskMapper< Adapter, part_t >::getBestMapping | ( | ) | [inline, protected] |
finds the lowest cost mapping and broadcasts solution to everyone.
Definition at line 1114 of file Zoltan2_TaskMapping.hpp.
| void Zoltan2::CoordinateTaskMapper< Adapter, part_t >::writeMapping | ( | ) | [inline, protected] |
Definition at line 1142 of file Zoltan2_TaskMapping.hpp.
| void Zoltan2::CoordinateTaskMapper< Adapter, part_t >::writeMapping2 | ( | int | myRank | ) | [inline, protected] |
Definition at line 1206 of file Zoltan2_TaskMapping.hpp.
| void Zoltan2::CoordinateTaskMapper< Adapter, part_t >::writeGnuPlot | ( | const Teuchos::Comm< int > * | comm_, |
| const Zoltan2::PartitioningSolution< Adapter > * | soln_, | ||
| int | coordDim, | ||
| tcoord_t ** | partCenters | ||
| ) | [inline, protected] |
Definition at line 1307 of file Zoltan2_TaskMapping.hpp.
| void Zoltan2::CoordinateTaskMapper< Adapter, part_t >::getProcTask | ( | part_t *& | proc_to_task_xadj_, |
| part_t *& | proc_to_task_adj_ | ||
| ) | [inline] |
Definition at line 1366 of file Zoltan2_TaskMapping.hpp.
| double Zoltan2::CoordinateTaskMapper< Adapter, part_t >::getCommunicationCostMetric | ( | ) | [inline] |
Definition at line 1661 of file Zoltan2_TaskMapping.hpp.
| virtual size_t Zoltan2::CoordinateTaskMapper< Adapter, part_t >::getLocalNumberOfParts | ( | ) | const [inline, virtual] |
Returns the number of parts to be assigned to this process.
Implements Zoltan2::PartitionMapping< Adapter >.
Definition at line 1667 of file Zoltan2_TaskMapping.hpp.
| pcoord_t** Zoltan2::CoordinateTaskMapper< Adapter, part_t >::shiftMachineCoordinates | ( | int | machine_dim, |
| part_t * | machine_dimensions, | ||
| part_t | numProcs, | ||
| pcoord_t ** | mCoords | ||
| ) | [inline] |
Using the machine dimensions provided, create virtual machine coordinates by assigning the largest gap to be as the wrap around link.
| machine_dim,: | the number of dimensions in the machine network. |
| machine_dimensions,: | the dimension of the machien network. For example for hopper, 17,8,24 |
| numProcs,: | the number of allocated processors. |
| mCoords,: | allocated machine coordinates. |
Definition at line 1679 of file Zoltan2_TaskMapping.hpp.
| virtual void Zoltan2::CoordinateTaskMapper< Adapter, part_t >::getProcsForPart | ( | part_t | taskId, |
| part_t & | numProcs, | ||
| part_t * | procs | ||
| ) | const [inline, virtual] |
getAssignedProcForTask function, returns the assigned tasks with the number of tasks.
| procId | procId being queried. |
| numProcs | (output), the number of processor the part is assigned to. |
| procs | (output), the list of processors assigned to given part.. |
Implements Zoltan2::PartitionMapping< Adapter >.
Definition at line 1774 of file Zoltan2_TaskMapping.hpp.
| part_t Zoltan2::CoordinateTaskMapper< Adapter, part_t >::getAssignedProcForTask | ( | part_t | taskId | ) | [inline] |
getAssignedProcForTask function, returns the assigned processor id for the given task
| taskId | taskId being queried. |
Definition at line 1781 of file Zoltan2_TaskMapping.hpp.
| virtual void Zoltan2::CoordinateTaskMapper< Adapter, part_t >::getPartsForProc | ( | int | procId, |
| part_t & | numParts, | ||
| part_t * | parts | ||
| ) | const [inline, virtual] |
getAssignedProcForTask function, returns the assigned tasks with the number of tasks.
| procId | procId being queried. |
| numParts | (output), the number of parts the processor is assigned to. |
| parts | (output), the list of parts assigned to given processor.. |
Implements Zoltan2::PartitionMapping< Adapter >.
Definition at line 1790 of file Zoltan2_TaskMapping.hpp.
| ArrayView<part_t> Zoltan2::CoordinateTaskMapper< Adapter, part_t >::getAssignedTaksForProc | ( | part_t | procId | ) | [inline] |
Definition at line 1799 of file Zoltan2_TaskMapping.hpp.
ArrayRCP<part_t> Zoltan2::CoordinateTaskMapper< Adapter, part_t >::proc_to_task_xadj [protected] |
Definition at line 1037 of file Zoltan2_TaskMapping.hpp.
ArrayRCP<part_t> Zoltan2::CoordinateTaskMapper< Adapter, part_t >::proc_to_task_adj [protected] |
Definition at line 1038 of file Zoltan2_TaskMapping.hpp.
ArrayRCP<part_t> Zoltan2::CoordinateTaskMapper< Adapter, part_t >::task_to_proc [protected] |
Definition at line 1039 of file Zoltan2_TaskMapping.hpp.
bool Zoltan2::CoordinateTaskMapper< Adapter, part_t >::isOwnerofModel [protected] |
Definition at line 1040 of file Zoltan2_TaskMapping.hpp.
CoordinateCommunicationModel<pcoord_t,tcoord_t,part_t>* Zoltan2::CoordinateTaskMapper< Adapter, part_t >::proc_task_comm [protected] |
Definition at line 1041 of file Zoltan2_TaskMapping.hpp.
part_t Zoltan2::CoordinateTaskMapper< Adapter, part_t >::nprocs [protected] |
Definition at line 1042 of file Zoltan2_TaskMapping.hpp.
part_t Zoltan2::CoordinateTaskMapper< Adapter, part_t >::ntasks [protected] |
Definition at line 1043 of file Zoltan2_TaskMapping.hpp.
ArrayRCP<part_t> Zoltan2::CoordinateTaskMapper< Adapter, part_t >::task_communication_xadj [protected] |
Definition at line 1044 of file Zoltan2_TaskMapping.hpp.
ArrayRCP<part_t> Zoltan2::CoordinateTaskMapper< Adapter, part_t >::task_communication_adj [protected] |
Definition at line 1045 of file Zoltan2_TaskMapping.hpp.
const Teuchos::Comm<int>* Zoltan2::PartitionMapping< Adapter >::comm [inherited] |
Definition at line 77 of file Zoltan2_PartitionMapping.hpp.
const Zoltan2::MachineRepresentation<scalar_t>* Zoltan2::PartitionMapping< Adapter >::machine [inherited] |
Definition at line 78 of file Zoltan2_PartitionMapping.hpp.
const Zoltan2::Model<typename Adapter::base_adapter_t>* Zoltan2::PartitionMapping< Adapter >::model [inherited] |
Definition at line 79 of file Zoltan2_PartitionMapping.hpp.
const Zoltan2::PartitioningSolution<Adapter>* Zoltan2::PartitionMapping< Adapter >::soln [inherited] |
Definition at line 80 of file Zoltan2_PartitionMapping.hpp.
const Environment* Zoltan2::PartitionMapping< Adapter >::env [inherited] |
Definition at line 81 of file Zoltan2_PartitionMapping.hpp.
1.7.6.1