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 "ComputePmeCUDAMgr.decl.h"
#include "ComputePmeCUDAMgr.h"
#include "ComputeGridForceMgr.decl.h"
#include "OptPmeMgr.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 *   ) 

Definition at line 1332 of file Node.C.

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

Referenced by Node::Node().

01332                                                  {
01333     Node::Object()->recvCheckpointAck(CheckpointMsg::unpack(EnvToUsr(env)));
01334   }

void recvCheckpointCReq_handler ( envelope *   ) 

Definition at line 1310 of file Node.C.

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

Referenced by Node::Node().

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

void registerUserEventsForAllComputeObjs ( void   ) 

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

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


Variable Documentation

int eventEndOfTimeStep

Definition at line 285 of file Node.C.

char* gNAMDBinaryName

Definition at line 221 of file BackEnd.C.

Molecule* node_molecule

Definition at line 430 of file Node.C.

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

Parameters* node_parameters

Definition at line 429 of file Node.C.

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

SimParameters* node_simParameters

Definition at line 428 of file Node.C.

Referenced by Node::startup().

double startupTime

Definition at line 286 of file Node.C.


Generated on Sat Nov 18 01:17:17 2017 for NAMD by  doxygen 1.4.7