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 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 36 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 59 of file LdbCoordinator.h.

00059      {
00060   NONBONDED_OR_SELF_TYPE = -1,  
00061   PATCH_TYPE = -2,              
00062   BONDED_TYPE = -3              
00063 };

anonymous enum

Enumerator:
LDB_PATCHES 

Definition at line 73 of file LdbCoordinator.h.

00073 {LDB_PATCHES = 4096};

anonymous enum

Enumerator:
LDB_COMPUTES 

Definition at line 74 of file LdbCoordinator.h.

00074 {LDB_COMPUTES = 16384};

anonymous enum

Enumerator:
COMPUTEMAX 

Definition at line 75 of file LdbCoordinator.h.

00075 {COMPUTEMAX = 16384};

anonymous enum

Enumerator:
PATCHMAX 

Definition at line 76 of file LdbCoordinator.h.

00076 {PATCHMAX = 4096};

anonymous enum

Enumerator:
PROCESSORMAX 

Definition at line 77 of file LdbCoordinator.h.

00077 {PROCESSORMAX = 512};


Function Documentation

void LdbCoordinator_initproc (  ) 

Definition at line 52 of file LdbCoordinator.C.

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

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

Definition at line 47 of file LdbCoordinator.h.

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

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

Definition at line 39 of file LdbCoordinator.h.

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

00039                                                                {
00040 #if CMK_LBID_64BIT
00041   return *(((int*)&id) + index);
00042 #else
00043   return id.id[index];
00044 #endif
00045 }


Generated on Fri Jun 22 01:17:17 2018 for NAMD by  doxygen 1.4.7