CPM: A software tool for Communication Performance Modelling
CPM::SGv::Traff_builder Class Reference
Collaboration diagram for CPM::SGv::Traff_builder:
![Collaboration graph](classCPM_1_1SGv_1_1Traff__builder__coll__graph.png)
Public Member Functions | |
void | build (int size, int root, int rank, int *counts, Graph &g, Vertex &r, Vertex &u, Vertex &v) |
Detailed Description
Model-based builder of Traff communication tree for scatterv/gatherv
Member Function Documentation
void CPM::SGv::Traff_builder::build | ( | int | size, | |
int | root, | |||
int | rank, | |||
int * | counts, | |||
Graph & | g, | |||
Vertex & | r, | |||
Vertex & | u, | |||
Vertex & | v | |||
) | [inline] |
The routine build is based on two phases which take place in a loop:
1. PHASE: in the first phase, the given set S_i is partitioned into subsets in following way:
- if S_i is not empty:
- sort the ranks from S_i in decreasing order according to the value of predict_p2p(i,parent(S_i),m_size(i))
- (*) partition S_i into subsets so that for every subset W(S_j1) >= Sum(j2=0..j1-1) W(S_j2) and j1 is minimal. ->W(S):=sum(i in S) predict_p2p(i,parent(S),m_size(i)); 2. PHASE: in the second phase, determine the root of each new subset from 1(*) in the following way:
- in a routine getRoot, find the element of the subset to become root. For the optimal case, that routine would be:
- find i from S_i so that predict_p2p(i,parent(S_i),Sum(j in S_i) m_size(j))= MINIMAL
- make i the root of S_i and continue from 1. with the children of S_i (remark: this root may be different than the first element (and so different than Traff's root)
The documentation for this class was generated from the following file: