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.

00066      {
00067   NONBONDED_OR_SELF_TYPE = -1,  
00068   PATCH_TYPE = -2,              
00069   BONDED_TYPE = -3              
00070 };

anonymous enum
Enumerator:
LDB_PATCHES 

Definition at line 80 of file LdbCoordinator.h.

00080 {LDB_PATCHES = 4096};

anonymous enum
Enumerator:
LDB_COMPUTES 

Definition at line 81 of file LdbCoordinator.h.

00081 {LDB_COMPUTES = 16384};

anonymous enum
Enumerator:
COMPUTEMAX 

Definition at line 82 of file LdbCoordinator.h.

00082 {COMPUTEMAX = 16384};

anonymous enum
Enumerator:
PATCHMAX 

Definition at line 83 of file LdbCoordinator.h.

00083 {PATCHMAX = 4096};

anonymous enum
Enumerator:
PROCESSORMAX 

Definition at line 84 of file LdbCoordinator.h.

00084 {PROCESSORMAX = 512};


Function Documentation

void LdbCoordinator_initproc (  ) 

Definition at line 51 of file LdbCoordinator.C.

00051                                {
00052   // Set the load balancing period (in seconds).  Without this the
00053   // load balancing framework will hang until 1 second has passed
00054   // since the last load balancing, causing hiccups in very fast runs.
00055   // This is duplicated below for older versions, but putting it here
00056   // also fixes the first load balance.
00057 #ifndef LB_MANAGER_VERSION
00058   LBSetPeriod(1.0e-5);
00059 #endif
00060 }

int& LdbIdField ( LdbId id,
const int  index 
) [inline]

Definition at line 54 of file LdbCoordinator.h.

00054                                                    {
00055 #if CMK_LBID_64BIT
00056   return *(((int*)&id) + index);
00057 #else
00058   return id.id[index];
00059 #endif
00060 }

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().

00046                                                                {
00047 #if CMK_LBID_64BIT
00048   return *(((int*)&id) + index);
00049 #else
00050   return id.id[index];
00051 #endif
00052 }


Generated on 28 Jan 2020 for NAMD by  doxygen 1.6.1