-
Notifications
You must be signed in to change notification settings - Fork 29
/
MultistepNodeLB_notopo.h
64 lines (47 loc) · 1.57 KB
/
MultistepNodeLB_notopo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*****************************************************************************
* $Source$
* $Author$
* $Date$
* $Revision$
*****************************************************************************/
/**
* \addtogroup CkLdb
*/
/*@{*/
#ifndef _MULTISTEPNODELB_NOTOPO_H_
#define _MULTISTEPNODELB_NOTOPO_H_
#define MCLBMS // multistepping enabled
#define MCLB_ORBSMOOTH // orbsmooth for large steps
#define MCLB_RR // round robin otherwise
#include "Orb3dLBCommon.h"
#include "MultistepNodeLB_notopo.decl.h"
/// @brief Multistep load balancer where no processor topology
/// information is used. This first performs orb partition at the node level and
/// assigns the partitioned TreePieces to the PEs belonging to the node. Finally
/// after this assignment, a refinement is done.
class MultistepNodeLB_notopo : public CBase_MultistepNodeLB_notopo, public Orb3dCommon {
private:
int prevMaxPredPe;
void init();
bool QueryBalanceNow(int step);
public:
MultistepNodeLB_notopo(const CkLBOptions &);
MultistepNodeLB_notopo(CkMigrateMessage *m) : CBase_MultistepNodeLB_notopo(m) {
init();
}
void work(BaseLB::LDStats* stats);
void balanceTPs(BaseLB::LDStats* stats);
void balanceTPsNode(BaseLB::LDStats* stats);
private:
enum {XDIR=0, YDIR, ZDIR};
public:
//**************************************
// ORB3DLB functions
//**************************************
//
void work2(BaseLB::LDStats* stats, int count);
void greedy(BaseLB::LDStats* stats, int count);
void pup(PUP::er &p);
};
#endif /* _MultistepNodeLB_notopo */
/*@}*/