Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

Node Class Reference

#include <Node.h>

Inheritance diagram for Node:

BOCclass 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 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 BOCCheckIn ()
void awaitBOCCheckIn ()
void saveMolDataPointers (NamdState *)
void sendCharmArrProxies (AllCharmArrsMsg *msg)
int myid ()
int numNodes ()
void setScript (ScriptTcl *s)
ScriptTclgetScript (void)

Static Public Member Functions

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

Public Attributes

WorkDistribworkDistrib
ComputeMgrcomputeMgr
Moleculemolecule
Parametersparameters
SimParameterssimParameters
ConfigListconfigList
PDBpdb
NamdStatestate
Outputoutput
IMDOutputimd
Vectorcoords

Protected Attributes

AtomMapatomMap
PatchMappatchMap
ComputeMapcomputeMap
LdbCoordinatorldbCoordinator

Constructor & Destructor Documentation

Node::Node GroupInitMsg msg  ) 
 

Definition at line 88 of file Node.C.

References atomMap, computeMap, computeMgr, configList, DebugM, eventEndOfTimeStep, GroupInitMsg::group, imd, ComputeMap::Instance(), AtomMap::Instance(), PatchMap::Instance(), ldbCoordinator, molecule, NAMD_bug(), output, parameters, patchMap, pdb, simParameters, state, and workDistrib.

00089 {    
00090   DebugM(4,"Creating Node\n");
00091 #if(CMK_CCS_AVAILABLE && CMK_WEB_MODE)
00092   CApplicationInit();
00093 #endif
00094   if (CpvAccess(Node_instance) == 0) {
00095     CpvAccess(Node_instance) = this;
00096     eventEndOfTimeStep = traceRegisterUserEvent("EndOfTimeStep");
00097   } else {
00098     NAMD_bug("Node::Node() - another instance of Node exists!");
00099   }
00100 
00101   CpvAccess(BOCclass_group) = msg->group;
00102   delete msg;
00103 
00104   CpvAccess(BOCclass_group).node = thisgroup;
00105 
00106   startupPhase = 0;
00107 
00108   molecule = NULL;
00109   parameters = NULL;
00110   simParameters = NULL;
00111   configList = NULL;
00112   pdb = NULL;
00113   state = NULL;
00114   output = NULL;
00115   imd = new IMDOutput;
00116 
00117   DebugM(4,"Creating PatchMap, AtomMap, ComputeMap\n");
00118   patchMap = PatchMap::Instance();
00119   atomMap = AtomMap::Instance();
00120   computeMap = ComputeMap::Instance();
00121 
00122   DebugM(4,"Binding to BOC's\n");
00123   CProxy_PatchMgr pm(CpvAccess(BOCclass_group).patchMgr);
00124   patchMgr = pm.ckLocalBranch();
00125   CProxy_ProxyMgr prm(CpvAccess(BOCclass_group).proxyMgr);
00126   proxyMgr = prm.ckLocalBranch();
00127   CProxy_WorkDistrib wd(CpvAccess(BOCclass_group).workDistrib);
00128   workDistrib = wd.ckLocalBranch();
00129   CProxy_ComputeMgr cm(CpvAccess(BOCclass_group).computeMgr);
00130   computeMgr = cm.ckLocalBranch();
00131   CProxy_LdbCoordinator lc(CpvAccess(BOCclass_group).ldbCoordinator);
00132   ldbCoordinator = lc.ckLocalBranch();
00133 
00134 }

Node::~Node void   ) 
 

Definition at line 139 of file Node.C.

00140 {
00141   delete output;
00142   delete computeMap;
00143   delete atomMap;
00144   delete patchMap;
00145   delete CpvAccess(comm);
00146 }


Member Function Documentation

void Node::awaitBOCCheckIn  ) 
 

void Node::BOCCheckIn  ) 
 

void Node::earlyExit CkQdMsg *   ) 
 

Definition at line 636 of file Node.C.

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

00636                                  {
00637   iout << iERROR << "Exiting prematurely.\n" << endi;
00638   BackEnd::exit();
00639   delete msg;
00640 }

void Node::enableEarlyExit void   ) 
 

Definition at line 624 of file Node.C.

References sendEnableEarlyExit().

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

00624                                {
00625   if ( CkMyPe() ) {
00626     sendEnableEarlyExit();
00627   } else {
00628 #if CHARM_VERSION > 050402
00629     CkStartQD(CkIndex_Node::earlyExit((CkQdMsg*)0),&thishandle);
00630 #else
00631     CkStartQD(CProxy_Node::ckIdx_earlyExit((CkQdMsg*)0),&thishandle);
00632 #endif
00633   }
00634 }

void Node::enableExitScheduler void   ) 
 

Definition at line 591 of file Node.C.

References sendEnableExitScheduler().

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

00591                                    {
00592   if ( CkMyPe() ) {
00593     sendEnableExitScheduler();
00594   } else {
00595 #if CHARM_VERSION > 050402
00596     CkStartQD(CkIndex_Node::exitScheduler((CkQdMsg*)0),&thishandle);
00597 #else
00598     CkStartQD(CProxy_Node::ckIdx_exitScheduler((CkQdMsg*)0),&thishandle);
00599 #endif
00600   }
00601 }

void Node::enableScriptBarrier  ) 
 

Definition at line 534 of file Node.C.

00534                                {
00535 #if CHARM_VERSION > 050402
00536   CkStartQD(CkIndex_Node::scriptBarrier((CkQdMsg*)0),&thishandle);
00537 #else
00538   CkStartQD(CProxy_Node::ckIdx_scriptBarrier((CkQdMsg*)0),&thishandle);
00539 #endif
00540 }

void Node::exitScheduler CkQdMsg *   ) 
 

Definition at line 603 of file Node.C.

00603                                      {
00604   //CmiPrintf("exitScheduler %d\n",CkMyPe());
00605   CsdExitScheduler();
00606   delete msg;
00607 }

ScriptTcl* Node::getScript void   )  [inline]
 

Definition at line 153 of file Node.h.

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

00153 { return script; }

void Node::messageBOCCheckIn  )  [static]
 

void Node::messageRun  )  [static]
 

Definition at line 497 of file Node.C.

Referenced by startup().

00497                       {
00498   (CProxy_Node(CpvAccess(BOCclass_group).node)).run();
00499 }

void Node::messageStartUp  )  [static]
 

Definition at line 151 of file Node.C.

00151                           {
00152   (CProxy_Node(CpvAccess(BOCclass_group).node)).startup();
00153 }

int Node::myid  )  [inline]
 

Definition at line 149 of file Node.h.

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

00149 { return CkMyPe(); }

int Node::numNodes  )  [inline]
 

Definition at line 150 of file Node.h.

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

00150 { return CkNumPes(); }

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

Definition at line 84 of file Node.h.

Referenced by HomePatch::addForceToMomentum(), Sequencer::addMovDragToPosition(), Sequencer::addRotDragToPosition(), HomePatch::addVelocityToPosition(), WorkDistrib::assignNodeToPatch(), BackEnd::awaken(), Controller::compareChecksums(), ComputeCylindricalBC::ComputeCylindricalBC(), ComputeEwald::ComputeEwald(), ComputeGlobal::ComputeGlobal(), ComputeHomeTuples< BondElem, Bond, BondValue >::ComputeHomeTuples(), ComputePme::ComputePme(), ComputeRestraints::ComputeRestraints(), ComputeSphericalBC::ComputeSphericalBC(), ComputeStir::ComputeStir(), ComputeTclBC::ComputeTclBC(), Output::coordinate(), Output::coordinateNeeded(), ComputeMgr::createComputes(), LdbCoordinator::createLoadBalancer(), CollectionMaster::disposePositions(), CollectionMaster::disposeVelocities(), ComputeStir::doForce(), ComputeRestraints::doForce(), ComputeGridForce::doForce(), ComputeEField::doForce(), ComputeConsTorque::doForce(), ComputeConsForce::doForce(), HomePatch::doGroupSizeCheck(), HomePatch::doMarginCheck(), HomePatch::doPairlistCheck(), ComputeTclBC::doWork(), ComputeHomeTuples< BondElem, Bond, BondValue >::doWork(), dumpbench(), GridforceGrid::get_box(), GlobalMasterIMD::get_vmd_forces(), GlobalMasterEasy::GlobalMasterEasy(), GlobalMasterFreeEnergy::GlobalMasterFreeEnergy(), GlobalMasterIMD::GlobalMasterIMD(), GlobalMasterTMD::GlobalMasterTMD(), LdbCoordinator::initialize(), ComputePmeMgr::initialize(), ComputePmeMgr::initialize_pencils(), Sequencer::integrate(), Sequencer::langevinPiston(), Sequencer::langevinVelocities(), Sequencer::langevinVelocitiesBBK1(), Sequencer::langevinVelocitiesBBK2(), LJTable::LJTable(), ComputeHomeTuples< BondElem, Bond, BondValue >::loadTuples(), main(), Sequencer::maximumMove(), HomePatch::mollyAverage(), HomePatch::mollyMollify(), LdbCoordinator::nodeDone(), Patch::Patch(), Controller::printDynamicsEnergies(), Controller::printEnergies(), Controller::printMinimizeEnergies(), GlobalMaster::processData(), Sequencer::rattle1(), HomePatch::rattle1(), HomePatch::rattle2(), LdbCoordinator::rebalance(), CollectionMaster::receiveDataStream(), Controller::receivePressure(), ComputeMgr::recvComputeConsForceMsg(), ComputeExtMgr::recvCoord(), ComputeGlobal::recvResults(), Sequencer::reloadCharges(), ScriptTcl::run(), ComputeGlobal::saveTotalForces(), ComputeNonbondedUtil::select(), PatchMgr::setLattice(), CollectionMgr::submitPositions(), Sequencer::tcoupleVelocities(), ComputePme::ungridForces(), Output::velocity(), Output::velocityNeeded(), and wrap_coor_int().

00084 {return CpvAccess(Node_instance);}

void Node::recvEnableEarlyExit CkQdMsg *   ) 
 

Definition at line 619 of file Node.C.

References enableEarlyExit().

00619                                            {
00620   delete msg;
00621   enableEarlyExit();
00622 }

void Node::recvEnableExitScheduler CkQdMsg *   ) 
 

Definition at line 585 of file Node.C.

References enableExitScheduler().

00585                                                {
00586   //CmiPrintf("recvEnableExitScheduler\n");
00587   delete msg;
00588   enableExitScheduler();
00589 }

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

Definition at line 569 of file Node.C.

References charge, molecule, and Molecule::reloadCharges().

00569                                               {
00570   molecule->reloadCharges(charge,n);
00571 }

void Node::reloadCharges const char *  filename  ) 
 

Definition at line 552 of file Node.C.

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

00552                                              {
00553   FILE *file = fopen(filename,"r");
00554   if ( ! file ) NAMD_die("node::reloadCharges():Error opening charge file.");
00555 
00556   int n = molecule->numAtoms;
00557   float *charge = new float[n];
00558 
00559   for ( int i = 0; i < n; ++i ) {
00560     if ( ! fscanf(file,"%f",&charge[i]) )
00561       NAMD_die("Node::reloadCharges():Not enough numbers in charge file.");
00562   }
00563 
00564   fclose(file);
00565   CProxy_Node(thisgroup).reloadCharges(charge,n);
00566   delete [] charge;
00567 }

void Node::run  ) 
 

Definition at line 506 of file Node.C.

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

00507 {
00508   // Start Controller (aka scalar Sequencer) on Pe(0)
00509   if ( ! CkMyPe() ) {
00510     state->runController();
00511   }
00512 
00513   DebugM(4, "Starting Sequencers\n");
00514   // Run Sequencer on each HomePatch - i.e. start simulation
00515   HomePatchList *hpl = PatchMap::Object()->homePatchList();
00516   ResizeArrayIter<HomePatchElem> ai(*hpl);
00517   for (ai=ai.begin(); ai != ai.end(); ai++) {
00518     HomePatch *patch = (*ai).patch;
00519     patch->runSequencer();
00520   }
00521 
00522   if (!CkMyPe()) {
00523      iout << iINFO << "Finished startup with " <<
00524         (memusage()/1024) << " kB of memory in use.\n" << endi;
00525   }
00526   
00527 }

void Node::saveMolDataPointers NamdState  ) 
 

Definition at line 646 of file Node.C.

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

00647 {
00648   this->molecule = state->molecule;
00649   this->parameters = state->parameters;
00650   this->simParameters = state->simParameters;
00651   this->configList = state->configList;
00652   this->pdb = state->pdb;
00653   this->state = state;
00654 }

void Node::scriptBarrier CkQdMsg *   ) 
 

Definition at line 542 of file Node.C.

00542                                       {
00543   delete qmsg;
00544   //script->awaken();
00545 }

void Node::scriptParam ScriptParamMsg  ) 
 

Definition at line 547 of file Node.C.

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

00547                                           {
00548   simParameters->scriptSet(msg->param,msg->value);
00549   delete msg;
00550 }

void Node::sendCharmArrProxies AllCharmArrsMsg msg  ) 
 

Definition at line 451 of file Node.C.

References NAMD_die().

00451                                                   {
00452 #ifdef CHARMIZE_NAMD
00453     if(CkMyPe()){
00454         atomDisArr = msg->atomsDis;        
00455     }
00456     delete msg;
00457 #else
00458     NAMD_die("sendCharmArrProxies should not be called in this case!");
00459 #endif
00460 }

void Node::sendEnableEarlyExit void   ) 
 

Definition at line 609 of file Node.C.

Referenced by enableEarlyExit().

00609                                    {
00610   CkQdMsg *msg = new CkQdMsg;
00611 #if CHARM_VERSION > 050402
00612   CProxy_Node nodeProxy(thisgroup);
00613   nodeProxy[0].recvEnableEarlyExit(msg);
00614 #else
00615   CProxy_Node(thisgroup).recvEnableEarlyExit(msg,0);
00616 #endif
00617 }

void Node::sendEnableExitScheduler void   ) 
 

Definition at line 574 of file Node.C.

Referenced by enableExitScheduler().

00574                                        {
00575   //CmiPrintf("sendEnableExitScheduler\n");
00576   CkQdMsg *msg = new CkQdMsg;
00577 #if CHARM_VERSION > 050402
00578   CProxy_Node nodeProxy(thisgroup);
00579   nodeProxy[0].recvEnableExitScheduler(msg);
00580 #else
00581   CProxy_Node(thisgroup).recvEnableExitScheduler(msg,0);
00582 #endif
00583 }

void Node::setScript ScriptTcl s  )  [inline]
 

Definition at line 152 of file Node.h.

Referenced by main().

00152 { script = s; }

void Node::startUp CkQdMsg *   ) 
 

Definition at line 155 of file Node.C.

00155                                 {
00156   delete qmsg;
00157   (CProxy_Node(CpvAccess(BOCclass_group).node)).startup();
00158 }

void Node::startup  ) 
 

Definition at line 166 of file Node.C.

References AtomMap::allocateMap(), WorkDistrib::assignNodeToPatch(), ProxyMgr::buildProxySpanningTree(), computeMap, computeMgr, ComputeMgr::createComputes(), WorkDistrib::createHomePatches(), LdbCoordinator::createLoadBalancer(), ProxyMgr::createProxies(), DebugM, WorkDistrib::distributeHomePatches(), SimParameters::enableProxyRecvST, SimParameters::enableProxySendST, SimParameters::freeEnergyOn, iINFO(), WorkDistrib::initAndSendHomePatch(), LdbCoordinator::initialize(), iout, WorkDistrib::mapComputes(), SlaveInitMsg::master, memusage(), messageRun(), molecule, NAMD_bug(), Molecule::numAtoms, Sync::Object(), LdbCoordinator::Object(), ComputeMap::Object(), ProxyMgr::Object(), AtomMap::Object(), CollectionMasterHandler::Object(), Sync::openSync(), output, parameters, patchMap, WorkDistrib::patchMapInit(), pdb, SimParameters::PMEOn, WorkDistrib::preCreateHomePatches(), ComputeMap::printComputeMap(), proxySendSpanning, registerUserEventsForAllComputeObjs(), WorkDistrib::sendMaps(), CollectionMasterHandler::setRealMaster(), ProxyMgr::setRecvSpanning(), ProxyMgr::setSendSpanning(), SimParameters::shiftIOToOne, simParameters, workDistrib, SimParameters::wrapAll, and SimParameters::wrapWater.

00166                    {
00167   int gotoRun = false;
00168 
00169   if (!CkMyPe()) {
00170      iout << iINFO << "Entering startup phase " << startupPhase << " with " <<
00171         (memusage()/1024) << " kB of memory in use.\n" << endi;
00172      fflush(stdout);
00173   }
00174   
00175   switch (startupPhase) {
00176 
00177   case 0:
00178     #ifdef CHARMIZE_NAMD
00179     populateAtomDisArrs(startupPhase);
00180     #endif
00181 
00182     namdOneCommInit(); // Namd1.X style
00183   break;
00184 
00185   case 1:
00186     // send & receive molecule, simparameters... (Namd1.X style)
00187     if (CkMyPe()) {
00188       namdOneRecv();
00189     } else {
00190       namdOneSend();
00191     }
00192 
00193     #ifdef CHARMIZE_NAMD
00194     //send charm array proxies
00195     if(!CkMyPe()){
00196         AllCharmArrsMsg *arrsMsg = new AllCharmArrsMsg;
00197         arrsMsg->atomsDis = atomDisArr;
00198         ((CProxy_Node)thisgroup).sendCharmArrProxies(arrsMsg);        
00199     }    
00200     #endif
00201   break;
00202 
00203   case 2:
00204     // fix up one-per-node objects
00205     simParameters = node_simParameters;
00206     parameters = node_parameters;
00207     molecule = node_molecule;
00208 
00209     #ifdef MEM_OPT_VERSION
00210     //Allocate CollectionMaster which handles I/O depending on the shiftIOToOne parameter
00211     if(!CkMyPe()){
00212         CkChareID collectionMaster;
00213         if(CkNumPes()>1 && simParameters->shiftIOToOne)
00214             collectionMaster = CProxy_CollectionMaster::ckNew(1);
00215         else
00216             collectionMaster = CProxy_CollectionMaster::ckNew(0);
00217         
00218         //set CollectionMgr and CollectionMasterHandler's field for CollectionMaster
00219         CollectionMasterHandler::Object()->setRealMaster(collectionMaster);
00220         CProxy_CollectionMgr cmgr(CpvAccess(BOCclass_group).collectionMgr);
00221         SlaveInitMsg *bcmaster = new SlaveInitMsg;
00222         bcmaster->master = collectionMaster;
00223         cmgr.setCollectionMaster(bcmaster);
00224     }
00225     #endif
00226 
00227     // take care of inital thread setting
00228     threadInit();
00229 
00230     // create blank AtomMap
00231     AtomMap::Object()->allocateMap(molecule->numAtoms);
00232   break;
00233 
00234   case 3:     
00235     if(simParameters->enableProxySendST) {
00236         ProxyMgr::Object()->setSendSpanning();
00237     }
00238     if(simParameters->enableProxyRecvST) {
00239         ProxyMgr::Object()->setRecvSpanning();
00240     }
00241     #ifdef PROCTRACE_DEBUG
00242     DebugFileTrace::Instance("procTrace");
00243     #endif
00244 
00245     if (!CkMyPe()) {
00246       output = new Output; // create output object just on PE(0)
00247       workDistrib->patchMapInit(); // create space division
00248 
00249       #ifdef MEM_OPT_VERSION
00250       //create patches without populating them with atoms
00251       workDistrib->preCreateHomePatches();
00252       #else      
00253       workDistrib->createHomePatches(); // load atoms into HomePatch(es)
00254       #endif
00255       
00256       workDistrib->assignNodeToPatch();
00257       workDistrib->mapComputes();
00258       ComputeMap::Object()->printComputeMap();
00259 
00260       registerUserEventsForAllComputeObjs();
00261 
00262       workDistrib->sendMaps();
00263     }
00264   break;
00265 
00266   case 4:
00267     if ( simParameters->PMEOn ) {
00268       CProxy_ComputePmeMgr pme(CpvAccess(BOCclass_group).computePmeMgr);
00269 #if CHARM_VERSION > 050402
00270       pme[CkMyPe()].initialize(new CkQdMsg);
00271 #else
00272       pme.initialize(new CkQdMsg, CkMyPe());
00273 #endif
00274     }
00275   break;
00276 
00277   case 5:
00278     if ( simParameters->PMEOn ) {
00279       CProxy_ComputePmeMgr pme(CpvAccess(BOCclass_group).computePmeMgr);
00280       pme[CkMyPe()].initialize_pencils(new CkQdMsg);
00281     }
00282     if (!CkMyPe()) {
00283     #ifdef MEM_OPT_VERSION
00284       workDistrib->initAndSendHomePatch();
00285     #else
00286       workDistrib->distributeHomePatches();      
00287     #endif
00288     }
00289   break;
00290 
00291   case 6: 
00292     if ( simParameters->PMEOn ) {
00293       CProxy_ComputePmeMgr pme(CpvAccess(BOCclass_group).computePmeMgr);
00294       pme[CkMyPe()].activate_pencils(new CkQdMsg);
00295     }
00296     proxyMgr->createProxies();  // need Home patches before this
00297     if (!CkMyPe()) LdbCoordinator::Object()->createLoadBalancer();
00298   break;
00299 
00300   case 7:
00301     if (!CkMyPe()) {
00302       ComputeMap::Object()->printComputeMap();
00303     }
00304     Sync::Object()->openSync();  // decide if to open local Sync 
00305     if (proxySendSpanning || proxyRecvSpanning )
00306       proxyMgr->buildProxySpanningTree();
00307     DebugM(4,"Creating Computes\n");
00308     computeMgr->createComputes(ComputeMap::Object());
00309     DebugM(4,"Building Sequencers\n");
00310     buildSequencers();
00311     DebugM(4,"Initializing LDB\n");
00312     LdbCoordinator::Object()->initialize(patchMap,computeMap);
00313   break;
00314 
00315   case 8:
00316     {
00317         //For debugging
00318         /*if(!CkMyPe()){
00319         FILE *dumpFile = fopen("/tmp/NAMD_Bench.dump", "w");
00320         dumpbench(dumpFile);
00321         NAMD_die("Normal execution\n");
00322         }*/
00323     }
00324     #ifdef MEM_OPT_VERSION
00325     if(!CkMyPe()){
00326         molecule->delEachAtomSigs();
00327         molecule->delChargeSpace();
00328         if(!simParameters->freeEnergyOn)
00329             molecule->delMassSpace();
00330         molecule->delOtherEachAtomStructs();
00331         //we can free the pdb data here to save memory because output
00332         //is always in the binary format thus saving 3 doubles * numAtoms bytes.
00333         pdb->delPDBCoreData();
00334     }
00335     //decide whether to free memory space for cluster information
00336     //the condition could be referred to comment for function
00337     //wrap_coor_int in Output.C
00338     if(simParameters->wrapAll || simParameters->wrapWater){
00339         int peOfCollectionMaster = 0;
00340         if(CkNumPes()>1 && simParameters->shiftIOToOne) peOfCollectionMaster = 1;
00341         if(CkNumPes()>1 && CkMyPe()!=peOfCollectionMaster)
00342             molecule->delClusterSigs(); 
00343     }else{
00344         molecule->delClusterSigs();
00345     }
00346     #endif
00347     gotoRun = true;
00348   break;
00349 
00350   default:
00351     NAMD_bug("Startup Phase has a bug - check case statement");
00352   break;
00353 
00354   }
00355 
00356   startupPhase++;
00357   if (!CkMyPe()) {
00358     if (!gotoRun) {
00359 #if CHARM_VERSION > 050402
00360       CkStartQD(CkIndex_Node::startUp((CkQdMsg*)0),&thishandle);
00361 #else
00362       CkStartQD(CProxy_Node::ckIdx_startUp((CkQdMsg*)0),&thishandle);
00363 #endif
00364     } else {
00365       Node::messageRun();
00366     }
00367   }
00368 }


Member Data Documentation

AtomMap* Node::atomMap [protected]
 

Definition at line 157 of file Node.h.

Referenced by Node().

ComputeMap* Node::computeMap [protected]
 

Definition at line 159 of file Node.h.

Referenced by Node(), and startup().

ComputeMgr* Node::computeMgr
 

Definition at line 130 of file Node.h.

Referenced by Sequencer::integrate(), Node(), and startup().

ConfigList* Node::configList
 

Definition at line 136 of file Node.h.

Referenced by WorkDistrib::createAtomLists(), WorkDistrib::initAndSendHomePatch(), Node(), and saveMolDataPointers().

Vector* Node::coords
 

Definition at line 141 of file Node.h.

IMDOutput* Node::imd
 

Definition at line 140 of file Node.h.

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

LdbCoordinator* Node::ldbCoordinator [protected]
 

Definition at line 160 of file Node.h.

Referenced by Node().

Molecule* Node::molecule
 

Definition at line 133 of file Node.h.

Referenced by Sequencer::addMovDragToPosition(), Sequencer::addRotDragToPosition(), WorkDistrib::assignNodeToPatch(), WorkDistrib::caclNumAtomsInEachPatch(), Controller::compareChecksums(), ComputeGlobal::ComputeGlobal(), WorkDistrib::createAtomLists(), ComputeMgr::createComputes(), ComputeStir::doForce(), ComputeRestraints::doForce(), ComputeGridForce::doForce(), ComputeConsTorque::doForce(), ComputeConsForce::doForce(), dumpbench(), WorkDistrib::fillOnePatchAtoms(), GlobalMasterEasy::GlobalMasterEasy(), GlobalMasterFreeEnergy::GlobalMasterFreeEnergy(), GlobalMasterTMD::GlobalMasterTMD(), WorkDistrib::initAndSendHomePatch(), Sequencer::langevinPiston(), Sequencer::langevinVelocities(), Sequencer::langevinVelocitiesBBK1(), Sequencer::langevinVelocitiesBBK2(), ComputeHomeTuples< BondElem, Bond, BondValue >::loadTuples(), HomePatch::mollyAverage(), HomePatch::mollyMollify(), Node(), Controller::printDynamicsEnergies(), Controller::printEnergies(), Controller::printMinimizeEnergies(), GlobalMaster::processData(), HomePatch::rattle1(), HomePatch::rattle2(), Controller::receivePressure(), ComputeMgr::recvComputeConsForceMsg(), ComputeExtMgr::recvCoord(), ComputeGlobal::recvResults(), Sequencer::reloadCharges(), reloadCharges(), saveMolDataPointers(), ComputeNonbondedUtil::select(), startup(), CollectionMgr::submitPositions(), Sequencer::tcoupleVelocities(), and wrap_coor_int().

Output* Node::output
 

Definition at line 139 of file Node.h.

Referenced by CollectionMaster::disposePositions(), CollectionMaster::disposeVelocities(), Node(), and startup().

Parameters* Node::parameters
 

Definition at line 134 of file Node.h.

Referenced by LJTable::LJTable(), ComputeHomeTuples< BondElem, Bond, BondValue >::loadTuples(), Node(), saveMolDataPointers(), and startup().

PatchMap* Node::patchMap [protected]
 

Definition at line 158 of file Node.h.

Referenced by Node(), and startup().

PDB* Node::pdb
 

Definition at line 137 of file Node.h.

Referenced by WorkDistrib::caclNumAtomsInEachPatch(), WorkDistrib::createAtomLists(), WorkDistrib::fillOnePatchAtoms(), WorkDistrib::initAndSendHomePatch(), Node(), WorkDistrib::patchMapInit(), saveMolDataPointers(), and startup().

SimParameters* Node::simParameters
 

Definition at line 135 of file Node.h.

Referenced by HomePatch::addForceToMomentum(), HomePatch::addVelocityToPosition(), WorkDistrib::caclNumAtomsInEachPatch(), ComputeCylindricalBC::ComputeCylindricalBC(), ComputeEwald::ComputeEwald(), ComputeGlobal::ComputeGlobal(), ComputeHomeTuples< BondElem, Bond, BondValue >::ComputeHomeTuples(), ComputePme::ComputePme(), ComputeRestraints::ComputeRestraints(), ComputeSphericalBC::ComputeSphericalBC(), ComputeStir::ComputeStir(), ComputeTclBC::ComputeTclBC(), Output::coordinate(), Output::coordinateNeeded(), WorkDistrib::createAtomLists(), ComputeMgr::createComputes(), LdbCoordinator::createLoadBalancer(), ComputeStir::doForce(), ComputeRestraints::doForce(), ComputeGridForce::doForce(), ComputeEField::doForce(), ComputeConsTorque::doForce(), ComputeConsForce::doForce(), HomePatch::doGroupSizeCheck(), HomePatch::doMarginCheck(), HomePatch::doPairlistCheck(), ComputeTclBC::doWork(), ComputeHomeTuples< BondElem, Bond, BondValue >::doWork(), dumpbench(), PmeXPencil::fft_init(), PmeYPencil::fft_init(), PmeZPencil::fft_init(), WorkDistrib::fillOnePatchAtoms(), GridforceGrid::get_box(), GlobalMasterIMD::get_vmd_forces(), GlobalMasterFreeEnergy::GlobalMasterFreeEnergy(), GlobalMasterIMD::GlobalMasterIMD(), GlobalMasterTMD::GlobalMasterTMD(), WorkDistrib::initAndSendHomePatch(), LdbCoordinator::initialize(), ComputePmeMgr::initialize(), ComputePmeMgr::initialize_pencils(), ComputeHomeTuples< BondElem, Bond, BondValue >::loadTuples(), WorkDistrib::mapComputes(), HomePatch::mollyAverage(), HomePatch::mollyMollify(), Node(), Patch::Patch(), WorkDistrib::patchMapInit(), Controller::printDynamicsEnergies(), Controller::printEnergies(), HomePatch::rattle1(), HomePatch::rattle2(), LdbCoordinator::rebalance(), CollectionMaster::receiveDataStream(), Controller::receivePressure(), ComputeExtMgr::recvCoord(), ScriptTcl::run(), saveMolDataPointers(), ComputeGlobal::saveTotalForces(), scriptParam(), ComputeNonbondedUtil::select(), PatchMgr::setLattice(), startup(), ComputePme::ungridForces(), Output::velocity(), Output::velocityNeeded(), and wrap_coor_int().

NamdState* Node::state
 

Definition at line 138 of file Node.h.

Referenced by Node(), and run().

WorkDistrib* Node::workDistrib
 

Definition at line 127 of file Node.h.

Referenced by Node(), and startup().


The documentation for this class was generated from the following files:
Generated on Sun Jul 6 04:07:47 2008 for NAMD by  doxygen 1.3.9.1