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

Defines

#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

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

01311                                                  {
01312     Node::Object()->recvCheckpointAck(CheckpointMsg::unpack(EnvToUsr(env)));
01313   }

void recvCheckpointCReq_handler ( envelope *  env  ) 

Definition at line 1289 of file Node.C.

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

Referenced by Node::Node().

01289                                                  {
01290     Node::Object()->recvCheckpointReq(CheckpointMsg::unpack(EnvToUsr(env)));
01291   }

void registerUserEventsForAllComputeObjs ( void   ) 

Definition at line 828 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().

00829 {
00830 #ifdef TRACE_COMPUTE_OBJECTS
00831     ComputeMap *map = ComputeMap::Object();
00832     PatchMap *pmap = PatchMap::Object();     
00833     char user_des[50];
00834     int p1, p2;
00835     int adim, bdim, cdim;
00836     int t1, t2;
00837     int x1, y1, z1, x2, y2, z2;
00838     int dx, dy, dz;
00839     for (int i=0; i<map->numComputes(); i++)
00840     {
00841         memset(user_des, 0, 50);
00842         switch ( map->type(i) )
00843         {
00844         case computeNonbondedSelfType:
00845             sprintf(user_des, "computeNonBondedSelfType_%d_pid_%d", i, map->pid(i,0));
00846             break;
00847         case computeLCPOType:
00848             sprintf(user_des, "computeLCPOType_%d_pid_%d", i, map->pid(i,0));
00849             break;
00850         case computeNonbondedPairType:
00851             adim = pmap->gridsize_a();
00852             bdim = pmap->gridsize_b();
00853             cdim = pmap->gridsize_c();
00854             p1 = map->pid(i, 0);
00855             t1 = map->trans(i, 0);
00856             x1 = pmap->index_a(p1) + adim * Lattice::offset_a(t1);
00857             y1 = pmap->index_b(p1) + bdim * Lattice::offset_b(t1);
00858             z1 = pmap->index_c(p1) + cdim * Lattice::offset_c(t1);
00859             p2 = map->pid(i, 1);
00860             t2 = map->trans(i, 1);
00861             x2 = pmap->index_a(p2) + adim * Lattice::offset_a(t2);
00862             y2 = pmap->index_b(p2) + bdim * Lattice::offset_b(t2);
00863             z2 = pmap->index_c(p2) + cdim * Lattice::offset_c(t2);
00864             dx = abs(x1-x2);
00865             dy = abs(y1-y2);
00866             dz = abs(z1-z2);
00867             sprintf(user_des, "computeNonBondedPairType_%d(%d,%d,%d)", i, dx,dy,dz);
00868             break;
00869 #ifdef NAMD_CUDA
00870 #ifdef BONDED_CUDA
00871         case computeBondedCUDAType:
00872             sprintf(user_des, "computeBondedCUDAType_%d", i);
00873             break;
00874 #endif
00875 #endif
00876         case computeExclsType:
00877             sprintf(user_des, "computeExclsType_%d", i);
00878             break;
00879         case computeBondsType:
00880             sprintf(user_des, "computeBondsType_%d", i);
00881             break;
00882         case computeAnglesType:
00883             sprintf(user_des, "computeAnglesType_%d", i);
00884             break;
00885         case computeDihedralsType:
00886             sprintf(user_des, "computeDihedralsType_%d", i);
00887             break;
00888         case computeImpropersType:
00889             sprintf(user_des, "computeImpropersType_%d", i);
00890             break;
00891         case computeTholeType:
00892             sprintf(user_des, "computeTholeType_%d", i);
00893             break;
00894         case computeAnisoType:
00895             sprintf(user_des, "computeAnisoType_%d", i);
00896             break;
00897         case computeCrosstermsType:
00898             sprintf(user_des, "computeCrosstermsType_%d", i);
00899             break;
00900         case computeSelfExclsType:
00901             sprintf(user_des, "computeSelfExclsType_%d", i);
00902             break;
00903         case computeSelfBondsType:
00904             sprintf(user_des, "computeSelfBondsType_%d", i);
00905             break;
00906         case computeSelfAnglesType:
00907             sprintf(user_des, "computeSelfAnglesType_%d", i);
00908             break;
00909         case computeSelfDihedralsType:
00910             sprintf(user_des, "computeSelfDihedralsType_%d", i);
00911             break;
00912         case computeSelfImpropersType:
00913             sprintf(user_des, "computeSelfImpropersType_%d", i);
00914             break;
00915         case computeSelfTholeType:
00916             sprintf(user_des, "computeSelfTholeType_%d", i);
00917             break;
00918         case computeSelfAnisoType:
00919             sprintf(user_des, "computeSelfAnisoType_%d", i);
00920             break;
00921         case computeSelfCrosstermsType:
00922             sprintf(user_des, "computeSelfCrosstermsType_%d", i);
00923             break;
00924 #ifdef DPMTA
00925         case computeDPMTAType:
00926             sprintf(user_des, "computeDPMTAType_%d", i);
00927             break;
00928 #endif
00929 #ifdef DPME
00930         case computeDPMEType:
00931             sprintf(user_des, "computeDPMEType_%d", i);
00932             break;
00933 #endif
00934         case computePmeType:
00935             sprintf(user_des, "computePMEType_%d", i);
00936             break;
00937 #ifdef NAMD_CUDA
00938         case computePmeCUDAType:
00939             sprintf(user_des, "computePMECUDAType_%d", i);
00940             break;
00941 #endif
00942         case computeEwaldType:
00943             sprintf(user_des, "computeEwaldType_%d", i);
00944             break;
00945         case computeFullDirectType:
00946             sprintf(user_des, "computeFullDirectType_%d", i);
00947             break;
00948         case computeGlobalType:
00949             sprintf(user_des, "computeGlobalType_%d", i);
00950             break;
00951         case computeStirType:
00952             sprintf(user_des, "computeStirType_%d", i);
00953             break;
00954         case computeExtType:
00955             sprintf(user_des, "computeExtType_%d", i);
00956             break;
00957         case computeQMType:
00958             sprintf(user_des, "computeQMType_%d", i);
00959             break;
00960         case computeEFieldType:
00961             sprintf(user_des, "computeEFieldType_%d", i);
00962             break;
00963             /* BEGIN gf */
00964         case computeGridForceType:
00965             sprintf(user_des, "computeGridForceType_%d", i);
00966             break;
00967             /* END gf */
00968         case computeSphericalBCType:
00969             sprintf(user_des, "computeSphericalBCType_%d", i);
00970             break;
00971         case computeCylindricalBCType:
00972             sprintf(user_des, "computeCylindricalBCType_%d", i);
00973             break;
00974         case computeTclBCType:
00975             sprintf(user_des, "computeTclBCType_%d", i);
00976             break;
00977         case computeRestraintsType:
00978             sprintf(user_des, "computeRestraintsType_%d", i);
00979             break;
00980         case computeConsForceType:
00981             sprintf(user_des, "computeConsForceType_%d", i);
00982             break;
00983         case computeConsTorqueType:
00984             sprintf(user_des, "computeConsTorqueType_%d", i);
00985             break;
00986         default:
00987             NAMD_bug("Unknown compute type in ComputeMgr::registerUserEventForAllComputeObjs().");
00988             break;
00989         }
00990         int user_des_len = strlen(user_des);
00991         char *user_des_cst = new char[user_des_len+1];
00992         memcpy(user_des_cst, user_des, user_des_len);
00993         user_des_cst[user_des_len] = 0;
00994         //Since the argument in traceRegisterUserEvent is supposed
00995         //to be a const string which will not be copied inside the
00996         //function when a new user event is created, user_des_cst 
00997         //has to be allocated in heap.
00998         int reEvenId = traceRegisterUserEvent(user_des_cst, TRACE_COMPOBJ_IDOFFSET+i);
00999         //printf("Register user event (%s) with id (%d)\n", user_des, reEvenId);
01000     }
01001 #else
01002     return;
01003 #endif
01004 }


Variable Documentation

Definition at line 285 of file Node.C.

Definition at line 223 of file BackEnd.C.

Definition at line 424 of file Node.C.

Definition at line 423 of file Node.C.

Definition at line 422 of file Node.C.

double startupTime

Definition at line 286 of file Node.C.


Generated on 17 Sep 2019 for NAMD by  doxygen 1.6.1