Node Class Reference

#include <Node.h>

List of all members.

Public Member Functions

 Node (GroupInitMsg *msg)
 ~Node (void)
void run ()
void enableScriptBarrier ()
void scriptBarrier (CkQdMsg *)
void scriptParam (ScriptParamMsg *)
void reloadCharges (const char *filename)
void reloadCharges (float charge[], int n)
void reloadGridforceGrid (const char *key)
void reloadGridforceGrid (int gridnum)
void updateGridScale (char *key, Vector scale)
void updateGridScale (int gridnum, float sx, float sy, float sz)
void reloadStructure (const char *, const char *)
void resendMolecule ()
void resendMolecule2 ()
void sendCheckpointReq (int remote, const char *key, int task, Lattice &lat, ControllerState &cs)
void recvCheckpointReq (CheckpointMsg *)
void recvCheckpointAck (CheckpointMsg *)
void sendEnableExitScheduler (void)
void recvEnableExitScheduler (CkQdMsg *)
void enableExitScheduler (void)
void exitScheduler (CkQdMsg *)
void sendEnableEarlyExit (void)
void recvEnableEarlyExit (CkQdMsg *)
void enableEarlyExit (void)
void earlyExit (CkQdMsg *)
void startup ()
void startUp (CkQdMsg *)
void mallocTest (int)
void mallocTestQd (CkQdMsg *)
float measureMemory ()
void BOCCheckIn ()
void awaitBOCCheckIn ()
void saveMolDataPointers (NamdState *)
void startHPM ()
void stopHPM ()
void traceBarrier (int turnOnTrace, int step)
void resumeAfterTraceBarrier (CkReductionMsg *msg)
void papiMeasureBarrier (int turnOnMeasure, int step)
void resumeAfterPapiMeasureBarrier (CkReductionMsg *msg)
void outputPatchComputeMaps (const char *filename, int tag)
int myid ()
int numNodes ()
void setScript (ScriptTcl *s)
ScriptTclgetScript (void)

Static Public Member Functions

static NodeObject ()
static void messageRun ()
static void messageStartUp ()
static void messageBOCCheckIn ()

Public Attributes

int mallocTest_size
float initVM
float initRSS
int curTimeStep
int curMFlopStep
bool specialTracing
WorkDistribworkDistrib
ComputeMgrcomputeMgr
Randomrand
Moleculemolecule
Parametersparameters
SimParameterssimParameters
ConfigListconfigList
PDBpdb
NamdStatestate
Outputoutput
IMDOutputimd
colvarmodule * colvars
Vectorcoords

Protected Attributes

AtomMapatomMap
PatchMappatchMap
ComputeMapcomputeMap
LdbCoordinatorldbCoordinator


Detailed Description

Definition at line 78 of file Node.h.


Constructor & Destructor Documentation

Node::Node ( GroupInitMsg msg  ) 

Definition at line 290 of file Node.C.

References atomMap, colvars, configList, DebugM, GroupInitMsg::group, imd, ComputeMap::Instance(), AtomMap::Instance(), PatchMap::Instance(), molecule, NAMD_bug(), output, parameters, patchMap, pdb, recvCheckpointCAck_handler(), recvCheckpointCReq_handler(), simParameters, specialTracing, state, x, y, and z.

00291 {    
00292   DebugM(4,"Creating Node\n");
00293 #if(CMK_CCS_AVAILABLE && CMK_WEB_MODE)
00294   CApplicationInit();
00295 #endif
00296   if (CkpvAccess(Node_instance) == 0) {
00297     CkpvAccess(Node_instance) = this;
00298     eventEndOfTimeStep = traceRegisterUserEvent("EndOfTimeStep");
00299   } else {
00300     NAMD_bug("Node::Node() - another instance of Node exists!");
00301   }
00302 
00303   CkpvAccess(BOCclass_group) = msg->group;
00304   delete msg;
00305 
00306   CkpvAccess(BOCclass_group).node = thisgroup;
00307 
00308   recvCheckpointCReq_index = CmiRegisterHandler((CmiHandler)recvCheckpointCReq_handler);
00309   recvCheckpointCAck_index = CmiRegisterHandler((CmiHandler)recvCheckpointCAck_handler);
00310 
00311   startupPhase = 0;
00312 
00313   molecule = NULL;
00314   parameters = NULL;
00315   simParameters = NULL;
00316   configList = NULL;
00317   pdb = NULL;
00318   state = NULL;
00319   output = NULL;
00320   imd = new IMDOutput;
00321   colvars = 0;
00322 
00323 #if USE_HPM
00324   // assumes that this will be done only on BG/P
00325   TopoManager *tmgr = new TopoManager();
00326   int x, y, z;
00327   tmgr->rankToCoordinates(CkMyPe(), x, y, z, localRankOnNode);
00328   delete tmgr;
00329 #endif
00330 
00331   specialTracing = traceAvailable() && (traceIsOn()==0);
00332 
00333   DebugM(4,"Creating PatchMap, AtomMap, ComputeMap\n");
00334   patchMap = PatchMap::Instance();
00335   atomMap = AtomMap::Instance();
00336   if ( CkMyRank() == 0 ) ComputeMap::Instance();
00337 
00338   //Note: Binding BOC vars such as workDistrib has been moved
00339   //to the 1st phase of startup because the in-order message delivery
00340   //is not always guaranteed --Chao Mei
00341 #ifdef CMK_BALANCED_INJECTION_API
00342   if(CkMyRank() == 0){
00343     balancedInjectionLevel=ck_get_GNI_BIConfig();
00344     // CkPrintf("[%d] get retrieved BI=%d\n",CkMyPe(),balancedInjectionLevel);
00345     ck_set_GNI_BIConfig(20);
00346     // CkPrintf("[%d] set retrieved BI=%d\n",CkMyPe(),ck_get_GNI_BIConfig());
00347   }
00348 #endif
00349 
00350 }

Node::~Node ( void   ) 

Definition at line 355 of file Node.C.

References atomMap, computeMap, output, patchMap, and rand.

00356 {
00357   delete output;
00358   delete computeMap;
00359   delete atomMap;
00360   delete patchMap;
00361   delete CkpvAccess(comm);
00362   // BEGIN LA
00363   delete rand;
00364   // END LA
00365 #ifdef MEASURE_NAMD_WITH_PAPI
00366   delete CkpvAccess(papiEvents);
00367 #endif
00368 }


Member Function Documentation

void Node::awaitBOCCheckIn (  ) 

void Node::BOCCheckIn (  ) 

void Node::earlyExit ( CkQdMsg *   ) 

Definition at line 1390 of file Node.C.

References BackEnd::exit(), iERROR(), iout, and NAMD_quit().

01390                                  {
01391   iout << iERROR << "Exiting prematurely; see error messages above.\n" << endi;
01392   if ( CmiNumPartitions() > 1 ) NAMD_quit("Exiting prematurely; see error messages above.");
01393   BackEnd::exit();
01394   delete msg;
01395 }

void Node::enableEarlyExit ( void   ) 

Definition at line 1382 of file Node.C.

References sendEnableEarlyExit().

Referenced by Sequencer::hardWallDrude(), Sequencer::maximumMove(), Sequencer::rattle1(), and recvEnableEarlyExit().

01382                                {
01383   if ( CkMyPe() ) {
01384     sendEnableEarlyExit();
01385   } else {
01386     CkStartQD(CkIndex_Node::earlyExit((CkQdMsg*)0),&thishandle);
01387   }
01388 }

void Node::enableExitScheduler ( void   ) 

Definition at line 1357 of file Node.C.

References sendEnableExitScheduler().

Referenced by BackEnd::awaken(), and recvEnableExitScheduler().

01357                                    {
01358   if ( CkMyPe() ) {
01359     sendEnableExitScheduler();
01360   } else {
01361     CkStartQD(CkIndex_Node::exitScheduler((CkQdMsg*)0),&thishandle);
01362   }
01363 }

void Node::enableScriptBarrier (  ) 

Definition at line 1151 of file Node.C.

01151                                {
01152   CkStartQD(CkIndex_Node::scriptBarrier((CkQdMsg*)0),&thishandle);
01153 }

void Node::exitScheduler ( CkQdMsg *   ) 

Definition at line 1365 of file Node.C.

01365                                      {
01366   //CmiPrintf("exitScheduler %d\n",CkMyPe());
01367   CsdExitScheduler();
01368   delete msg;
01369 }

ScriptTcl* Node::getScript ( void   )  [inline]

Definition at line 193 of file Node.h.

Referenced by colvarproxy_namd::colvarproxy_namd(), Output::coordinate(), and Controller::printEnergies().

00193 { return script; } 

void Node::mallocTest ( int   ) 

Definition at line 391 of file Node.C.

References NAMD_die().

Referenced by mallocTestQd().

00391                               {
00392   int MB = 1024*1024;
00393   int size = 100;
00394   char* foo = (char*) malloc(size*MB);
00395   if ( ! foo ) {
00396     char buf[256];
00397     sprintf(buf,"Malloc fails on Pe %d at %d MB.\n",CkMyPe(),step*size);
00398     NAMD_die(buf);
00399   }
00400   memset(foo,0,size*MB*sizeof(char));
00401 }

void Node::mallocTestQd ( CkQdMsg *   ) 

Definition at line 403 of file Node.C.

References mallocTest(), and mallocTest_size.

00403                                      {
00404   delete qmsg;
00405   if ( mallocTest_size ) {
00406     CkPrintf("All PEs successfully allocated %d MB.\n", 100*mallocTest_size);
00407   } else {
00408     CkPrintf("Starting malloc test on all PEs.\n");
00409   }
00410   fflush(stdout);
00411   ++mallocTest_size;
00412   CkStartQD(CkIndex_Node::mallocTestQd((CkQdMsg*)0),&thishandle);
00413   (CProxy_Node(CkpvAccess(BOCclass_group).node)).mallocTest(mallocTest_size);
00414 }

float Node::measureMemory (  ) 

static void Node::messageBOCCheckIn (  )  [static]

void Node::messageRun (  )  [static]

Definition at line 1107 of file Node.C.

References run().

Referenced by startup().

01107                       {
01108   (CProxy_Node(CkpvAccess(BOCclass_group).node)).run();
01109 }

void Node::messageStartUp (  )  [static]

Definition at line 419 of file Node.C.

References startup().

00419                           {
00420   (CProxy_Node(CkpvAccess(BOCclass_group).node)).startup();
00421 }

int Node::myid (  )  [inline]

Definition at line 189 of file Node.h.

Referenced by ComputeMgr::createComputes(), WorkDistrib::distributeHomePatches(), and LdbCoordinator::initialize().

00189 { return CkMyPe(); }

int Node::numNodes (  )  [inline]

Definition at line 190 of file Node.h.

Referenced by WorkDistrib::assignNodeToPatch(), and LdbCoordinator::initialize().

00190 { return CkNumPes(); }

static Node* Node::Object (  )  [inline, static]

Definition at line 86 of file Node.h.

Referenced by HomePatch::addForceToMomentum(), HomePatch::addForceToMomentum3(), Sequencer::addMovDragToPosition(), Sequencer::addRotDragToPosition(), HomePatch::addVelocityToPosition(), after_backend_init(), Controller::algorithm(), WorkDistrib::assignNodeToPatch(), BackEnd::awaken(), PmeZPencil::backward_fft(), PmeYPencil::backward_fft(), PmeXPencil::backward_fft(), ComputeNonbondedCUDA::build_exclusions(), HomePatch::buildRattleList(), Controller::calcPressure(), colvarproxy_namd::calculate(), ComputePmeMgr::chargeGridSubmitted(), colvarproxy_namd::check_atom_id(), SimParameters::close_dcdfile(), SimParameters::close_veldcdfile(), colvarproxy_namd::colvarproxy_namd(), Controller::compareChecksums(), ComputeCylindricalBC::ComputeCylindricalBC(), ComputeEwald::ComputeEwald(), ImproperElem::computeForce(), GromacsPairElem::computeForce(), DihedralElem::computeForce(), BondElem::computeForce(), AngleElem::computeForce(), ComputeFullDirect::ComputeFullDirect(), ComputeGlobal::ComputeGlobal(), ComputeHomeTuples< AnisoElem, aniso, aniso >::ComputeHomeTuples(), ComputeLCPO::ComputeLCPO(), ComputeMsm::ComputeMsm(), ComputeNonbondedCUDA::ComputeNonbondedCUDA(), ComputeNonbondedPair::ComputeNonbondedPair(), ComputeNonbondedSelf::ComputeNonbondedSelf(), ComputePme::ComputePme(), ComputeRestraints::ComputeRestraints(), ComputeSphericalBC::ComputeSphericalBC(), ComputeStir::ComputeStir(), ComputeTclBC::ComputeTclBC(), Controller::Controller(), Output::coordinate(), Output::coordinateNeeded(), ComputeMgr::createComputes(), ComputeCUDAMgr::createCudaComputeNonbonded(), ParallelIOMgr::createHomePatches(), LdbCoordinator::createLoadBalancer(), CudaComputeNonbonded::CudaComputeNonbonded(), CollectionMaster::disposeForces(), CollectionMaster::disposePositions(), CollectionMaster::disposeVelocities(), ComputeStir::doForce(), ComputeRestraints::doForce(), ComputeNonbondedSelf::doForce(), ComputeNonbondedPair::doForce(), ComputeGridForce::doForce(), ComputeEField::doForce(), ComputeConsTorque::doForce(), ComputeConsForce::doForce(), HomePatch::doGroupSizeCheck(), HomePatch::doMarginCheck(), HomePatch::doPairlistCheck(), ComputePme::doQMWork(), CudaComputeNonbonded::doWork(), ComputeTclBC::doWork(), ComputeNonbondedCUDA::doWork(), ComputeHomeTuples< AnisoElem, aniso, aniso >::doWork(), ComputeGBISser::doWork(), dumpbench(), HomePatch::exchangeAtoms(), HomePatch::exchangeCheckpoint(), CudaComputeNonbonded::finishReductions(), ComputeNonbondedCUDA::finishReductions(), ComputeNonbondedCUDA::finishWork(), Output::force(), Output::forceNeeded(), PmeXPencil::forward_fft(), PmeYPencil::forward_fft(), PmeZPencil::forward_fft(), ComputePmeCUDADevice::gatherForce(), ComputePmeCUDADevice::gatherForceDone(), HomePatch::gbisComputeAfterP1(), HomePatch::gbisComputeAfterP2(), GlobalMasterIMD::get_vmd_forces(), GlobalMasterEasy::GlobalMasterEasy(), GlobalMasterFreeEnergy::GlobalMasterFreeEnergy(), GlobalMasterIMD::GlobalMasterIMD(), GlobalMasterServer::GlobalMasterServer(), GlobalMasterSymmetry::GlobalMasterSymmetry(), GlobalMasterTMD::GlobalMasterTMD(), ComputePmeMgr::gridCalc2R(), Sequencer::hardWallDrude(), HomePatch::hardWallDrude(), colvarproxy_namd::init_atom_group(), OptPmeMgr::initialize(), LdbCoordinator::initialize(), ComputeQM::initialize(), ComputePmeCUDA::initialize(), ComputePmeMgr::initialize(), ComputeMsmMgr::initialize(), ComputePmeMgr::initialize_computes(), OptPmeMgr::initialize_pencils(), ComputePmeMgr::initialize_pencils(), Sequencer::integrate(), Controller::integrate(), isPmeProcessor(), Sequencer::langevinPiston(), Sequencer::langevinVelocities(), Sequencer::langevinVelocitiesBBK1(), Sequencer::langevinVelocitiesBBK2(), CudaComputeNonbonded::launchWork(), LJTable::LJTable(), ComputeHomeTuples< AnisoElem, aniso, aniso >::loadTuples(), HomePatch::loweAndersenVelocities(), WorkDistrib::mapComputes(), Sequencer::maximumMove(), ScriptTcl::measure(), Sequencer::minimize(), HomePatch::minimize_rattle2(), HomePatch::mollyAverage(), HomePatch::mollyMollify(), Controller::multigatorCalcEnthalpy(), NamdHybridLB::NamdHybridLB(), ComputeNonbondedCUDA::noWork(), OptPmeCompute::OptPmeCompute(), PmePencil< CBase_PmeZPencil >::order_init(), Patch::Patch(), WorkDistrib::patchMapInit(), PmeXPencil::pme_kspace(), HomePatch::positionsReady(), Controller::printDynamicsEnergies(), Controller::printEnergies(), Controller::printMinimizeEnergies(), HomePatch::qmSwapAtoms(), Sequencer::rattle1(), HomePatch::rattle1(), HomePatch::rattle1old(), HomePatch::rattle2(), LdbCoordinator::rebalance(), Controller::rebalanceLoad(), CollectionMaster::receiveDataStream(), CollectionMaster::receiveForces(), CollectionMaster::receivePositions(), Controller::receivePressure(), CollectionMaster::receiveVelocities(), recursive_bisect_with_curve(), ComputePmeCUDADevice::recvAtoms(), ParallelIOMgr::recvAtomsCntPerPatch(), recvCheckpointCAck_handler(), recvCheckpointCReq_handler(), HomePatch::recvCheckpointLoad(), ComputeMgr::recvComputeConsForceMsg(), ComputeMsmSerialMgr::recvCoord(), ComputeGBISserMgr::recvCoord(), ComputeFmmSerialMgr::recvCoord(), ComputeExtMgr::recvCoord(), OptPmeMgr::recvEvir(), ComputeQMMgr::recvPartQM(), ComputeQMMgr::recvPntChrg(), recvReplicaDcdData(), recvReplicaDcdInit(), ComputeNonbondedCUDA::recvYieldDevice(), ComputeNonbondedCUDA::registerPatches(), Sequencer::reloadCharges(), Controller::rescaleaccelMD(), ScriptTcl::run(), ComputeQM::saveResults(), ComputeGlobal::saveTotalForces(), ComputeNonbondedUtil::select(), PmeZPencil::send_all_ungrid(), PmeYPencil::send_trans(), PmeZPencil::send_trans(), PmeYPencil::send_untrans(), PmeXPencil::send_untrans(), ComputePmeMgr::sendTrans(), ComputePmeMgr::sendUngrid(), ComputePmeMgr::sendUntrans(), HomePatch::setGBISIntrinsicRadii(), PatchMgr::setLattice(), HomePatch::setLcpoType(), ComputePmeCUDAMgr::setupPencils(), ComputeNonbondedCUDA::skip(), NamdHybridLB::splitComputes(), ComputePmeCUDADevice::spreadCharge(), CollectionMaster::startNextRoundOutputForce(), CollectionMaster::startNextRoundOutputPos(), CollectionMaster::startNextRoundOutputVel(), NamdCentLB::Strategy(), OptPmeXPencil::submit_evir(), ComputePmeMgr::submitReductions(), Tcl_centerOfMass(), Tcl_centerOfNumber(), Tcl_loadCoords(), Tcl_radiusOfGyration(), Sequencer::tcoupleVelocities(), ComputePme::ungridForces(), OptPmeCompute::ungridForces_compute(), OptPmeCompute::ungridForces_finalize(), colvarproxy_namd::update_atom_properties(), colvarproxy_namd::update_group_properties(), ComputeMgr::updateLocalComputes4(), Output::velocity(), Output::velocityNeeded(), wrap_coor_int(), and CollectionMaster::wrapCoorFinished().

00086 {return CkpvAccess(Node_instance);}

void Node::outputPatchComputeMaps ( const char *  filename,
int  tag 
)

Definition at line 1541 of file Node.C.

References Patch::getNumAtoms(), PatchMap::gridsize_a(), PatchMap::gridsize_b(), PatchMap::gridsize_c(), NAMD_die(), ComputeMap::node(), PatchMap::node(), ComputeMap::numComputes(), PatchMap::numPatches(), numPatches, ComputeMap::Object(), PatchMap::Object(), SimParameters::outputMaps, PatchMap::patch(), ComputeMap::pid(), simParameters, SimParameters::simulatedNodeSize, SimParameters::simulatedPEs, SimParameters::simulateInitialMapping, and ComputeMap::type().

Referenced by Controller::rebalanceLoad(), and startup().

01541                                                               {
01542         if(!simParameters->outputMaps && !simParameters->simulateInitialMapping) return;
01543 
01544         int numpes = CkNumPes();
01545         int nodesize = CkMyNodeSize();
01546         if(simParameters->simulateInitialMapping) {
01547                 numpes = simParameters->simulatedPEs;
01548                 nodesize = simParameters->simulatedNodeSize;
01549         }
01550 
01551         char fname[128];
01552         sprintf(fname, "mapdump_%s.%d_%d_%d_%s", filename, numpes, nodesize, tag, gNAMDBinaryName);
01553 
01554         FILE *fp = fopen(fname, "w");
01555         if(fp == NULL) {
01556                 NAMD_die("Error in outputing PatchMap and ComputeMap info!\n");
01557                 return;
01558         }
01559         PatchMap *pMap = PatchMap::Object();
01560         ComputeMap *cMap = ComputeMap::Object();
01561         int numPatches = pMap->numPatches();
01562         int numComputes = cMap->numComputes();
01563         fprintf(fp, "%d %d %d %d %d %d %d\n", numpes, nodesize, numPatches, numComputes, 
01564                         pMap->gridsize_a(), pMap->gridsize_b(), pMap->gridsize_c());
01565         //output PatchMap info
01566         for(int i=0; i<numPatches; i++) {
01567         #ifdef MEM_OPT_VERSION
01568                 fprintf(fp, "%d %d\n", pMap->numAtoms(i), pMap->node(i));
01569         #else
01570                 fprintf(fp, "%d %d\n", pMap->patch(i)->getNumAtoms(), pMap->node(i));
01571         #endif
01572         }
01573 
01574         //output ComputeMap info
01575         for(int i=0; i<numComputes; i++) {              
01576                 fprintf(fp, "%d %d %d %d\n", cMap->node(i), cMap->type(i), cMap->pid(i,0), cMap->pid(i,1));             
01577         }
01578 }

void Node::papiMeasureBarrier ( int  turnOnMeasure,
int  step 
)

Definition at line 1446 of file Node.C.

References curMFlopStep.

01446                                                         {
01447 #ifdef MEASURE_NAMD_WITH_PAPI
01448         curMFlopStep = step;
01449         double results[NUM_PAPI_EVENTS+1];
01450 
01451         if(turnOnMeasure){              
01452           CkpvAccess(papiEvents)[NUM_PAPI_EVENTS]=CmiWallTimer();
01453 
01454           long long counters[NUM_PAPI_EVENTS+1];
01455           int ret=PAPI_start_counters(CkpvAccess(papiEvents), NUM_PAPI_EVENTS);
01456           if(ret==PAPI_OK)
01457             {
01458               //              CkPrintf("traceBarrier start counters (%d) at step %d called on proc %d\n", turnOnMeasure, step, CkMyPe());
01459             }
01460           else
01461             {
01462               CkPrintf("error PAPI_start_counters (%d) at step %d called on proc %d\n",ret , step, CkMyPe());
01463             }
01464           if(PAPI_read_counters(counters, NUM_PAPI_EVENTS)!=PAPI_OK)
01465             {
01466               CkPrintf("error PAPI_read_counters %d\n",PAPI_read_counters(counters, NUM_PAPI_EVENTS));
01467             };
01468         }else{
01469           long long counters[NUM_PAPI_EVENTS+1];
01470           for(int i=0;i<NUM_PAPI_EVENTS;i++)  counters[i]=0LL;
01471           if(PAPI_read_counters(counters, NUM_PAPI_EVENTS)==PAPI_OK)
01472             {
01473 #if !MEASURE_PAPI_SPP
01474               results[0] = (double)counters[0]/1e6;
01475               results[1] = (double)counters[1]/1e6;
01476 #else
01477               for(int i=0;i<NUM_PAPI_EVENTS;i++)  results[i] = counters[i]/1e6;
01478 #endif
01479               //              for(int i=0;i<NUM_PAPI_EVENTS;i++) CkPrintf("[%d] counter %d is %ld\n",CkMyPe(),i,counters[i]);
01480             }
01481           else
01482             {
01483               //              CkPrintf("error PAPI_read_counters %d\n",PAPI_read_counters(counters, NUM_PAPI_EVENTS));
01484             }
01485           //      CkPrintf("traceBarrier stop counters (%d) at step %d called on proc %d\n", turnOnMeasure, step, CkMyPe());
01486                 
01487           PAPI_stop_counters(counters, NUM_PAPI_EVENTS);        
01488         }
01489         if(CkMyPe()==0)
01490           //        CkPrintf("traceBarrier (%d) at step %d called on proc %d\n", turnOnMeasure, step, CkMyPe());
01491         results[NUM_PAPI_EVENTS]=CkpvAccess(papiEvents)[NUM_PAPI_EVENTS]; //starttime
01492         CProxy_Node nd(CkpvAccess(BOCclass_group).node);
01493         CkCallback cb(CkIndex_Node::resumeAfterPapiMeasureBarrier(NULL), nd[0]);
01494         contribute(sizeof(double)*(NUM_PAPI_EVENTS+1), &results, CkReduction::sum_double, cb);  
01495 #endif
01496 }

void Node::recvCheckpointAck ( CheckpointMsg  ) 

Definition at line 1338 of file Node.C.

References CheckpointMsg::checkpoint, NamdState::controller, Controller::recvCheckpointAck(), and state.

Referenced by recvCheckpointCAck_handler().

01338                                                {
01339   state->controller->recvCheckpointAck(msg->checkpoint);
01340   delete msg;
01341 }

void Node::recvCheckpointReq ( CheckpointMsg  ) 

Definition at line 1316 of file Node.C.

References CheckpointMsg::checkpoint, NamdState::controller, CheckpointMsg::key, Controller::recvCheckpointReq(), CheckpointMsg::replica, state, and CheckpointMsg::task.

Referenced by recvCheckpointCReq_handler().

01316                                                {
01317   state->controller->recvCheckpointReq(msg->key,msg->task,msg->checkpoint);
01318 
01319   int remote = msg->replica;
01320   msg->replica = CmiMyPartition();
01321   envelope *env = UsrToEnv(CheckpointMsg::pack(msg));
01322   CmiSetHandler(env,recvCheckpointCAck_index);
01323 #if CMK_HAS_PARTITION
01324   CmiInterSyncSendAndFree(CkMyPe(),remote,env->getTotalsize(),(char*)env);
01325 #else
01326   CmiSyncSendAndFree(CkMyPe(),env->getTotalsize(),(char*)env);
01327 #endif
01328 }

void Node::recvEnableEarlyExit ( CkQdMsg *   ) 

Definition at line 1377 of file Node.C.

References enableEarlyExit().

01377                                            {
01378   delete msg;
01379   enableEarlyExit();
01380 }

void Node::recvEnableExitScheduler ( CkQdMsg *   ) 

Definition at line 1351 of file Node.C.

References enableExitScheduler().

01351                                                {
01352   //CmiPrintf("recvEnableExitScheduler\n");
01353   delete msg;
01354   enableExitScheduler();
01355 }

void Node::reloadCharges ( float  charge[],
int  n 
)

Definition at line 1182 of file Node.C.

References molecule, and Molecule::reloadCharges().

01182                                               {
01183   molecule->reloadCharges(charge,n);
01184 }

void Node::reloadCharges ( const char *  filename  ) 

Definition at line 1165 of file Node.C.

References molecule, NAMD_die(), and Molecule::numAtoms.

01165                                              {
01166   FILE *file = fopen(filename,"r");
01167   if ( ! file ) NAMD_die("node::reloadCharges():Error opening charge file.");
01168 
01169   int n = molecule->numAtoms;
01170   float *charge = new float[n];
01171 
01172   for ( int i = 0; i < n; ++i ) {
01173     if ( ! fscanf(file,"%f",&charge[i]) )
01174       NAMD_die("Node::reloadCharges():Not enough numbers in charge file.");
01175   }
01176 
01177   fclose(file);
01178   CProxy_Node(thisgroup).reloadCharges(charge,n);
01179   delete [] charge;
01180 }

void Node::reloadGridforceGrid ( int  gridnum  ) 

Definition at line 1257 of file Node.C.

References ALLBUTME, BUFSIZE, DebugM, MOStream::end(), Molecule::get_gridfrc_grid(), GRIDFORCEGRIDTAG, molecule, NAMD_bug(), GridforceGrid::pack_grid(), Molecule::set_gridfrc_grid(), and GridforceGrid::unpack_grid().

01257                                           {
01258     if (CmiMyRank()) return;
01259     DebugM(4, "reloadGridforceGrid(int) called on node " << CkMyPe() << "\n" << endi);
01260     
01261     GridforceGrid *grid = molecule->get_gridfrc_grid(gridnum);
01262     if (grid == NULL) {
01263         NAMD_bug("Node::reloadGridforceGrid(int):grid not found");
01264     }
01265     
01266     if (CkMyPe()) {
01267         // not node 0 -> receive grid
01268         DebugM(4, "Receiving grid\n");
01269         
01270         delete grid;
01271         
01272         MIStream *msg = CkpvAccess(comm)->newInputStream(0, GRIDFORCEGRIDTAG);
01273         grid = GridforceGrid::unpack_grid(gridnum, msg);
01274         molecule->set_gridfrc_grid(gridnum, grid);
01275         delete msg;
01276     } else {
01277         // node 0 -> send grid
01278         DebugM(4, "Sending grid\n");
01279         
01280         MOStream *msg = CkpvAccess(comm)->newOutputStream(ALLBUTME, GRIDFORCEGRIDTAG, BUFSIZE);
01281         GridforceGrid::pack_grid(grid, msg);
01282         msg->end();
01283         delete msg;
01284     }
01285     
01286     DebugM(4, "reloadGridforceGrid(int) finished\n" << endi);
01287 }

void Node::reloadGridforceGrid ( const char *  key  ) 

Definition at line 1188 of file Node.C.

References DebugM, MGridforceParamsList::find_key(), Molecule::get_gridfrc_grid(), MGridforceParamsList::index_for_key(), SimParameters::mgridforcelist, MGRIDFORCEPARAMS_DEFAULTKEY, molecule, NAMD_bug(), NAMD_die(), GridforceGrid::reinitialize(), and simParameters.

01188                                                {
01189     DebugM(4, "reloadGridforceGrid(const char*) called on node " << CkMyPe() << "\n" << endi);
01190     
01191     int gridnum;
01192     MGridforceParams *mgridParams;
01193     if (key == NULL) {
01194         gridnum = simParameters->mgridforcelist.index_for_key(MGRIDFORCEPARAMS_DEFAULTKEY);
01195         mgridParams = simParameters->mgridforcelist.find_key(MGRIDFORCEPARAMS_DEFAULTKEY);
01196     } else {
01197         gridnum = simParameters->mgridforcelist.index_for_key(key);
01198         mgridParams = simParameters->mgridforcelist.find_key(key);
01199     }
01200     
01201     if (gridnum < 0 || mgridParams == NULL) {
01202         NAMD_die("Node::reloadGridforceGrid(const char*):Could not find grid.");
01203     }
01204     
01205     GridforceGrid *grid = molecule->get_gridfrc_grid(gridnum);
01206     if (grid == NULL) {
01207         NAMD_bug("Node::reloadGridforceGrid(const char*):grid not found");
01208     }
01209     grid->reinitialize(simParameters, mgridParams);
01210     
01211     CProxy_Node(thisgroup).reloadGridforceGrid(gridnum);
01212     
01213     DebugM(4, "reloadGridforceGrid(const char*) finished\n" << endi);
01214 }

void Node::reloadStructure ( const char *  ,
const char *   
)

Definition at line 1019 of file Node.C.

References NamdState::loadStructure(), NamdState::molecule, molecule, NamdState::pdb, pdb, and state.

01019                                                                  {
01020   delete molecule;
01021   molecule = state->molecule = 0;
01022   delete pdb;
01023   pdb = state->pdb = 0;
01024   state->loadStructure(fname,pdbname,1);
01025   this->molecule = state->molecule;
01026   this->pdb = state->pdb;
01027   CProxy_Node nodeProxy(thisgroup);
01028   nodeProxy.resendMolecule();
01029 }

void Node::resendMolecule (  ) 

Definition at line 1032 of file Node.C.

References ALLBUTME, BUFSIZE, computeMgr, molecule, MOLECULETAG, node_molecule, node_parameters, SimParameters::nonbonded_select(), Molecule::numAtoms, parameters, Molecule::receive_Molecule(), Parameters::receive_Parameters(), Molecule::send_Molecule(), Parameters::send_Parameters(), ComputeMgr::sendBuildCudaExclusions(), simParameters, and STATICPARAMSTAG.

01032                           {
01033   if ( CmiMyRank() ) {
01034     return;
01035   }
01036   if ( CmiMyPe() == 0 ) {
01037     int bufSize = BUFSIZE;
01038     MOStream *conv_msg;
01039     conv_msg = CkpvAccess(comm)->newOutputStream(ALLBUTME, STATICPARAMSTAG, bufSize);
01040     parameters->send_Parameters(conv_msg);
01041     if(molecule->numAtoms>=1000000) bufSize = 16*BUFSIZE;
01042     conv_msg = CkpvAccess(comm)->newOutputStream(ALLBUTME, MOLECULETAG, bufSize);
01043     molecule->send_Molecule(conv_msg);
01044   } else {
01045     MIStream *conv_msg;
01046     delete parameters;
01047     parameters = new Parameters;
01048     conv_msg = CkpvAccess(comm)->newInputStream(0, STATICPARAMSTAG);
01049     parameters->receive_Parameters(conv_msg);
01050     delete molecule;
01051     molecule = new Molecule(simParameters,parameters);
01052     conv_msg = CkpvAccess(comm)->newInputStream(0, MOLECULETAG);
01053     molecule->receive_Molecule(conv_msg);
01054   }
01055   node_parameters = parameters;
01056   node_molecule = molecule;
01057   SimParameters::nonbonded_select();
01058   computeMgr->sendBuildCudaExclusions();
01059   CProxy_Node nodeProxy(thisgroup);
01060   for ( int i=0; i<CmiMyNodeSize(); ++i ) {
01061     nodeProxy[CmiMyPe()+i].resendMolecule2();
01062   }
01063 }

void Node::resendMolecule2 (  ) 

Definition at line 1065 of file Node.C.

References AtomMap::allocateMap(), molecule, node_molecule, node_parameters, Molecule::numAtoms, AtomMap::Object(), and parameters.

void Node::resumeAfterPapiMeasureBarrier ( CkReductionMsg *  msg  ) 

Definition at line 1498 of file Node.C.

References NamdState::controller, curMFlopStep, simParameters, and state.

01498                                                            {
01499 #ifdef MEASURE_NAMD_WITH_PAPI
01500   
01501         if(simParameters->papiMeasureStartStep != curMFlopStep) {
01502                 double *results = (double *)msg->getData();
01503                 double endtime=CmiWallTimer();
01504                 int bstep = simParameters->papiMeasureStartStep;
01505                 int estep = bstep + simParameters->numPapiMeasureSteps;
01506 #if MEASURE_PAPI_SPP
01507                 CkPrintf("SPP INFO: PAPI_FP_OPS timestep %d to %d is %lf(1e6)\n", bstep,estep,results[0]);
01508                 CkPrintf("SPP INFO: PAPI_TOT_INS timestep %d to %d is %lf(1e6)\n", bstep,estep,results[1]);
01509                 CkPrintf("SPP INFO: perf::PERF_COUNT_HW_CACHE_LL:MISS timestep %d to %d is %lf(1e6)\n", bstep,estep,results[2]);
01510                 CkPrintf("SPP INFO: DATA_PREFETCHER:ALL timestep %d to %d is %lf(1e6)\n", bstep,estep,results[3]);
01511                 CkPrintf("SPP INFO: PAPI_L1_DCA timestep %d to %d is %lf(1e6)\n", bstep,estep,results[4]);
01512                 CkPrintf("SPP INFO: PAPI_TOT_CYC timestep %d to % is %lf(1e6)\n", bstep,estep,results[5]);
01513                 //              CkPrintf("SPP INFO: INSTRUCTION_FETCH_STALL timestep %d to %d is %lf(1e6)\n", bstep,estep,results[6]);
01514                 //              CkPrintf("SPP INFO: WALLtime timestep %d to %d is %lf\n", bstep,estep,endtime-results[NUM_PAPI_EVENTS]/CkNumPes());
01515                 CkPrintf("SPP INFO: WALLtime timestep %d to %d is %lf\n", bstep,estep,endtime-results[NUM_PAPI_EVENTS]);
01516                 CkPrintf("SPP INFO: endtime %lf avgtime %lf tottime %lf\n", endtime,results[NUM_PAPI_EVENTS]/CkNumPes(),results[NUM_PAPI_EVENTS] );
01517 #else
01518                 if(CkpvAccess(papiEvents)[0] == PAPI_FP_INS){
01519                         double totalFPIns = results[0];
01520                         if(CkpvAccess(papiEvents)[1] == PAPI_FMA_INS) totalFPIns += (results[1]*2);
01521                         CkPrintf("FLOPS INFO: from timestep %d to %d, the total FP instruction of NAMD is %lf(x1e6) per processor\n", 
01522                                          bstep, estep, totalFPIns/CkNumPes());
01523                 }else{
01524                         char nameBuf[PAPI_MAX_STR_LEN];
01525                         CkPrintf("PAPI COUNTERS INFO: from timestep %d to %d, ", 
01526                                          bstep, estep);
01527                         for(int i=0; i<NUM_PAPI_EVENTS; i++) {
01528                                 PAPI_event_code_to_name(CkpvAccess(papiEvents)[i], nameBuf);
01529                                 CkPrintf("%s is %lf(x1e6), ", nameBuf, results[i]/CkNumPes());
01530                         }
01531                         CkPrintf("per processor\n");
01532                 }               
01533 #endif
01534         }
01535         delete msg;     
01536         state->controller->resumeAfterPapiMeasureBarrier(curMFlopStep);
01537 #endif
01538 }

void Node::resumeAfterTraceBarrier ( CkReductionMsg *  msg  ) 

Definition at line 1440 of file Node.C.

References NamdState::controller, curTimeStep, Controller::resumeAfterTraceBarrier(), and state.

01440                                                      {
01441         CmiAssert(CmiMyPe()==0);
01442         delete msg;     
01443         state->controller->resumeAfterTraceBarrier(curTimeStep);
01444 }

void Node::run (  ) 

Definition at line 1116 of file Node.C.

References ResizeArrayIter< T >::begin(), DebugM, ResizeArrayIter< T >::end(), PatchMap::homePatchList(), iINFO(), iout, memusage_MB(), PatchMap::Object(), NamdState::runController(), and state.

Referenced by messageRun().

01117 {
01118   // Start Controller (aka scalar Sequencer) on Pe(0)
01119 //  printf("\n\n I am in Node.C in run method about to call  state->runController\n\n");
01120   if ( ! CkMyPe() ) {
01121     state->runController();
01122   }
01123 
01124   DebugM(4, "Starting Sequencers\n");
01125   // Run Sequencer on each HomePatch - i.e. start simulation
01126   HomePatchList *hpl = PatchMap::Object()->homePatchList();
01127   ResizeArrayIter<HomePatchElem> ai(*hpl);
01128   for (ai=ai.begin(); ai != ai.end(); ai++) {
01129     HomePatch *patch = (*ai).patch;
01130 //CkPrintf("Proc#%d in Node calling Sequencer ",CkMyPe());
01131     patch->runSequencer();
01132   }
01133 
01134   if (!CkMyPe()) {
01135     double newTime = CmiWallTimer();
01136     iout << iINFO << "Startup phase " << startupPhase-1 << " took "
01137          << newTime - startupTime << " s, "
01138          << memusage_MB() << " MB of memory in use\n";
01139     iout << iINFO << "Finished startup at " << newTime << " s, "
01140          << memusage_MB() << " MB of memory in use\n\n" << endi;
01141     fflush(stdout);
01142   }
01143   
01144 }

void Node::saveMolDataPointers ( NamdState  ) 

Definition at line 1401 of file Node.C.

References NamdState::configList, configList, NamdState::molecule, molecule, NamdState::parameters, parameters, NamdState::pdb, pdb, NamdState::simParameters, simParameters, and state.

01402 {
01403   this->molecule = state->molecule;
01404   this->parameters = state->parameters;
01405   this->simParameters = state->simParameters;
01406   this->configList = state->configList;
01407   this->pdb = state->pdb;
01408   this->state = state;
01409 }

void Node::scriptBarrier ( CkQdMsg *   ) 

Definition at line 1155 of file Node.C.

01155                                       {
01156   delete qmsg;
01157   //script->awaken();
01158 }

void Node::scriptParam ( ScriptParamMsg  ) 

Definition at line 1160 of file Node.C.

References ScriptParamMsg::param, SimParameters::scriptSet(), simParameters, and ScriptParamMsg::value.

01160                                           {
01161   simParameters->scriptSet(msg->param,msg->value);
01162   delete msg;
01163 }

void Node::sendCheckpointReq ( int  remote,
const char *  key,
int  task,
Lattice lat,
ControllerState cs 
)

Definition at line 1292 of file Node.C.

References CheckpointMsg::checkpoint, CheckpointMsg::key, Controller::checkpoint::lattice, CheckpointMsg::replica, Controller::checkpoint::state, and CheckpointMsg::task.

Referenced by Controller::algorithm().

01292                                                                                                      {
01293   CheckpointMsg *msg = new (1+strlen(key),0) CheckpointMsg;
01294   msg->replica = CmiMyPartition();
01295   msg->task = task;
01296   msg->checkpoint.lattice = lat;
01297   msg->checkpoint.state = cs;
01298   strcpy(msg->key,key);
01299   envelope *env = UsrToEnv(CheckpointMsg::pack(msg));
01300   CmiSetHandler(env,recvCheckpointCReq_index);
01301 #if CMK_HAS_PARTITION
01302   CmiInterSyncSendAndFree(CkMyPe(),remote,env->getTotalsize(),(char*)env);
01303 #else
01304   CmiSyncSendAndFree(CkMyPe(),env->getTotalsize(),(char*)env);
01305 #endif
01306 }

void Node::sendEnableEarlyExit ( void   ) 

Definition at line 1371 of file Node.C.

Referenced by enableEarlyExit().

01371                                    {
01372   CkQdMsg *msg = new CkQdMsg;
01373   CProxy_Node nodeProxy(thisgroup);
01374   nodeProxy[0].recvEnableEarlyExit(msg);
01375 }

void Node::sendEnableExitScheduler ( void   ) 

Definition at line 1344 of file Node.C.

Referenced by enableExitScheduler().

01344                                        {
01345   //CmiPrintf("sendEnableExitScheduler\n");
01346   CkQdMsg *msg = new CkQdMsg;
01347   CProxy_Node nodeProxy(thisgroup);
01348   nodeProxy[0].recvEnableExitScheduler(msg);
01349 }

void Node::setScript ( ScriptTcl s  )  [inline]

Definition at line 192 of file Node.h.

Referenced by after_backend_init().

00192 { script = s; }

void Node::startHPM (  ) 

Definition at line 1412 of file Node.C.

01412                     {
01413 #if USE_HPM
01414   HPM_Start("500 steps", localRankOnNode);
01415 #endif
01416 }

void Node::startUp ( CkQdMsg *   ) 

Definition at line 423 of file Node.C.

References startup().

00423                                 {
00424   delete qmsg;
00425   (CProxy_Node(CkpvAccess(BOCclass_group).node)).startup();
00426 }

void Node::startup (  ) 

Definition at line 434 of file Node.C.

References Lattice::a_p(), AtomMap::allocateMap(), WorkDistrib::assignNodeToPatch(), Lattice::b_p(), SimParameters::bondedCUDA, ProxyMgr::buildProxySpanningTree(), Lattice::c_p(), computeMap, computeMgr, ComputeMgr::createComputes(), WorkDistrib::createHomePatches(), LdbCoordinator::createLoadBalancer(), ProxyMgr::createProxies(), DebugM, WorkDistrib::distributeHomePatches(), endi(), BackEnd::exit(), PDB::get_extremes(), ProxyMgr::getRecvSpanning(), ProxyMgr::getSendSpanning(), iINFO(), LdbCoordinator::initialize(), iout, SimParameters::isRecvSpanningTreeOn(), SimParameters::isSendSpanningTreeOn(), SimParameters::lattice, SimParameters::mallocTest, mallocTest_size, WorkDistrib::mapComputes(), memusage_MB(), messageRun(), molecule, SimParameters::MSMOn, SimParameters::MsmSerialOn, NAMD_bug(), node_molecule, node_parameters, node_simParameters, SimParameters::nonbonded_select(), Molecule::numAtoms, ComputeMap::numComputes(), numPatches, Sync::Object(), LdbCoordinator::Object(), PatchMap::Object(), ProxyMgr::Object(), AtomMap::Object(), ComputeMap::Object(), Sync::openSync(), output, outputPatchComputeMaps(), parameters, WorkDistrib::patchMapInit(), pdb, SimParameters::PMEOn, proxyRecvSpanning, proxySendSpanning, SimParameters::proxyTreeBranchFactor, rand, SimParameters::randomSeed, registerUserEventsForAllComputeObjs(), WorkDistrib::sendComputeMap(), WorkDistrib::sendPatchMap(), WorkDistrib::setPatchMapArrived(), ProxyMgr::setProxyTreeBranchFactor(), ProxyMgr::setRecvSpanning(), ProxyMgr::setSendSpanning(), simParameters, SimParameters::simulatedNodeSize, SimParameters::simulatedPEs, SimParameters::simulateInitialMapping, MsmInitMsg::smax, MsmInitMsg::smin, Random::split(), SimParameters::useCkLoop, SimParameters::useCUDA2, SimParameters::useOptPME, SimParameters::usePMECUDA, and workDistrib.

Referenced by messageStartUp(), and startUp().

00434                    {
00435   int gotoRun = false;
00436   double newTime;
00437 
00438   if (!CkMyPe()) {
00439     if (!startupPhase) {
00440       iout << iINFO << "\n";
00441       startupTime = CmiWallTimer();
00442       iout << iINFO << "Entering startup at " << startupTime << " s, ";
00443     } else {
00444       newTime = CmiWallTimer();
00445       iout << iINFO << "Startup phase " << startupPhase-1 << " took "
00446            << newTime - startupTime << " s, ";
00447       startupTime = newTime;
00448     }
00449     iout << memusage_MB() << " MB of memory in use\n" << endi;
00450     fflush(stdout);
00451   }
00452   switch (startupPhase) {
00453 
00454   case 0:
00455     computeMap = ComputeMap::Object();
00456     namdOneCommInit(); // Namd1.X style
00457   break;
00458 
00459   case 1:
00460       bindBocVars();
00461 
00462     // send & receive molecule, simparameters... (Namd1.X style)
00463     if (CkMyPe()) {
00464       namdOneRecv();
00465     } else {
00466       namdOneSend();
00467     }
00468   break;
00469 
00470   case 2:
00471     // fix up one-per-node objects (for SMP version)
00472     simParameters = node_simParameters;
00473     parameters = node_parameters;
00474     molecule = node_molecule;
00475 
00476     SimParameters::nonbonded_select();
00477     
00478     #if !CMK_SMP || ! USE_CKLOOP
00479     //the CkLoop library should be only used in SMP mode
00480     simParameters->useCkLoop = 0;
00481     #else
00482     if ( CkNumPes() < 2 * CkNumNodes() ) simParameters->useCkLoop = 0;
00483     #endif
00484 
00485 
00486     if ( simParameters->mallocTest ) {
00487       if (!CkMyPe()) {
00488         mallocTest_size = 0;
00489         CkStartQD(CkIndex_Node::mallocTestQd((CkQdMsg*)0),&thishandle);
00490       }
00491       return;
00492     }
00493 
00494       
00495         #ifdef MEASURE_NAMD_WITH_PAPI
00496         if(simParameters->papiMeasure) namdInitPapiCounters();  
00497         #endif
00498     
00499     #ifdef MEM_OPT_VERSION
00500     //At this point, each Node object has received the simParameters,
00501     //parameters and the atom signatures info from the master Node
00502     //(proc 0). It's time to initialize the parallel IO manager and
00503     //read the binary per-atom file --Chao Mei
00504 
00505     //Step 1: initialize the parallel IO manager per Node
00506     ioMgr->initialize(this);
00507     #endif
00508 
00509   break;
00510 
00511   case 3:
00512 
00513     #ifdef MEM_OPT_VERSION
00514     //Step 2: read the binary per-atom files (signater index, coordinates etc.)
00515     ioMgr->readPerAtomInfo();
00516     #endif
00517 
00518   break;
00519 
00520   case 4:
00521 
00522     #ifdef MEM_OPT_VERSION
00523     //Step 3: update counters of tuples and exclusions inside Molecule object
00524     ioMgr->updateMolInfo();
00525 
00526     //Step 4: prepare distributing the atoms to neighboring procs if necessary
00527     ioMgr->migrateAtomsMGrp();
00528 
00529     //step 5: initialize patchMap and send it to every other processors
00530     //to decide atoms to patch distribution on every input processor
00531     if(!CkMyPe()) {
00532         workDistrib->patchMapInit(); // create space division
00533         workDistrib->sendPatchMap();
00534     }
00535     #endif
00536 
00537     #if USE_HPM
00538     HPM_Init(localRankOnNode);
00539     #endif    
00540 
00541     // take care of inital thread setting
00542     threadInit();
00543 
00544     // create blank AtomMap
00545     AtomMap::Object()->allocateMap(molecule->numAtoms);
00546 
00547     if (!CkMyPe()) {
00548       if (simParameters->useOptPME)
00549         CkpvAccess(BOCclass_group).computePmeMgr = CProxy_OptPmeMgr::ckNew();
00550       else 
00551 #ifdef NAMD_CUDA
00552       if (simParameters->usePMECUDA) {
00553         // computePmeCUDAMgr was created in BackEnd.C
00554         // This empty branch is to avoid initializing ComputePmeMgr
00555       } else
00556 #endif
00557       if (simParameters->PMEOn) {
00558         CkpvAccess(BOCclass_group).computePmeMgr = CProxy_ComputePmeMgr::ckNew();
00559       }
00560         #ifdef OPENATOM_VERSION
00561         if ( simParameters->openatomOn ) { 
00562           CkpvAccess(BOCclass_group).computeMoaMgr = CProxy_ComputeMoaMgr::ckNew();
00563         }
00564         #endif // OPENATOM_VERSION
00565 
00566     }
00567     
00568     #ifdef OPENATOM_VERSION
00569     if ( simParameters->openatomOn ) {
00570       // if ( ! CkMyPe() ) { 
00571         CkCallback doneMoaStart(CkIndexmain::doneMoaSetup(), thishandle); 
00572         startOA(simParameters->moaDriverFile, simParameters->moaPhysicsFile, doneMoaStart);
00573       // }
00574     }
00575     #endif // OPENATOM_VERSION
00576   
00577     // BEGIN LA
00578     rand = new Random(simParameters->randomSeed);
00579     rand->split(CkMyPe(), CkNumPes());
00580     // END LA
00581 
00582   break;
00583 
00584   case 5:
00585     #ifdef MEM_OPT_VERSION
00586     //Now, every input proc has received all the atoms necessary
00587     //to decide the patches those atoms belong to
00588     
00589     //step 1: integrate the migrated atoms into the atom list that
00590     //contains the initally distributed atoms, and sort the atoms
00591     //based on hydrogenList value
00592     ioMgr->integrateMigratedAtoms();
00593 
00594     //step 2: integrate the cluster size of each atom on each output proc
00595     ioMgr->integrateClusterSize();
00596 
00597     //step 3: calculate the number of atoms in each patch on every
00598     //input procs (atoms belonging to a patch may lie on different
00599     //procs), and reduce such info on proc 0. Such info is required
00600     //for determing which node a particular patch is assigned to.
00601     ioMgr->calcAtomsInEachPatch();
00602 
00603     //set to false to re-send PatchMap later
00604     workDistrib->setPatchMapArrived(false);
00605     #endif
00606     break;
00607   case 6:     
00608     if(simParameters->isSendSpanningTreeOn()) {                         
00609                         ProxyMgr::Object()->setSendSpanning();
00610     }
00611     if(simParameters->isRecvSpanningTreeOn()) {                         
00612                         ProxyMgr::Object()->setRecvSpanning();
00613     }
00614     if(simParameters->proxyTreeBranchFactor) {
00615                         ProxyMgr::Object()->setProxyTreeBranchFactor(simParameters->proxyTreeBranchFactor);
00616     }
00617     #ifdef PROCTRACE_DEBUG
00618     DebugFileTrace::Instance("procTrace");
00619     #endif
00620 
00621     if (!CkMyPe()) {
00622       output = new Output; // create output object just on PE(0)
00623 
00624       #ifndef MEM_OPT_VERSION
00625       workDistrib->patchMapInit(); // create space division
00626       workDistrib->createHomePatches(); // load atoms into HomePatch(es)
00627       #endif
00628       
00629       workDistrib->assignNodeToPatch();
00630       workDistrib->mapComputes();         
00631       //ComputeMap::Object()->printComputeMap();
00632 
00633       // For MIC runs, take the additional step after the compute map has been created to
00634       //   assign the various computes to either the host or the device.  This info will
00635       //   be distributed across the PEs.
00636       #if defined(NAMD_MIC)
00637         mic_initHostDeviceLDB();
00638       #endif
00639           
00640           if(simParameters->simulateInitialMapping) {
00641           iout << iINFO << "Simulating initial mapping with " << simParameters->simulatedPEs
00642                           << " PEs with " << simParameters->simulatedNodeSize << " PEs per node\n" << endi;
00643                   outputPatchComputeMaps("init_mapping", 0);
00644                   iout << iINFO << "Simulating initial mapping is done, now NAMD exits\n" << endi;
00645                   BackEnd::exit();
00646           }
00647 
00648       registerUserEventsForAllComputeObjs();
00649 
00650       //in MEM_OPT_VERSION, patchMap is resent
00651       //because they have been updated since creation including
00652       //#atoms per patch, the proc a patch should stay etc. --Chao Mei
00653       workDistrib->sendPatchMap();
00654       #if defined(NODEAWARE_PROXY_SPANNINGTREE) && defined(USE_NODEPATCHMGR)
00655       CProxy_NodeProxyMgr npm(CkpvAccess(BOCclass_group).nodeProxyMgr);
00656       //a node broadcast
00657       npm.createProxyInfo(PatchMap::Object()->numPatches());
00658       #endif
00659     }
00660     {
00661         #if defined(NODEAWARE_PROXY_SPANNINGTREE) && defined(USE_NODEPATCHMGR)
00662         CProxy_NodeProxyMgr npm(CkpvAccess(BOCclass_group).nodeProxyMgr);
00663         if(CkMyRank()==0) {
00664             //just need to register once
00665             npm[CkMyNode()].ckLocalBranch()->registerLocalProxyMgr(CkpvAccess(BOCclass_group).proxyMgr);
00666         }
00667         npm[CkMyNode()].ckLocalBranch()->registerLocalPatchMap(CkMyRank(), PatchMap::Object());
00668         #endif
00669     }
00670   break;
00671 
00672   case 7:
00673 #ifdef CHARM_HAS_MSA
00674     if ( simParameters->MSMOn && ! simParameters->MsmSerialOn ) {
00675       CProxy_ComputeMsmMsaMgr msm(CkpvAccess(BOCclass_group).computeMsmMsaMgr);
00676       msm[CkMyPe()].initialize(new CkQdMsg);
00677     }
00678 #else
00679     if ( simParameters->MSMOn && ! simParameters->MsmSerialOn ) {
00680       CProxy_ComputeMsmMgr msm(CkpvAccess(BOCclass_group).computeMsmMgr);
00681       MsmInitMsg *msg = new MsmInitMsg;
00682       Lattice lattice = simParameters->lattice;  // system lattice vectors
00683       ScaledPosition smin=0, smax=0;
00684       if (lattice.a_p() && lattice.b_p() && lattice.c_p()) {
00685         msg->smin = smin;
00686         msg->smax = smax;
00687         msm[CkMyPe()].initialize(msg);  // call from my own PE
00688       }
00689       else if ( ! CkMyPe() ) {
00690         pdb->get_extremes(smin, smax);  // only available on PE 0
00691         msg->smin = smin;
00692         msg->smax = smax;
00693         msm.initialize(msg);  // broadcast to chare group
00694       }
00695 
00696       /*
00697       CProxy_Node nd(CkpvAccess(BOCclass_group).node);
00698       Node *node = nd.ckLocalBranch();
00699       ScaledPosition smin, smax;
00700       node->pdb->get_extremes(smin, smax);
00701       msg->smin = smin;                       // extreme positions in system
00702       msg->smax = smax;
00703       msm[CkMyPe()].initialize(msg);
00704       */
00705     }
00706 #endif
00707 
00708     if ( simParameters->PMEOn ) {
00709       if ( simParameters->useOptPME ) {
00710         CProxy_OptPmeMgr pme(CkpvAccess(BOCclass_group).computePmeMgr);
00711         pme[CkMyPe()].initialize(new CkQdMsg);
00712       }
00713       else {
00714         #ifdef OPENATOM_VERSION
00715         if ( simParameters->openatomOn ) { 
00716           CProxy_ComputeMoaMgr moa(CkpvAccess(BOCclass_group).computeMoaMgr); 
00717           moa[CkMyPe()].initialize(new CkQdMsg);
00718         }
00719         #endif // OPENATOM_VERSION
00720 #ifdef NAMD_CUDA
00721         if ( simParameters->usePMECUDA ) {
00722           if(CkMyRank()==0) {
00723             CProxy_ComputePmeCUDAMgr pme(CkpvAccess(BOCclass_group).computePmeCUDAMgr);
00724             pme.ckLocalBranch()->initialize(new CkQdMsg);  // must run on pe 0 to call ckNew
00725           }
00726         } else 
00727 #endif
00728         {
00729           CProxy_ComputePmeMgr pme(CkpvAccess(BOCclass_group).computePmeMgr);
00730           pme[CkMyPe()].initialize(new CkQdMsg);          
00731         }
00732       }
00733     }
00734 #ifdef NAMD_CUDA
00735     if ( (simParameters->useCUDA2 || simParameters->bondedCUDA) && CkMyRank()==0 ) {
00736       CProxy_ComputeCUDAMgr nb(CkpvAccess(BOCclass_group).computeCUDAMgr);
00737       nb[CkMyNode()].initialize(new CkQdMsg);
00738     }
00739 #endif
00740 
00741     if (!CkMyPe()) {
00742       workDistrib->sendComputeMap();
00743     }
00744 
00745     #ifdef MEM_OPT_VERSION
00746     //migrate atoms to HomePatch processors
00747     ioMgr->sendAtomsToHomePatchProcs();
00748     #endif
00749     break;
00750     
00751   case 8:
00752     // part 2 of MSM init
00753     if ( simParameters->MSMOn && ! simParameters->MsmSerialOn ) {
00754       CProxy_ComputeMsmMgr msm(CkpvAccess(BOCclass_group).computeMsmMgr);
00755       msm[CkMyPe()].initialize_create();  // call from my own PE
00756     }
00757 
00758     if ( simParameters->PMEOn ) {
00759       if ( simParameters->useOptPME ) {
00760         CProxy_OptPmeMgr pme(CkpvAccess(BOCclass_group).computePmeMgr);
00761         pme[CkMyPe()].initialize_pencils(new CkQdMsg);
00762       }
00763       else {
00764         #ifdef OPENATOM_VERSION
00765         if ( simParameters->openatomOn ) { 
00766           CProxy_ComputeMoaMgr moa(CkpvAccess(BOCclass_group).computeMoaMgr); 
00767           moa[CkMyPe()].initWorkers(new CkQdMsg);
00768         }
00769         #endif // OPENATOM_VERSION
00770 #ifdef NAMD_CUDA
00771         if ( simParameters->usePMECUDA ) {
00772           if(CkMyRank()==0) {
00773             CProxy_ComputePmeCUDAMgr pme(CkpvAccess(BOCclass_group).computePmeCUDAMgr);
00774             pme[CkMyNode()].initialize_pencils(new CkQdMsg);
00775           }
00776         } else
00777 #endif
00778         {
00779           CProxy_ComputePmeMgr pme(CkpvAccess(BOCclass_group).computePmeMgr);
00780           pme[CkMyPe()].initialize_pencils(new CkQdMsg);          
00781         }
00782       }
00783     }
00784 #ifdef CHARM_HAS_MSA
00785     else if ( simParameters->MSMOn && ! simParameters->MsmSerialOn ) {
00786       CProxy_ComputeMsmMsaMgr msm(CkpvAccess(BOCclass_group).computeMsmMsaMgr);
00787       msm[CkMyPe()].initWorkers(new CkQdMsg);
00788     }
00789 #else
00790     else if ( simParameters->MSMOn && ! simParameters->MsmSerialOn ) {
00791       CProxy_ComputeMsmMgr msm(CkpvAccess(BOCclass_group).computeMsmMgr);
00792       msm[CkMyPe()].update(new CkQdMsg);
00793     }
00794 #endif
00795 
00796     #ifdef MEM_OPT_VERSION
00797     //Now every processor has all the atoms it needs to create the HomePatches.
00798     //The HomePatches are created in parallel on every home patch procs.
00799     ioMgr->createHomePatches();
00800     #else
00801     if (!CkMyPe()) {
00802       workDistrib->distributeHomePatches();          
00803     }
00804     #endif
00805   break;
00806 
00807   case 9:
00808     if ( simParameters->PMEOn ) {
00809       if ( simParameters->useOptPME ) {
00810         CProxy_OptPmeMgr pme(CkpvAccess(BOCclass_group).computePmeMgr);
00811         pme[CkMyPe()].activate_pencils(new CkQdMsg);
00812       }
00813       else {
00814         #ifdef OPENATOM_VERSION
00815         if ( simParameters->openatomOn ) { 
00816           CProxy_ComputeMoaMgr moa(CkpvAccess(BOCclass_group).computeMoaMgr); 
00817           moa[CkMyPe()].startWorkers(new CkQdMsg);
00818         }
00819         #endif // OPENATOM_VERSION
00820 #ifdef NAMD_CUDA
00821         if ( simParameters->usePMECUDA ) {
00822           if(CkMyRank()==0) {
00823             CProxy_ComputePmeCUDAMgr pme(CkpvAccess(BOCclass_group).computePmeCUDAMgr);
00824             pme[CkMyNode()].activate_pencils(new CkQdMsg);
00825           }
00826         } else
00827 #endif
00828         {
00829           CProxy_ComputePmeMgr pme(CkpvAccess(BOCclass_group).computePmeMgr);
00830           pme[CkMyPe()].activate_pencils(new CkQdMsg);          
00831         }
00832       }
00833     }
00834 #ifdef CHARM_HAS_MSA
00835     else if ( simParameters->MSMOn && ! simParameters->MsmSerialOn ) {
00836       CProxy_ComputeMsmMsaMgr msm(CkpvAccess(BOCclass_group).computeMsmMsaMgr);
00837       msm[CkMyPe()].startWorkers(new CkQdMsg);
00838     }
00839 #else
00840     /*
00841     else if ( simParameters->MSMOn && ! simParameters->MsmSerialOn ) {
00842       CProxy_ComputeMsmMgr msm(CkpvAccess(BOCclass_group).computeMsmMgr);
00843       //msm[CkMyPe()].startWorkers(new CkQdMsg);
00844     }
00845     */
00846 #endif
00847 
00848     proxyMgr->createProxies();  // need Home patches before this
00849     if (!CkMyPe()) LdbCoordinator::Object()->createLoadBalancer();
00850 
00851 #ifdef NAMD_TCL
00852     // TclInitSubsystems() has a race condition so we create one interp per node here
00853     if (CkMyPe() && CkMyNodeSize() > 1 && ! CkMyRank()) Tcl_DeleteInterp(Tcl_CreateInterp());
00854 #endif
00855 
00856 #ifdef USE_NODEPATCHMGR
00857         //at this point, PatchMap info has been recved on PEs. It is time to create
00858         //the home patch spanning tree for receiving proxy list info
00859         if(proxyMgr->getSendSpanning() || proxyMgr->getRecvSpanning()) {
00860                 if(CkMyRank()==0) {
00861                         CProxy_NodeProxyMgr npm(CkpvAccess(BOCclass_group).nodeProxyMgr);
00862                         npm[CkMyNode()].ckLocalBranch()->createSTForHomePatches(PatchMap::Object());
00863                 }
00864         }
00865 #endif
00866 
00867   break;
00868 
00869   case 10:
00870 
00871     // DMK - DEBUG - If, in MIC runs, the debug option to dump all the compute maps to files
00872     //   for debugging/verification purposes has been enabled, have each PE do so now.
00873     #if defined(NAMD_MIC)
00874       mic_dumpHostDeviceComputeMap();
00875     #endif
00876 
00877     if (!CkMyPe()) {
00878       iout << iINFO << "CREATING " << ComputeMap::Object()->numComputes()
00879            << " COMPUTE OBJECTS\n" << endi;
00880     }
00881     DebugM(4,"Creating Computes\n");
00882     computeMgr->createComputes(ComputeMap::Object());
00883     DebugM(4,"Building Sequencers\n");
00884     buildSequencers();
00885     DebugM(4,"Initializing LDB\n");
00886     LdbCoordinator::Object()->initialize(PatchMap::Object(),ComputeMap::Object());
00887   break;
00888 
00889   case 11:
00890     // computes may create proxies on the fly so put these in separate phase
00891     Sync::Object()->openSync();  // decide if to open local Sync 
00892     if (proxySendSpanning || proxyRecvSpanning ) proxyMgr->buildProxySpanningTree();
00893 #ifdef CMK_BALANCED_INJECTION_API
00894     if(CkMyRank() == 0){
00895       // CkPrintf("[%d] get retrieved BI=%d\n",CkMyPe(),balancedInjectionLevel);
00896       ck_set_GNI_BIConfig(balancedInjectionLevel);
00897       // CkPrintf("[%d] set retrieved BI=%d\n",CkMyPe(),ck_get_GNI_BIConfig());
00898     }
00899 #endif
00900 
00901   break;
00902 
00903   case 12:
00904     {
00905         //For debugging
00906         /*if(!CkMyPe()){
00907         FILE *dumpFile = fopen("/tmp/NAMD_Bench.dump", "w");
00908         dumpbench(dumpFile);
00909         NAMD_die("Normal execution\n");
00910         }*/
00911     }
00912     #ifdef MEM_OPT_VERSION
00913     //free space in the Molecule object that are not used anymore
00914     ioMgr->freeMolSpace();
00915     #endif
00916     gotoRun = true;
00917   break;
00918 
00919   default:
00920     NAMD_bug("Startup Phase has a bug - check case statement");
00921   break;
00922 
00923   }
00924 
00925   startupPhase++;
00926   if (!CkMyPe()) {
00927     if (!gotoRun) {
00928       CkStartQD(CkIndex_Node::startUp((CkQdMsg*)0),&thishandle);
00929     } else {
00930       Node::messageRun();
00931     }
00932   }
00933 }

void Node::stopHPM (  ) 

Definition at line 1418 of file Node.C.

01418                    {
01419 #if USE_HPM
01420   HPM_Stop("500 steps", localRankOnNode);
01421   HPM_Print(CkMyPe(), localRankOnNode);
01422 #endif
01423 }

void Node::traceBarrier ( int  turnOnTrace,
int  step 
)

Definition at line 1425 of file Node.C.

References curTimeStep.

01425                                                 {
01426         curTimeStep = step;
01427         if(turnOnTrace) traceBegin();
01428         else traceEnd();
01429 
01430     if(turnOnTrace) CmiTurnOnStats();
01431     else CmiTurnOffStats();
01432 
01433         //CkPrintf("traceBarrier (%d) at step %d called on proc %d\n", turnOnTrace, step, CkMyPe());    
01434         CProxy_Node nd(CkpvAccess(BOCclass_group).node);
01435         CkCallback cb(CkIndex_Node::resumeAfterTraceBarrier(NULL), nd[0]);
01436         contribute(0, NULL, CkReduction::sum_int, cb);
01437         
01438 }

void Node::updateGridScale ( int  gridnum,
float  sx,
float  sy,
float  sz 
)

Definition at line 1241 of file Node.C.

References MGridforceParamsList::at_index(), DebugM, Molecule::get_gridfrc_grid(), MGridforceParams::gridforceScale, SimParameters::mgridforcelist, molecule, NAMD_bug(), GridforceGrid::set_scale(), and simParameters.

01241                                                                     {
01242     if (CmiMyRank()) return;
01243     DebugM(4, "updateGridScale(char*, int, float, float, float) called on node " << CkMyPe() << "\n" << endi);
01244        
01245     GridforceGrid *grid = molecule->get_gridfrc_grid(gridnum);
01246     if (grid == NULL) {
01247         NAMD_bug("Node::updateGridScale(char*, int, float, float, float):grid not found");
01248     }
01249     
01250     Vector scale(sx,sy,sz);
01251     simParameters->mgridforcelist.at_index(gridnum)->gridforceScale = scale;
01252     grid->set_scale( scale );
01253 
01254     DebugM(4, "updateGridScale(char*, int, float, float, float) finished\n" << endi);
01255 }

void Node::updateGridScale ( char *  key,
Vector  scale 
)

Definition at line 1216 of file Node.C.

References DebugM, MGridforceParamsList::find_key(), Molecule::get_gridfrc_grid(), MGridforceParamsList::index_for_key(), SimParameters::mgridforcelist, MGRIDFORCEPARAMS_DEFAULTKEY, molecule, NAMD_bug(), NAMD_die(), simParameters, Vector::x, Vector::y, and Vector::z.

01216                                                   {
01217     DebugM(4, "updateGridScale(char*, Vector) called on node " << CkMyPe() << "\n" << endi);
01218     
01219     int gridnum;
01220     MGridforceParams* mgridParams;
01221     if (key == NULL) {
01222         gridnum = simParameters->mgridforcelist.index_for_key(MGRIDFORCEPARAMS_DEFAULTKEY);
01223         mgridParams = simParameters->mgridforcelist.find_key(MGRIDFORCEPARAMS_DEFAULTKEY);
01224     } else {
01225         gridnum = simParameters->mgridforcelist.index_for_key(key);
01226         mgridParams = simParameters->mgridforcelist.find_key(key);
01227     }
01228 
01229     if (gridnum < 0 || mgridParams == NULL) {
01230         NAMD_die("Node::updateGridScale(char*, Vector): Could not find grid.");
01231     }
01232     
01233     GridforceGrid* grid = molecule->get_gridfrc_grid(gridnum);
01234     if (grid == NULL) {
01235         NAMD_bug("Node::updateGridScale(char*, Vector): grid not found");
01236     }
01237     CProxy_Node(thisgroup).updateGridScale(gridnum, scale.x, scale.y, scale.z);
01238     
01239     DebugM(4, "updateGridScale(char*, Vector) finished\n" << endi);
01240 }


Member Data Documentation

AtomMap* Node::atomMap [protected]

Definition at line 201 of file Node.h.

Referenced by Node(), and ~Node().

colvarmodule* Node::colvars

Definition at line 185 of file Node.h.

Referenced by colvarproxy_namd::colvarproxy_namd(), and Node().

ComputeMap* Node::computeMap [protected]

Definition at line 203 of file Node.h.

Referenced by startup(), and ~Node().

ComputeMgr* Node::computeMgr

Definition at line 170 of file Node.h.

Referenced by Sequencer::integrate(), Sequencer::minimize(), resendMolecule(), and startup().

ConfigList* Node::configList

Definition at line 180 of file Node.h.

Referenced by colvarproxy_namd::colvarproxy_namd(), WorkDistrib::createAtomLists(), GlobalMasterSymmetry::GlobalMasterSymmetry(), Node(), ComputeQMMgr::recvPntChrg(), and saveMolDataPointers().

Vector* Node::coords

Definition at line 186 of file Node.h.

Referenced by ScriptTcl::measure(), Tcl_centerOfMass(), Tcl_centerOfNumber(), Tcl_loadCoords(), and Tcl_radiusOfGyration().

int Node::curMFlopStep

Definition at line 157 of file Node.h.

Referenced by papiMeasureBarrier(), and resumeAfterPapiMeasureBarrier().

int Node::curTimeStep

Definition at line 152 of file Node.h.

Referenced by resumeAfterTraceBarrier(), and traceBarrier().

IMDOutput* Node::imd

Definition at line 184 of file Node.h.

Referenced by Output::coordinate(), GlobalMasterIMD::get_vmd_forces(), GlobalMasterIMD::GlobalMasterIMD(), Node(), and Controller::printEnergies().

float Node::initRSS

Definition at line 136 of file Node.h.

float Node::initVM

Definition at line 136 of file Node.h.

LdbCoordinator* Node::ldbCoordinator [protected]

Definition at line 204 of file Node.h.

int Node::mallocTest_size

Definition at line 130 of file Node.h.

Referenced by mallocTestQd(), and startup().

Molecule* Node::molecule

Definition at line 177 of file Node.h.

Referenced by Sequencer::addMovDragToPosition(), Sequencer::addRotDragToPosition(), WorkDistrib::assignNodeToPatch(), ComputeNonbondedCUDA::build_exclusions(), Controller::calcPressure(), colvarproxy_namd::calculate(), colvarproxy_namd::check_atom_id(), Controller::compareChecksums(), ImproperElem::computeForce(), DihedralElem::computeForce(), BondElem::computeForce(), AngleElem::computeForce(), Controller::Controller(), WorkDistrib::createAtomLists(), ComputeMgr::createComputes(), ComputeStir::doForce(), ComputeRestraints::doForce(), ComputeGridForce::doForce(), ComputeConsTorque::doForce(), ComputeConsForce::doForce(), ComputePme::doQMWork(), ComputeNonbondedCUDA::doWork(), dumpbench(), ComputeNonbondedCUDA::finishWork(), GlobalMasterEasy::GlobalMasterEasy(), GlobalMasterFreeEnergy::GlobalMasterFreeEnergy(), GlobalMasterSymmetry::GlobalMasterSymmetry(), GlobalMasterTMD::GlobalMasterTMD(), HomePatch::hardWallDrude(), colvarproxy_namd::init_atom_group(), ParallelIOMgr::initialize(), ComputeQM::initialize(), Sequencer::langevinPiston(), Sequencer::langevinVelocities(), Sequencer::langevinVelocitiesBBK1(), Sequencer::langevinVelocitiesBBK2(), ComputeHomeTuples< AnisoElem, aniso, aniso >::loadTuples(), HomePatch::loweAndersenVelocities(), HomePatch::minimize_rattle2(), HomePatch::mollyAverage(), HomePatch::mollyMollify(), Controller::multigatorCalcEnthalpy(), Node(), WorkDistrib::patchMapInit(), Controller::printDynamicsEnergies(), Controller::printEnergies(), Controller::printMinimizeEnergies(), HomePatch::qmSwapAtoms(), HomePatch::rattle1old(), HomePatch::rattle2(), Controller::receivePressure(), ComputeMgr::recvComputeConsForceMsg(), ComputeMsmSerialMgr::recvCoord(), ComputeGBISserMgr::recvCoord(), ComputeFmmSerialMgr::recvCoord(), ComputeExtMgr::recvCoord(), ComputeQMMgr::recvPartQM(), Sequencer::reloadCharges(), reloadCharges(), reloadGridforceGrid(), reloadStructure(), Controller::rescaleaccelMD(), resendMolecule(), resendMolecule2(), saveMolDataPointers(), ComputeQM::saveResults(), ComputeNonbondedUtil::select(), HomePatch::setGBISIntrinsicRadii(), HomePatch::setLcpoType(), startup(), Tcl_centerOfMass(), Tcl_centerOfNumber(), Tcl_loadCoords(), Tcl_radiusOfGyration(), Sequencer::tcoupleVelocities(), colvarproxy_namd::update_atom_properties(), colvarproxy_namd::update_group_properties(), updateGridScale(), and wrap_coor_int().

Output* Node::output

Definition at line 183 of file Node.h.

Referenced by SimParameters::close_dcdfile(), SimParameters::close_veldcdfile(), CollectionMaster::disposeForces(), CollectionMaster::disposePositions(), CollectionMaster::disposeVelocities(), Node(), recvReplicaDcdData(), recvReplicaDcdInit(), startup(), and ~Node().

Parameters* Node::parameters

Definition at line 178 of file Node.h.

Referenced by ComputeNonbondedPair::ComputeNonbondedPair(), ComputeNonbondedSelf::ComputeNonbondedSelf(), ComputeNonbondedCUDA::doWork(), LJTable::LJTable(), ComputeHomeTuples< AnisoElem, aniso, aniso >::loadTuples(), Node(), resendMolecule(), resendMolecule2(), saveMolDataPointers(), ComputeNonbondedUtil::select(), and startup().

PatchMap* Node::patchMap [protected]

Definition at line 202 of file Node.h.

Referenced by Node(), and ~Node().

PDB* Node::pdb

Definition at line 181 of file Node.h.

Referenced by WorkDistrib::createAtomLists(), Node(), WorkDistrib::patchMapInit(), reloadStructure(), saveMolDataPointers(), and startup().

Random* Node::rand

Definition at line 173 of file Node.h.

Referenced by ComputeNonbondedPair::ComputeNonbondedPair(), ComputeNonbondedSelf::ComputeNonbondedSelf(), startup(), and ~Node().

SimParameters* Node::simParameters

Definition at line 179 of file Node.h.

Referenced by HomePatch::addForceToMomentum(), HomePatch::addForceToMomentum3(), HomePatch::addVelocityToPosition(), WorkDistrib::assignNodeToPatch(), PmeZPencil::backward_fft(), PmeYPencil::backward_fft(), PmeXPencil::backward_fft(), HomePatch::buildRattleList(), Controller::calcPressure(), ComputePmeMgr::chargeGridSubmitted(), colvarproxy_namd::colvarproxy_namd(), ComputeCylindricalBC::ComputeCylindricalBC(), ComputeEwald::ComputeEwald(), ImproperElem::computeForce(), GromacsPairElem::computeForce(), DihedralElem::computeForce(), BondElem::computeForce(), AngleElem::computeForce(), ComputeFullDirect::ComputeFullDirect(), ComputeGlobal::ComputeGlobal(), ComputeHomeTuples< AnisoElem, aniso, aniso >::ComputeHomeTuples(), ComputeLCPO::ComputeLCPO(), ComputeMsm::ComputeMsm(), ComputeNonbondedCUDA::ComputeNonbondedCUDA(), ComputeNonbondedPair::ComputeNonbondedPair(), ComputeNonbondedSelf::ComputeNonbondedSelf(), ComputePme::ComputePme(), ComputeRestraints::ComputeRestraints(), ComputeSphericalBC::ComputeSphericalBC(), ComputeStir::ComputeStir(), ComputeTclBC::ComputeTclBC(), Output::coordinate(), Output::coordinateNeeded(), WorkDistrib::createAtomLists(), ComputeMgr::createComputes(), ComputeCUDAMgr::createCudaComputeNonbonded(), LdbCoordinator::createLoadBalancer(), CudaComputeNonbonded::CudaComputeNonbonded(), ComputeStir::doForce(), ComputeRestraints::doForce(), ComputeNonbondedSelf::doForce(), ComputeNonbondedPair::doForce(), ComputeGridForce::doForce(), ComputeEField::doForce(), ComputeConsTorque::doForce(), ComputeConsForce::doForce(), HomePatch::doGroupSizeCheck(), HomePatch::doMarginCheck(), HomePatch::doPairlistCheck(), CudaComputeNonbonded::doWork(), ComputeTclBC::doWork(), ComputeNonbondedCUDA::doWork(), ComputeGBISser::doWork(), dumpbench(), HomePatch::exchangeAtoms(), HomePatch::exchangeCheckpoint(), OptPmeXPencil::fft_init(), OptPmeYPencil::fft_init(), OptPmeZPencil::fft_init(), PmeXPencil::fft_init(), PmeYPencil::fft_init(), PmeZPencil::fft_init(), CudaComputeNonbonded::finishReductions(), ComputeNonbondedCUDA::finishReductions(), ComputeNonbondedCUDA::finishWork(), Output::force(), Output::forceNeeded(), PmeXPencil::forward_fft(), PmeYPencil::forward_fft(), PmeZPencil::forward_fft(), ComputePmeCUDADevice::gatherForce(), ComputePmeCUDADevice::gatherForceDone(), HomePatch::gbisComputeAfterP1(), HomePatch::gbisComputeAfterP2(), GlobalMasterIMD::get_vmd_forces(), GlobalMasterFreeEnergy::GlobalMasterFreeEnergy(), GlobalMasterIMD::GlobalMasterIMD(), GlobalMasterServer::GlobalMasterServer(), GlobalMasterSymmetry::GlobalMasterSymmetry(), GlobalMasterTMD::GlobalMasterTMD(), HomePatch::hardWallDrude(), ParallelIOMgr::initialize(), OptPmeMgr::initialize(), LdbCoordinator::initialize(), ComputeQM::initialize(), ComputePmeCUDA::initialize(), ComputePmeMgr::initialize(), ComputeMsmMgr::initialize(), ComputePmeMgr::initialize_computes(), OptPmeMgr::initialize_pencils(), ComputePmeMgr::initialize_pencils(), isPmeProcessor(), CudaComputeNonbonded::launchWork(), ComputeHomeTuples< AnisoElem, aniso, aniso >::loadTuples(), HomePatch::loweAndersenVelocities(), WorkDistrib::mapComputes(), HomePatch::minimize_rattle2(), HomePatch::mollyAverage(), HomePatch::mollyMollify(), Controller::multigatorCalcEnthalpy(), NamdHybridLB::NamdHybridLB(), Node(), ComputeNonbondedCUDA::noWork(), OptPmeCompute::OptPmeCompute(), outputPatchComputeMaps(), Patch::Patch(), WorkDistrib::patchMapInit(), HomePatch::positionsReady(), Controller::printDynamicsEnergies(), Controller::printEnergies(), HomePatch::qmSwapAtoms(), HomePatch::rattle1(), HomePatch::rattle1old(), HomePatch::rattle2(), CollectionMaster::receiveDataStream(), Controller::receivePressure(), recursive_bisect_with_curve(), ComputePmeCUDADevice::recvAtoms(), HomePatch::recvCheckpointLoad(), ComputeMsmSerialMgr::recvCoord(), ComputeFmmSerialMgr::recvCoord(), ComputeExtMgr::recvCoord(), OptPmeMgr::recvEvir(), ComputeQMMgr::recvPartQM(), ComputeNonbondedCUDA::recvYieldDevice(), ComputeNonbondedCUDA::registerPatches(), reloadGridforceGrid(), resendMolecule(), resumeAfterPapiMeasureBarrier(), ScriptTcl::run(), saveMolDataPointers(), WorkDistrib::savePatchMap(), ComputeGlobal::saveTotalForces(), scriptParam(), ComputeNonbondedUtil::select(), PmeZPencil::send_all_ungrid(), PmeYPencil::send_trans(), PmeZPencil::send_trans(), PmeYPencil::send_untrans(), PmeXPencil::send_untrans(), WorkDistrib::sendPatchMap(), ComputePmeMgr::sendTrans(), ComputePmeMgr::sendUngrid(), ComputePmeMgr::sendUntrans(), HomePatch::setGBISIntrinsicRadii(), PatchMgr::setLattice(), ComputePmeCUDAMgr::setupPencils(), ComputeNonbondedCUDA::skip(), NamdHybridLB::splitComputes(), ComputePmeCUDADevice::spreadCharge(), startup(), NamdCentLB::Strategy(), OptPmeXPencil::submit_evir(), ComputePmeMgr::submitReductions(), ComputePme::ungridForces(), OptPmeCompute::ungridForces_compute(), OptPmeCompute::ungridForces_finalize(), updateGridScale(), ComputeMgr::updateLocalComputes4(), Output::velocity(), Output::velocityNeeded(), and wrap_coor_int().

bool Node::specialTracing

Definition at line 164 of file Node.h.

Referenced by Node().

NamdState* Node::state

Definition at line 182 of file Node.h.

Referenced by Node(), recvCheckpointAck(), recvCheckpointReq(), reloadStructure(), resumeAfterPapiMeasureBarrier(), resumeAfterTraceBarrier(), run(), and saveMolDataPointers().

WorkDistrib* Node::workDistrib

Definition at line 167 of file Node.h.

Referenced by ParallelIOMgr::createHomePatches(), and startup().


The documentation for this class was generated from the following files:
Generated on Sun Sep 24 01:17:19 2017 for NAMD by  doxygen 1.4.7