NAMD
RefineOnly.C
Go to the documentation of this file.
1 
7 #include "InfoStream.h"
8 #include "RefineOnly.h"
9 
10 RefineOnly::RefineOnly(computeInfo *computeArray, patchInfo *patchArray,
11  processorInfo *processorArray, int nComps,
12  int nPatches, int nPes) :
13 Rebalancer(computeArray, patchArray,
14  processorArray, nComps,
15  nPatches, nPes)
16 {
17  strategyName = "Refine";
18  strategy();
19 #if 0
21  decrSTLoad();
24  incrSTLoad();
25  for(int i=0; i<P; i++)
26  delete [] processors[i].proxyUsage;
28  multirefine();
29  printLoads();
30  //createSpanningTree();
31  }
32 #endif
33 
34 }
35 
36 void RefineOnly::strategy()
37 {
38  // iout << iINFO << "numComputes: " << numComputes << "\n" << endi;
39  for (int i=0; i<numComputes; i++)
40  assign((computeInfo *) &(computes[i]),
41  (processorInfo *) &(processors[computes[i].oldProcessor]));
42 
43  // merge refinement code and move to Rebalancer
44  multirefine();
45 
46  // while (!refine())
47  // overLoad += .01;
48 
50 #if 0
51  iout << iINFO
52  << "------------------------------------------------------------\n"
53  << iINFO
54  << "After load balancing (predicted stats):\n" << endi;
55 #endif
56  printLoads();
57 #if 0
58  << "------------------------------------------------------------\n"
59  << endi;
60 #endif
61  double max = computeMax();
62 
63 }
int numComputes
Definition: Rebalancer.h:138
std::ostream & iINFO(std::ostream &s)
Definition: InfoStream.C:107
int proxyRecvSpanning
Definition: ProxyMgr.C:46
computeInfo * computes
Definition: Rebalancer.h:128
void createSpanningTree()
Definition: Rebalancer.C:1154
void assign(computeInfo *c, processorInfo *pRec)
Definition: Rebalancer.C:402
#define iout
Definition: InfoStream.h:87
void incrSTLoad()
Definition: Rebalancer.C:1210
processorInfo * processors
Definition: Rebalancer.h:130
void printLoads(int phase=0)
Definition: Rebalancer.C:874
ProxyUsage proxyUsage
Definition: Rebalancer.h:126
void multirefine(double overload_start=1.02)
Definition: Rebalancer.C:784
double computeAverage()
Definition: Rebalancer.C:1001
void InitProxyUsage()
Definition: Rebalancer.C:195
RefineOnly(computeInfo *computeArray, patchInfo *patchArray, processorInfo *processorArray, int nComps, int nPatches, int nPes)
Definition: RefineOnly.C:10
double computeMax()
Definition: Rebalancer.C:1057
infostream & endi(infostream &s)
Definition: InfoStream.C:38
const char * strategyName
Definition: Rebalancer.h:127
void decrSTLoad()
Definition: Rebalancer.C:1195
int proxySendSpanning
Definition: ProxyMgr.C:45