-
Notifications
You must be signed in to change notification settings - Fork 28
/
MultistepLB_notopo.h
69 lines (53 loc) · 1.72 KB
/
MultistepLB_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
65
66
67
68
69
/*****************************************************************************
* $Source$
* $Author$
* $Date$
* $Revision$
*****************************************************************************/
/**
* \addtogroup CkLdb
*/
/*@{*/
#ifndef _MULTISTEPLB_NOTOPO_H_
#define _MULTISTEPLB_NOTOPO_H_
#define MCLBMS // multistepping enabled
#define MCLB_ORBSMOOTH // orbsmooth for large steps
#define MCLB_RR // round robin otherwise
#include "Orb3dLBCommon.h"
#include "MultistepLB_notopo.decl.h"
/// @brief Multistep load balancer where no processor topology
/// information is used.
///
/// This balancer recognizes different "phases" (called rungs in other
/// parts of the code), and uses loads based on measurements of the
/// previous calculation at the same phase. For large phases, (i.e.,
/// when many particles are active, the TreePieces are divided among
/// by 3 dimensional ORB based on the centroids of the TreePieces.
/// For small phases, a greedy algorithm is used.
///
class MultistepLB_notopo : public CBase_MultistepLB_notopo, public Orb3dCommon {
private:
void init();
bool QueryBalanceNow(int step);
#ifdef MCLBMSV
void makeActiveProcessorList(BaseLB::LDStats *stats, int numActiveObjs);
#endif
public:
MultistepLB_notopo(const CkLBOptions &);
MultistepLB_notopo(CkMigrateMessage *m) : CBase_MultistepLB_notopo(m) {
init();
}
void work(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 /* _MultistepLB_notopo */
/*@}*/