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 (const 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 291 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.

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

Node::~Node ( void   ) 

Definition at line 356 of file Node.C.

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

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


Member Function Documentation

void Node::awaitBOCCheckIn (  ) 

void Node::BOCCheckIn (  ) 

void Node::earlyExit ( CkQdMsg *   ) 

Definition at line 1398 of file Node.C.

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

01398                                  {
01399   iout << iERROR << "Exiting prematurely; see error messages above.\n" << endi;
01400   if ( CmiNumPartitions() > 1 ) NAMD_quit("Exiting prematurely; see error messages above.");
01401   BackEnd::exit();
01402   delete msg;
01403 }

void Node::enableEarlyExit ( void   ) 

Definition at line 1390 of file Node.C.

References sendEnableEarlyExit().

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

01390                                {
01391   if ( CkMyPe() ) {
01392     sendEnableEarlyExit();
01393   } else {
01394     CkStartQD(CkIndex_Node::earlyExit((CkQdMsg*)0),&thishandle);
01395   }
01396 }

void Node::enableExitScheduler ( void   ) 

Definition at line 1365 of file Node.C.

References sendEnableExitScheduler().

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

01365                                    {
01366   if ( CkMyPe() ) {
01367     sendEnableExitScheduler();
01368   } else {
01369     CkStartQD(CkIndex_Node::exitScheduler((CkQdMsg*)0),&thishandle);
01370   }
01371 }

void Node::enableScriptBarrier (  ) 

Definition at line 1159 of file Node.C.

01159                                {
01160   CkStartQD(CkIndex_Node::scriptBarrier((CkQdMsg*)0),&thishandle);
01161 }

void Node::exitScheduler ( CkQdMsg *   ) 

Definition at line 1373 of file Node.C.

01373                                      {
01374   //CmiPrintf("exitScheduler %d\n",CkMyPe());
01375   CsdExitScheduler();
01376   delete msg;
01377 }

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

Definition at line 193 of file Node.h.

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

00193 { return script; } 

void Node::mallocTest ( int   ) 

Definition at line 392 of file Node.C.

References NAMD_die().

Referenced by mallocTestQd().

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

void Node::mallocTestQd ( CkQdMsg *   ) 

Definition at line 404 of file Node.C.

References mallocTest(), and mallocTest_size.

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

float Node::measureMemory (  ) 

static void Node::messageBOCCheckIn (  )  [static]

void Node::messageRun (  )  [static]

Definition at line 1115 of file Node.C.

References run().

Referenced by startup().

01115                       {
01116   (CProxy_Node(CkpvAccess(BOCclass_group).node)).run();
01117 }

void Node::messageStartUp (  )  [static]

Definition at line 420 of file Node.C.

References startup().

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

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(), TholeElem::computeForce(), ImproperElem::computeForce(), GromacsPairElem::computeForce(), DihedralElem::computeForce(), CrosstermElem::computeForce(), BondElem::computeForce(), AnisoElem::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(), colvarproxy_namd::init_tcl_pointers(), 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(), Sequencer::rescaleSoluteCharges(), ScriptTcl::run(), ComputeQM::saveResults(), ComputeGlobal::saveTotalForces(), ComputePmeUtil::select(), 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 1549 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().

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

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

Definition at line 1454 of file Node.C.

References curMFlopStep.

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

void Node::recvCheckpointAck ( CheckpointMsg  ) 

Definition at line 1346 of file Node.C.

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

Referenced by recvCheckpointCAck_handler().

01346                                                {
01347   state->controller->recvCheckpointAck(msg->checkpoint);
01348   delete msg;
01349 }

void Node::recvCheckpointReq ( CheckpointMsg  ) 

Definition at line 1324 of file Node.C.

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

Referenced by recvCheckpointCReq_handler().

01324                                                {
01325   state->controller->recvCheckpointReq(msg->key,msg->task,msg->checkpoint);
01326 
01327   int remote = msg->replica;
01328   msg->replica = CmiMyPartition();
01329   envelope *env = UsrToEnv(CheckpointMsg::pack(msg));
01330   CmiSetHandler(env,recvCheckpointCAck_index);
01331 #if CMK_HAS_PARTITION
01332   CmiInterSyncSendAndFree(CkMyPe(),remote,env->getTotalsize(),(char*)env);
01333 #else
01334   CmiSyncSendAndFree(CkMyPe(),env->getTotalsize(),(char*)env);
01335 #endif
01336 }

void Node::recvEnableEarlyExit ( CkQdMsg *   ) 

Definition at line 1385 of file Node.C.

References enableEarlyExit().

01385                                            {
01386   delete msg;
01387   enableEarlyExit();
01388 }

void Node::recvEnableExitScheduler ( CkQdMsg *   ) 

Definition at line 1359 of file Node.C.

References enableExitScheduler().

01359                                                {
01360   //CmiPrintf("recvEnableExitScheduler\n");
01361   delete msg;
01362   enableExitScheduler();
01363 }

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

Definition at line 1190 of file Node.C.

References molecule, and Molecule::reloadCharges().

01190                                               {
01191   molecule->reloadCharges(charge,n);
01192 }

void Node::reloadCharges ( const char *  filename  ) 

Definition at line 1173 of file Node.C.

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

01173                                              {
01174   FILE *file = fopen(filename,"r");
01175   if ( ! file ) NAMD_die("node::reloadCharges():Error opening charge file.");
01176 
01177   int n = molecule->numAtoms;
01178   float *charge = new float[n];
01179 
01180   for ( int i = 0; i < n; ++i ) {
01181     if ( ! fscanf(file,"%f",&charge[i]) )
01182       NAMD_die("Node::reloadCharges():Not enough numbers in charge file.");
01183   }
01184 
01185   fclose(file);
01186   CProxy_Node(thisgroup).reloadCharges(charge,n);
01187   delete [] charge;
01188 }

void Node::reloadGridforceGrid ( int  gridnum  ) 

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

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

void Node::reloadGridforceGrid ( const char *  key  ) 

Definition at line 1196 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.

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

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

Definition at line 1026 of file Node.C.

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

01026                                                                  {
01027   delete molecule;
01028   molecule = state->molecule = 0;
01029   delete pdb;
01030   pdb = state->pdb = 0;
01031   state->loadStructure(fname,pdbname,1);
01032   this->molecule = state->molecule;
01033   this->pdb = state->pdb;
01034   CProxy_Node nodeProxy(thisgroup);
01035   nodeProxy.resendMolecule();
01036 }

void Node::resendMolecule (  ) 

Definition at line 1039 of file Node.C.

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

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

void Node::resendMolecule2 (  ) 

Definition at line 1073 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 1506 of file Node.C.

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

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

void Node::resumeAfterTraceBarrier ( CkReductionMsg *  msg  ) 

Definition at line 1448 of file Node.C.

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

01448                                                      {
01449         CmiAssert(CmiMyPe()==0);
01450         delete msg;     
01451         state->controller->resumeAfterTraceBarrier(curTimeStep);
01452 }

void Node::run (  ) 

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

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

void Node::saveMolDataPointers ( NamdState  ) 

Definition at line 1409 of file Node.C.

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

01410 {
01411   this->molecule = state->molecule;
01412   this->parameters = state->parameters;
01413   this->simParameters = state->simParameters;
01414   this->configList = state->configList;
01415   this->pdb = state->pdb;
01416   this->state = state;
01417 }

void Node::scriptBarrier ( CkQdMsg *   ) 

Definition at line 1163 of file Node.C.

01163                                       {
01164   delete qmsg;
01165   //script->awaken();
01166 }

void Node::scriptParam ( ScriptParamMsg  ) 

Definition at line 1168 of file Node.C.

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

01168                                           {
01169   simParameters->scriptSet(msg->param,msg->value);
01170   delete msg;
01171 }

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

Definition at line 1300 of file Node.C.

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

Referenced by Controller::algorithm().

01300                                                                                                      {
01301   CheckpointMsg *msg = new (1+strlen(key),0) CheckpointMsg;
01302   msg->replica = CmiMyPartition();
01303   msg->task = task;
01304   msg->checkpoint.lattice = lat;
01305   msg->checkpoint.state = cs;
01306   strcpy(msg->key,key);
01307   envelope *env = UsrToEnv(CheckpointMsg::pack(msg));
01308   CmiSetHandler(env,recvCheckpointCReq_index);
01309 #if CMK_HAS_PARTITION
01310   CmiInterSyncSendAndFree(CkMyPe(),remote,env->getTotalsize(),(char*)env);
01311 #else
01312   CmiSyncSendAndFree(CkMyPe(),env->getTotalsize(),(char*)env);
01313 #endif
01314 }

void Node::sendEnableEarlyExit ( void   ) 

Definition at line 1379 of file Node.C.

Referenced by enableEarlyExit().

01379                                    {
01380   CkQdMsg *msg = new CkQdMsg;
01381   CProxy_Node nodeProxy(thisgroup);
01382   nodeProxy[0].recvEnableEarlyExit(msg);
01383 }

void Node::sendEnableExitScheduler ( void   ) 

Definition at line 1352 of file Node.C.

Referenced by enableExitScheduler().

01352                                        {
01353   //CmiPrintf("sendEnableExitScheduler\n");
01354   CkQdMsg *msg = new CkQdMsg;
01355   CProxy_Node nodeProxy(thisgroup);
01356   nodeProxy[0].recvEnableExitScheduler(msg);
01357 }

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 1420 of file Node.C.

01420                     {
01421 #if USE_HPM
01422   HPM_Start("500 steps", localRankOnNode);
01423 #endif
01424 }

void Node::startUp ( CkQdMsg *   ) 

Definition at line 424 of file Node.C.

References startup().

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

void Node::startup (  ) 

Definition at line 435 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::pme_select(), 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().

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

void Node::stopHPM (  ) 

Definition at line 1426 of file Node.C.

01426                    {
01427 #if USE_HPM
01428   HPM_Stop("500 steps", localRankOnNode);
01429   HPM_Print(CkMyPe(), localRankOnNode);
01430 #endif
01431 }

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

Definition at line 1433 of file Node.C.

References curTimeStep.

01433                                                 {
01434         curTimeStep = step;
01435         if(turnOnTrace) traceBegin();
01436         else traceEnd();
01437 
01438     if(turnOnTrace) CmiTurnOnStats();
01439     else CmiTurnOffStats();
01440 
01441         //CkPrintf("traceBarrier (%d) at step %d called on proc %d\n", turnOnTrace, step, CkMyPe());    
01442         CProxy_Node nd(CkpvAccess(BOCclass_group).node);
01443         CkCallback cb(CkIndex_Node::resumeAfterTraceBarrier(NULL), nd[0]);
01444         contribute(0, NULL, CkReduction::sum_int, cb);
01445         
01446 }

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

Definition at line 1249 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.

01249                                                                     {
01250     if (CmiMyRank()) return;
01251     DebugM(4, "updateGridScale(char*, int, float, float, float) called on node " << CkMyPe() << "\n" << endi);
01252        
01253     GridforceGrid *grid = molecule->get_gridfrc_grid(gridnum);
01254     if (grid == NULL) {
01255         NAMD_bug("Node::updateGridScale(char*, int, float, float, float):grid not found");
01256     }
01257     
01258     Vector scale(sx,sy,sz);
01259     simParameters->mgridforcelist.at_index(gridnum)->gridforceScale = scale;
01260     grid->set_scale( scale );
01261 
01262     DebugM(4, "updateGridScale(char*, int, float, float, float) finished\n" << endi);
01263 }

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

Definition at line 1224 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.

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


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(), TholeElem::computeForce(), ImproperElem::computeForce(), DihedralElem::computeForce(), CrosstermElem::computeForce(), BondElem::computeForce(), AnisoElem::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(), LJTable::LJTable(), 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(), Sequencer::rescaleSoluteCharges(), 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(), TholeElem::computeForce(), ImproperElem::computeForce(), GromacsPairElem::computeForce(), DihedralElem::computeForce(), CrosstermElem::computeForce(), BondElem::computeForce(), AnisoElem::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(), LJTable::LJTable(), 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(), ComputePmeUtil::select(), 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 Wed Jun 20 01:17:20 2018 for NAMD by  doxygen 1.4.7