NAMD
Classes | Typedefs | Enumerations | Functions
LdbCoordinator.h File Reference
#include <stdio.h>
#include <charm++.h>
#include <LBDatabase.h>
#include "NamdTypes.h"
#include "BOCgroup.h"
#include "LdbCoordinator.decl.h"

Go to the source code of this file.

Classes

class  LdbCoordinator
 
class  CollectLoadsMsg
 
class  LdbMigrateMsg
 

Typedefs

typedef LBDatabase LdbInfra
 
typedef LDObjid LdbId
 

Enumerations

enum  { NONBONDED_OR_SELF_TYPE = -1, PATCH_TYPE = -2, BONDED_TYPE = -3 }
 
enum  { LDB_PATCHES = 4096 }
 
enum  { LDB_COMPUTES = 16384 }
 
enum  { COMPUTEMAX = 16384 }
 
enum  { PATCHMAX = 4096 }
 
enum  { PROCESSORMAX = 512 }
 

Functions

const int & LdbIdField (const LdbId &id, const int index)
 
int & LdbIdField (LdbId &id, const int index)
 
void LdbCoordinator_initproc ()
 

Typedef Documentation

typedef LDObjid LdbId

In the new 64-bit id case defining LdbId as CmiUInt8, the first 32 bits store the object's index and the second 32 bits store the type.

In the old int[4] id case defining LdbId as LDObjid, element 0 stores the object's index, element 1 stores the type, and elements 2 and 3 are unused.

Definition at line 43 of file LdbCoordinator.h.

typedef LBDatabase LdbInfra

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 26 of file LdbCoordinator.h.

Enumeration Type Documentation

anonymous enum

Define the types encoded into the load balancing id. Use negative numbers because the nonbonded/self types are represented with the leading patch ID for that compute, when available.

Enumerator
NONBONDED_OR_SELF_TYPE 

represents nonbonded or self compute

PATCH_TYPE 

represents a patch

BONDED_TYPE 

represents bonded compute

Definition at line 66 of file LdbCoordinator.h.

66  {
68  PATCH_TYPE = -2,
69  BONDED_TYPE = -3
70 };
represents bonded compute
represents nonbonded or self compute
represents a patch
anonymous enum
Enumerator
LDB_PATCHES 

Definition at line 80 of file LdbCoordinator.h.

80 {LDB_PATCHES = 4096};
anonymous enum
Enumerator
LDB_COMPUTES 

Definition at line 81 of file LdbCoordinator.h.

81 {LDB_COMPUTES = 16384};
anonymous enum
Enumerator
COMPUTEMAX 

Definition at line 82 of file LdbCoordinator.h.

82 {COMPUTEMAX = 16384};
anonymous enum
Enumerator
PATCHMAX 

Definition at line 83 of file LdbCoordinator.h.

83 {PATCHMAX = 4096};
anonymous enum
Enumerator
PROCESSORMAX 

Definition at line 84 of file LdbCoordinator.h.

Function Documentation

void LdbCoordinator_initproc ( )

Definition at line 51 of file LdbCoordinator.C.

51  {
52  // Set the load balancing period (in seconds). Without this the
53  // load balancing framework will hang until 1 second has passed
54  // since the last load balancing, causing hiccups in very fast runs.
55  // This is duplicated below for older versions, but putting it here
56  // also fixes the first load balance.
57 #ifndef LB_MANAGER_VERSION
58  LBSetPeriod(1.0e-5);
59 #endif
60 }
const int& LdbIdField ( const LdbId id,
const int  index 
)
inline

Definition at line 46 of file LdbCoordinator.h.

Referenced by Compute::Compute(), LdbCoordinator::initialize(), NamdCentLB::Strategy(), and NamdHybridLB::UpdateLocalLBInfo().

46  {
47 #if CMK_LBID_64BIT
48  return *(((int*)&id) + index);
49 #else
50  return id.id[index];
51 #endif
52 }
int& LdbIdField ( LdbId id,
const int  index 
)
inline

Definition at line 54 of file LdbCoordinator.h.

54  {
55 #if CMK_LBID_64BIT
56  return *(((int*)&id) + index);
57 #else
58  return id.id[index];
59 #endif
60 }