Zoltan2  Version of the Day
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t > Class Template Reference

CoordinateModelInput Class that performs mapping between the coordinate partitioning result and mpi ranks base on the coordinate results and mpi physical coordinates. More...

#include <Zoltan2_TaskMapping.hpp>

Inheritance diagram for Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >:
Inheritance graph
[legend]
Collaboration diagram for Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >:
Collaboration graph
[legend]

Public Member Functions

 CoordinateCommunicationModel ()
 
virtual ~CoordinateCommunicationModel ()
 
 CoordinateCommunicationModel (int pcoord_dim_, pcoord_t **pcoords_, int tcoord_dim_, tcoord_t **tcoords_, procId_t no_procs_, procId_t no_tasks_)
 Class Constructor: More...
 
void getClosestSubset (procId_t *proc_permutation, procId_t nprocs, procId_t ntasks) const
 Function is called whenever nprocs > no_task. Function returns only the subset of processors that are closest to each other. More...
 
virtual double getProcDistance (int procId1, int procId2) const
 
void update_visit_order (procId_t *visitOrder, procId_t n, int &_u_umpa_seed, procId_t rndm)
 
virtual void getMapping (int myRank, RCP< const Environment > env, ArrayRCP< procId_t > &rcp_proc_to_task_xadj, ArrayRCP< procId_t > &rcp_proc_to_task_adj, ArrayRCP< procId_t > &rcp_task_to_proc) const
 Function is called whenever nprocs > no_task. Function returns only the subset of processors that are closest to each other. More...
 
procId_t getNProcs () const
 
procId_t getNTasks () const
 
void calculateCommunicationCost (procId_t *task_to_proc, procId_t *task_communication_xadj, procId_t *task_communication_adj)
 
double getCommunicationCostMetric ()
 

Static Public Member Functions

static procId_t umpa_uRandom (procId_t l, int &_u_umpa_seed)
 

Public Attributes

int proc_coord_dim
 
pcoord_t ** proc_coords
 
int task_coord_dim
 
tcoord_t ** task_coords
 
procId_t no_procs
 
procId_t no_tasks
 

Protected Attributes

double commCost
 

Detailed Description

template<typename pcoord_t, typename tcoord_t, typename procId_t>
class Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >

CoordinateModelInput Class that performs mapping between the coordinate partitioning result and mpi ranks base on the coordinate results and mpi physical coordinates.

Definition at line 661 of file Zoltan2_TaskMapping.hpp.

Constructor & Destructor Documentation

template<typename pcoord_t, typename tcoord_t, typename procId_t>
Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::CoordinateCommunicationModel ( )
inline

Definition at line 671 of file Zoltan2_TaskMapping.hpp.

template<typename pcoord_t, typename tcoord_t, typename procId_t>
virtual Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::~CoordinateCommunicationModel ( )
inlinevirtual

Definition at line 678 of file Zoltan2_TaskMapping.hpp.

template<typename pcoord_t, typename tcoord_t, typename procId_t>
Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::CoordinateCommunicationModel ( int  pcoord_dim_,
pcoord_t **  pcoords_,
int  tcoord_dim_,
tcoord_t **  tcoords_,
procId_t  no_procs_,
procId_t  no_tasks_ 
)
inline

Class Constructor:

Parameters
pcoord_dim_the dimension of the processors
pcoords_the processor coordinates. allocated outside of the class.
tcoord_dim_dimension of the tasks coordinates.
tcoords_the task coordinates allocated outside of the class.
no_procs_the number of processors
no_tasks_the number of taks.

Definition at line 688 of file Zoltan2_TaskMapping.hpp.

Member Function Documentation

template<typename pcoord_t, typename tcoord_t, typename procId_t>
void Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::getClosestSubset ( procId_t *  proc_permutation,
procId_t  nprocs,
procId_t  ntasks 
) const
inline

Function is called whenever nprocs > no_task. Function returns only the subset of processors that are closest to each other.

Parameters
proc_permutationholds the indices of the processors that are chosen.
nprocsthe number of processors.
ntasksthe number of taks.

Definition at line 709 of file Zoltan2_TaskMapping.hpp.

template<typename pcoord_t, typename tcoord_t, typename procId_t>
static procId_t Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::umpa_uRandom ( procId_t  l,
int &  _u_umpa_seed 
)
inlinestatic

Definition at line 736 of file Zoltan2_TaskMapping.hpp.

template<typename pcoord_t, typename tcoord_t, typename procId_t>
virtual double Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::getProcDistance ( int  procId1,
int  procId2 
) const
inlinevirtual

Implements Zoltan2::CommunicationModel< procId_t >.

Definition at line 756 of file Zoltan2_TaskMapping.hpp.

template<typename pcoord_t, typename tcoord_t, typename procId_t>
void Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::update_visit_order ( procId_t *  visitOrder,
procId_t  n,
int &  _u_umpa_seed,
procId_t  rndm 
)
inline

Definition at line 766 of file Zoltan2_TaskMapping.hpp.

template<typename pcoord_t, typename tcoord_t, typename procId_t>
virtual void Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::getMapping ( int  myRank,
RCP< const Environment >  env,
ArrayRCP< procId_t > &  rcp_proc_to_task_xadj,
ArrayRCP< procId_t > &  rcp_proc_to_task_adj,
ArrayRCP< procId_t > &  rcp_task_to_proc 
) const
inlinevirtual

Function is called whenever nprocs > no_task. Function returns only the subset of processors that are closest to each other.

Parameters
proc_to_task_xadjholds the pointer to the task array
proc_to_task_xadjholds the indices of tasks wrt to proc_to_task_xadj array.
task_to_procholds the processors mapped to tasks.

Implements Zoltan2::CommunicationModel< procId_t >.

Definition at line 810 of file Zoltan2_TaskMapping.hpp.

template<typename procId_t >
procId_t Zoltan2::CommunicationModel< procId_t >::getNProcs ( ) const
inlineinherited

Definition at line 600 of file Zoltan2_TaskMapping.hpp.

template<typename procId_t >
procId_t Zoltan2::CommunicationModel< procId_t >::getNTasks ( ) const
inlineinherited

Definition at line 603 of file Zoltan2_TaskMapping.hpp.

template<typename procId_t >
void Zoltan2::CommunicationModel< procId_t >::calculateCommunicationCost ( procId_t *  task_to_proc,
procId_t *  task_communication_xadj,
procId_t *  task_communication_adj 
)
inlineinherited

Definition at line 607 of file Zoltan2_TaskMapping.hpp.

template<typename procId_t >
double Zoltan2::CommunicationModel< procId_t >::getCommunicationCostMetric ( )
inlineinherited

Definition at line 637 of file Zoltan2_TaskMapping.hpp.

Member Data Documentation

template<typename pcoord_t, typename tcoord_t, typename procId_t>
int Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::proc_coord_dim

Definition at line 664 of file Zoltan2_TaskMapping.hpp.

template<typename pcoord_t, typename tcoord_t, typename procId_t>
pcoord_t** Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::proc_coords

Definition at line 665 of file Zoltan2_TaskMapping.hpp.

template<typename pcoord_t, typename tcoord_t, typename procId_t>
int Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::task_coord_dim

Definition at line 666 of file Zoltan2_TaskMapping.hpp.

template<typename pcoord_t, typename tcoord_t, typename procId_t>
tcoord_t** Zoltan2::CoordinateCommunicationModel< pcoord_t, tcoord_t, procId_t >::task_coords

Definition at line 667 of file Zoltan2_TaskMapping.hpp.

template<typename procId_t >
double Zoltan2::CommunicationModel< procId_t >::commCost
protectedinherited

Definition at line 589 of file Zoltan2_TaskMapping.hpp.

template<typename procId_t >
procId_t Zoltan2::CommunicationModel< procId_t >::no_procs
inherited

Definition at line 592 of file Zoltan2_TaskMapping.hpp.

template<typename procId_t >
procId_t Zoltan2::CommunicationModel< procId_t >::no_tasks
inherited

Definition at line 593 of file Zoltan2_TaskMapping.hpp.


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