| 1 |
#+TITLE: Repartitioning in MueLu |
| 2 |
#+AUTHOR: Andrey Prokopenko |
| 3 |
#+EMAIL: [email protected] |
| 4 |
#+DATE: 11 Feb 2014 |
| 5 |
#+LaTeX_HEADER: \usepackage[margin=0.75in]{geometry} |
| 6 |
#+LATEX_HEADER: \setlength{\parindent}{0} |
| 7 |
|
| 8 |
|
| 9 |
* Current implementation |
| 10 |
*Test 1* |
| 11 |
|
| 12 |
If a level is too fine, do not repartition. |
| 13 |
|
| 14 |
*Test 2* |
| 15 |
|
| 16 |
If there is a single active processor, do not repartition. |
| 17 |
|
| 18 |
*Test 3* |
| 19 |
|
| 20 |
If the number of matrix rows on at least one processor less than |
| 21 |
threshold, repartition. |
| 22 |
|
| 23 |
*Test 4* |
| 24 |
|
| 25 |
If the nnz imbalance is larger than a threshold, partition. |
| 26 |
|
| 27 |
* Comments |
| 28 |
Tests 1 and 2 are obviously fine. Test 3 is not. It could happen |
| 29 |
that 2 out of 1000 processors get slightly less rows than the |
| 30 |
threshold, and we have to repartition. I think that the test should |
| 31 |
be modified to the following: |
| 32 |
|
| 33 |
*Test 3 (alternative)* |
| 34 |
|
| 35 |
If the number of processors with numRows < threshold is larger than |
| 36 |
XX% of the total active processors, repartition. My first guess |
| 37 |
would be something like 20% or 30%. I think it is better to run with |
| 38 |
70% processors for one more level, than to spend time repartitioning |
| 39 |
of already sufficiently small matrix, which would be repartitioned |
| 40 |
on the next level anyway. |
| 41 |
|
| 42 |
*Test 4 (alternative)* |
| 43 |
|
| 44 |
Similar to test 3, I think it should be slightly modified. The |
| 45 |
simple case is when you have a number of processors with smaller |
| 46 |
number of rows/nnz. If this is less than some percentage, it should |
| 47 |
be fine. For instance, if 20% of all processors have significantly |
| 48 |
less rows than the maximum, we don't really want to repartition. A |
| 49 |
more complex case is what to do, if you have few processors with |
| 50 |
significantly larger than average number of nonzeros. I don't know |
| 51 |
how to deal with them. |
| 52 |
|
| 53 |
* TODO |
| 54 |
1. Need models |
| 55 |
|
| 56 |
Ideally, we should come up with a performance model to guide |
| 57 |
repartitioning. Of course, there is the fear that the performance |
| 58 |
model may fall far away from the real implementation of Tpetra :) |
| 59 |
|
| 60 |
2. Need refinement, not repartitioning |
| 61 |
|
| 62 |
At the moment, we use Zoltan to construct an entirely new partition, |
| 63 |
which means a huge amount of data migration. Could we do something |
| 64 |
like refinement, to limit the volume of communication? It would also |
| 65 |
be nice if we did first migration inside a single node, and only |
| 66 |
after that among nodes. Migration inside a node should be |
| 67 |
faster. And from the hybrid programming point of view is preferable. |
| 68 |
|
| 69 |
* Thoughts |
| 70 |
1. Try to incorporate number of hops in the bipartite graph matching |
| 71 |
2. Take a look at the coarsest level times after K-means clustering |
| 72 |
3. Make data movement more expensive |
| 73 |
4. Use fine-level remapping with bipartite repartitioning on levels |
| 74 |
5. Node-bipartite graph |