NAMD
Classes | Macros | Functions | Variables
Node.C File Reference
#include <unistd.h>
#include "InfoStream.h"
#include "Node.decl.h"
#include "Node.h"
#include "ProcessorPrivate.h"
#include "Debug.h"
#include <stdio.h>
#include <converse.h>
#include "memusage.h"
#include "IMDOutput.h"
#include "Lattice.h"
#include "ComputeMsmMsa.h"
#include "ComputeMsm.h"
#include "main.decl.h"
#include "main.h"
#include "WorkDistrib.h"
#include "PatchMgr.h"
#include "Patch.h"
#include "Compute.h"
#include "ComputeMap.h"
#include "ComputeMgr.h"
#include "Molecule.h"
#include "HomePatchList.h"
#include "AtomMap.h"
#include "Sequencer.h"
#include "Controller.h"
#include "NamdState.h"
#include "Output.h"
#include "ProxyMgr.h"
#include "PatchMap.h"
#include "PatchMap.inl"
#include "Parameters.h"
#include "SimParameters.h"
#include "Communicate.h"
#include "LdbCoordinator.h"
#include "ScriptTcl.h"
#include "ComputeMgr.decl.h"
#include "ComputePmeMgr.decl.h"
#include "ComputeCUDAMgr.decl.h"
#include "ComputeCUDAMgr.h"
#include "ComputePmeCUDAMgr.decl.h"
#include "ComputePmeCUDAMgr.h"
#include "ComputeGridForceMgr.decl.h"
#include "Sync.h"
#include "BackEnd.h"
#include "PDB.h"
#include "packmsg.h"
#include "CollectionMgr.decl.h"
#include "ParallelIOMgr.decl.h"
#include "Vector.h"
#include "Random.h"
#include "DumpBench.h"
#include "CollectionMgr.h"
#include "CollectionMaster.h"
#include "CollectionMaster.decl.h"
#include "Node.def.h"

Go to the source code of this file.

Classes

class  CheckpointMsg
 

Macros

#define MIN_DEBUG_LEVEL   3
 

Functions

void recvCheckpointCReq_handler (envelope *)
 
void recvCheckpointCAck_handler (envelope *)
 
void registerUserEventsForAllComputeObjs (void)
 

Variables

int eventEndOfTimeStep
 
double startupTime
 
SimParametersnode_simParameters
 
Parametersnode_parameters
 
Moleculenode_molecule
 
char * gNAMDBinaryName
 

Macro Definition Documentation

#define MIN_DEBUG_LEVEL   3

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

Definition at line 24 of file Node.C.

Function Documentation

void recvCheckpointCAck_handler ( envelope *  env)

Definition at line 1311 of file Node.C.

References Node::Object(), and Node::recvCheckpointAck().

Referenced by Node::Node().

1311  {
1312  Node::Object()->recvCheckpointAck(CheckpointMsg::unpack(EnvToUsr(env)));
1313  }
static Node * Object()
Definition: Node.h:86
void recvCheckpointAck(CheckpointMsg *)
Definition: Node.C:1317
void recvCheckpointCReq_handler ( envelope *  env)

Definition at line 1289 of file Node.C.

References Node::Object(), and Node::recvCheckpointReq().

Referenced by Node::Node().

1289  {
1290  Node::Object()->recvCheckpointReq(CheckpointMsg::unpack(EnvToUsr(env)));
1291  }
static Node * Object()
Definition: Node.h:86
void recvCheckpointReq(CheckpointMsg *)
Definition: Node.C:1295
void registerUserEventsForAllComputeObjs ( void  )

Definition at line 830 of file ComputeMgr.C.

References computeAnglesType, computeAnisoType, computeBondsType, computeConsForceType, computeConsTorqueType, computeCrosstermsType, computeCylindricalBCType, computeDihedralsType, computeEFieldType, computeEwaldType, computeExclsType, computeExtType, computeFullDirectType, computeGlobalType, computeGridForceType, computeImpropersType, computeLCPOType, computeNonbondedPairType, computeNonbondedSelfType, computePmeCUDAType, computePmeType, computeQMType, computeRestraintsType, computeSelfAnglesType, computeSelfAnisoType, computeSelfBondsType, computeSelfCrosstermsType, computeSelfDihedralsType, computeSelfExclsType, computeSelfImpropersType, computeSelfTholeType, computeSphericalBCType, computeStirType, computeTclBCType, computeTholeType, PatchMap::gridsize_a(), PatchMap::gridsize_b(), PatchMap::gridsize_c(), PatchMap::index_a(), PatchMap::index_b(), PatchMap::index_c(), NAMD_bug(), ComputeMap::numComputes(), PatchMap::Object(), ComputeMap::Object(), Lattice::offset_a(), Lattice::offset_b(), Lattice::offset_c(), ComputeMap::pid(), TRACE_COMPOBJ_IDOFFSET, ComputeMap::trans(), and ComputeMap::type().

Referenced by Node::startup().

831 {
832 #ifdef TRACE_COMPUTE_OBJECTS
834  PatchMap *pmap = PatchMap::Object();
835  char user_des[50];
836  int p1, p2;
837  int adim, bdim, cdim;
838  int t1, t2;
839  int x1, y1, z1, x2, y2, z2;
840  int dx, dy, dz;
841  for (int i=0; i<map->numComputes(); i++)
842  {
843  memset(user_des, 0, 50);
844  switch ( map->type(i) )
845  {
847  sprintf(user_des, "computeNonBondedSelfType_%d_pid_%d", i, map->pid(i,0));
848  break;
849  case computeLCPOType:
850  sprintf(user_des, "computeLCPOType_%d_pid_%d", i, map->pid(i,0));
851  break;
853  adim = pmap->gridsize_a();
854  bdim = pmap->gridsize_b();
855  cdim = pmap->gridsize_c();
856  p1 = map->pid(i, 0);
857  t1 = map->trans(i, 0);
858  x1 = pmap->index_a(p1) + adim * Lattice::offset_a(t1);
859  y1 = pmap->index_b(p1) + bdim * Lattice::offset_b(t1);
860  z1 = pmap->index_c(p1) + cdim * Lattice::offset_c(t1);
861  p2 = map->pid(i, 1);
862  t2 = map->trans(i, 1);
863  x2 = pmap->index_a(p2) + adim * Lattice::offset_a(t2);
864  y2 = pmap->index_b(p2) + bdim * Lattice::offset_b(t2);
865  z2 = pmap->index_c(p2) + cdim * Lattice::offset_c(t2);
866  dx = abs(x1-x2);
867  dy = abs(y1-y2);
868  dz = abs(z1-z2);
869  sprintf(user_des, "computeNonBondedPairType_%d(%d,%d,%d)", i, dx,dy,dz);
870  break;
871 #ifdef NAMD_CUDA
872 #ifdef BONDED_CUDA
873  case computeBondedCUDAType:
874  sprintf(user_des, "computeBondedCUDAType_%d", i);
875  break;
876 #endif
877 #endif
878  case computeExclsType:
879  sprintf(user_des, "computeExclsType_%d", i);
880  break;
881  case computeBondsType:
882  sprintf(user_des, "computeBondsType_%d", i);
883  break;
884  case computeAnglesType:
885  sprintf(user_des, "computeAnglesType_%d", i);
886  break;
888  sprintf(user_des, "computeDihedralsType_%d", i);
889  break;
891  sprintf(user_des, "computeImpropersType_%d", i);
892  break;
893  case computeTholeType:
894  sprintf(user_des, "computeTholeType_%d", i);
895  break;
896  case computeAnisoType:
897  sprintf(user_des, "computeAnisoType_%d", i);
898  break;
900  sprintf(user_des, "computeCrosstermsType_%d", i);
901  break;
903  sprintf(user_des, "computeSelfExclsType_%d", i);
904  break;
906  sprintf(user_des, "computeSelfBondsType_%d", i);
907  break;
909  sprintf(user_des, "computeSelfAnglesType_%d", i);
910  break;
912  sprintf(user_des, "computeSelfDihedralsType_%d", i);
913  break;
915  sprintf(user_des, "computeSelfImpropersType_%d", i);
916  break;
918  sprintf(user_des, "computeSelfTholeType_%d", i);
919  break;
921  sprintf(user_des, "computeSelfAnisoType_%d", i);
922  break;
924  sprintf(user_des, "computeSelfCrosstermsType_%d", i);
925  break;
926 #ifdef DPMTA
927  case computeDPMTAType:
928  sprintf(user_des, "computeDPMTAType_%d", i);
929  break;
930 #endif
931 #ifdef DPME
932  case computeDPMEType:
933  sprintf(user_des, "computeDPMEType_%d", i);
934  break;
935 #endif
936  case computePmeType:
937  sprintf(user_des, "computePMEType_%d", i);
938  break;
939 #ifdef NAMD_CUDA
940  case computePmeCUDAType:
941  sprintf(user_des, "computePMECUDAType_%d", i);
942  break;
943 #endif
944  case computeEwaldType:
945  sprintf(user_des, "computeEwaldType_%d", i);
946  break;
948  sprintf(user_des, "computeFullDirectType_%d", i);
949  break;
950  case computeGlobalType:
951  sprintf(user_des, "computeGlobalType_%d", i);
952  break;
953  case computeStirType:
954  sprintf(user_des, "computeStirType_%d", i);
955  break;
956  case computeExtType:
957  sprintf(user_des, "computeExtType_%d", i);
958  break;
959  case computeQMType:
960  sprintf(user_des, "computeQMType_%d", i);
961  break;
962  case computeEFieldType:
963  sprintf(user_des, "computeEFieldType_%d", i);
964  break;
965  /* BEGIN gf */
967  sprintf(user_des, "computeGridForceType_%d", i);
968  break;
969  /* END gf */
971  sprintf(user_des, "computeSphericalBCType_%d", i);
972  break;
974  sprintf(user_des, "computeCylindricalBCType_%d", i);
975  break;
976  case computeTclBCType:
977  sprintf(user_des, "computeTclBCType_%d", i);
978  break;
980  sprintf(user_des, "computeRestraintsType_%d", i);
981  break;
983  sprintf(user_des, "computeConsForceType_%d", i);
984  break;
986  sprintf(user_des, "computeConsTorqueType_%d", i);
987  break;
988  default:
989  NAMD_bug("Unknown compute type in ComputeMgr::registerUserEventForAllComputeObjs().");
990  break;
991  }
992  int user_des_len = strlen(user_des);
993  char *user_des_cst = new char[user_des_len+1];
994  memcpy(user_des_cst, user_des, user_des_len);
995  user_des_cst[user_des_len] = 0;
996  //Since the argument in traceRegisterUserEvent is supposed
997  //to be a const string which will not be copied inside the
998  //function when a new user event is created, user_des_cst
999  //has to be allocated in heap.
1000  int reEvenId = traceRegisterUserEvent(user_des_cst, TRACE_COMPOBJ_IDOFFSET+i);
1001  //printf("Register user event (%s) with id (%d)\n", user_des, reEvenId);
1002  }
1003 #else
1004  return;
1005 #endif
1006 }
static int offset_b(int i)
Definition: Lattice.h:248
static int offset_c(int i)
Definition: Lattice.h:249
int numComputes(void)
Definition: ComputeMap.h:101
#define TRACE_COMPOBJ_IDOFFSET
Definition: Compute.h:77
int gridsize_c(void) const
Definition: PatchMap.h:66
static PatchMap * Object()
Definition: PatchMap.h:27
int index_a(int pid) const
Definition: PatchMap.h:86
int gridsize_a(void) const
Definition: PatchMap.h:64
void NAMD_bug(const char *err_msg)
Definition: common.C:123
static int offset_a(int i)
Definition: Lattice.h:247
ComputeType type(ComputeID cid)
Definition: ComputeMap.C:120
int index_b(int pid) const
Definition: PatchMap.h:87
int index_c(int pid) const
Definition: PatchMap.h:88
static ComputeMap * Object()
Definition: ComputeMap.h:89
int pid(ComputeID cid, int i)
Definition: ComputeMap.C:109
int trans(ComputeID cid, int i)
Definition: ComputeMap.C:114
int gridsize_b(void) const
Definition: PatchMap.h:65

Variable Documentation

int eventEndOfTimeStep

Definition at line 285 of file Node.C.

char* gNAMDBinaryName

Definition at line 237 of file BackEnd.C.

Molecule* node_molecule

Definition at line 424 of file Node.C.

Referenced by Node::resendMolecule2(), and Node::startup().

Parameters* node_parameters

Definition at line 423 of file Node.C.

Referenced by Node::resendMolecule2(), and Node::startup().

SimParameters* node_simParameters

Definition at line 422 of file Node.C.

Referenced by Node::startup().

double startupTime

Definition at line 286 of file Node.C.