NAMD
Classes | Functions
NamdCentLB.h File Reference
#include <CentralLB.h>
#include "NamdCentLB.decl.h"
#include "Node.h"
#include "PatchMap.h"
#include "SimParameters.h"
#include "RefineOnly.h"
#include "Alg7.h"
#include "AlgRecBisection.h"
#include "InfoStream.h"
#include "TorusLB.h"
#include "RefineTorusLB.h"

Go to the source code of this file.

Classes

class  NamdCentLB
 

Functions

void CreateNamdCentLB ()
 
NamdCentLBAllocateNamdCentLB ()
 

Detailed Description

This class decides which load balancers to invoke. By default if nothing is specified in the config file, AlgSeven and RefineOnly are used. This is when each gets invoked:

If we choose firstLdbStep = 20 and ldbPeriod = 100, we have the following timeline (for these particular numbers):

Tracing : <-— off -—><---------— on --------—><– off ldbCycleNum : 1 2 3 4 5 6 7 8 9 Iteration Steps : 00===20===40===60===80======160===180======260===280 Ldb Step() No : 1 2 3 4 5 6 7 Ldb Strategy : Alg7 Ref Ref Inst Ref Inst Ref Alg7

Alg7 = AlgSeven Ref = Refine (NamdCentLB.C, Rebalancer.C) Inst = Instrumentation Phase (no real load balancing)

This class also fills in the NAMD load balancing data structures from the Charm LDBStats

Definition in file NamdCentLB.h.

Function Documentation

NamdCentLB* AllocateNamdCentLB ( )

Definition at line 38 of file NamdCentLB.C.

Referenced by NamdHybridLB::NamdHybridLB().

38  {
39  return new NamdCentLB((CkMigrateMessage*)NULL);
40 }
void CreateNamdCentLB ( )

Definition at line 26 of file NamdCentLB.C.

References cpuloads.

Referenced by LdbCoordinator::createLoadBalancer().

26  {
27  // CkPrintf("[%d] creating NamdCentLB %d\n",CkMyPe(),loadbalancer);
28  int seqno = LdbInfra::Object()->getLoadbalancerTicket();
29  loadbalancer = CProxy_NamdCentLB::ckNew(CkLBOptions(seqno));
30  // CkPrintf("[%d] created NamdCentLB %d\n",CkMyPe(),loadbalancer);
31  if (CkMyRank() == 0 && cpuloads == NULL) {
32  cpuloads = new double[CkNumPes()];
33  CmiAssert(cpuloads != NULL);
34  for (int i=0; i<CkNumPes(); i++) cpuloads[i] = 0.0;
35  }
36 }
double * cpuloads
Definition: NamdCentLB.C:24