Node Class Reference

#include <Node.h>

List of all members.

Public Member Functions

 Node (GroupInitMsg *msg)
 ~Node (void)
void run ()
void enableScriptBarrier ()
void scriptBarrier (void)
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 (void)
void enableExitScheduler (void)
void exitScheduler (void)
void sendEnableEarlyExit (void)
void recvEnableEarlyExit (void)
void enableEarlyExit (void)
void earlyExit (void)
void startup ()
void mallocTest (int)
void mallocTestQd (void)
float measureMemory ()
void BOCCheckIn ()
void awaitBOCCheckIn ()
void saveMolDataPointers (NamdState *)
void startHPM ()
void stopHPM ()
void traceBarrier (int turnOnTrace, int step)
void resumeAfterTraceBarrier (CkReductionMsg *msg)
void papiMeasureBarrier (int turnOnMeasure, int step)
void resumeAfterPapiMeasureBarrier (CkReductionMsg *msg)
void outputPatchComputeMaps (const char *filename, int tag)
int myid ()
int numNodes ()
void setScript (ScriptTcl *s)
ScriptTclgetScript (void)

Static Public Member Functions

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

Public Attributes

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

Protected Attributes

AtomMapatomMap
PatchMappatchMap
ComputeMapcomputeMap
LdbCoordinatorldbCoordinator

Detailed Description

Definition at line 78 of file Node.h.


Constructor & Destructor Documentation

Node::Node ( GroupInitMsg msg  ) 

Definition at line 290 of file Node.C.

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

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

Node::~Node ( void   ) 

Definition at line 355 of file Node.C.

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

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


Member Function Documentation

void Node::awaitBOCCheckIn (  ) 
void Node::BOCCheckIn (  ) 
void Node::earlyExit ( void   ) 

Definition at line 1364 of file Node.C.

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

01364                          {
01365   iout << iERROR << "Exiting prematurely; see error messages above.\n" << endi;
01366   if ( CmiNumPartitions() > 1 ) NAMD_quit("Exiting prematurely; see error messages above.");
01367   BackEnd::exit();
01368 }

void Node::enableEarlyExit ( void   ) 

Definition at line 1356 of file Node.C.

References sendEnableEarlyExit().

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

01356                                {
01357   if ( CkMyPe() ) {
01358     sendEnableEarlyExit();
01359   } else {
01360     CkStartQD(CkIndex_Node::earlyExit(),&thishandle);
01361   }
01362 }

void Node::enableExitScheduler ( void   ) 

Definition at line 1334 of file Node.C.

References sendEnableExitScheduler().

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

01334                                    {
01335   if ( CkMyPe() ) {
01336     sendEnableExitScheduler();
01337   } else {
01338     CkStartQD(CkIndex_Node::exitScheduler(), &thishandle);
01339   }
01340 }

void Node::enableScriptBarrier (  ) 

Definition at line 1131 of file Node.C.

01131                                {
01132   CkStartQD(CkIndex_Node::scriptBarrier(), &thishandle);
01133 }

void Node::exitScheduler ( void   ) 

Definition at line 1342 of file Node.C.

01342                              {
01343   //CmiPrintf("exitScheduler %d\n",CkMyPe());
01344   CsdExitScheduler();
01345 }

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

Definition at line 192 of file Node.h.

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

00192 { return script; } 

void Node::mallocTest ( int  step  ) 

Definition at line 391 of file Node.C.

References NAMD_die().

Referenced by mallocTestQd().

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

void Node::mallocTestQd ( void   ) 

Definition at line 403 of file Node.C.

References mallocTest(), and mallocTest_size.

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

float Node::measureMemory (  ) 
static void Node::messageBOCCheckIn (  )  [static]
void Node::messageRun (  )  [static]

Definition at line 1087 of file Node.C.

References run().

Referenced by startup().

01087                       {
01088   (CProxy_Node(CkpvAccess(BOCclass_group).node)).run();
01089 }

void Node::messageStartUp (  )  [static]

Definition at line 418 of file Node.C.

References startup().

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

int Node::myid (  )  [inline]

Definition at line 188 of file Node.h.

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

00188 { return CkMyPe(); }

int Node::numNodes (  )  [inline]

Definition at line 189 of file Node.h.

Referenced by WorkDistrib::assignNodeToPatch().

00189 { 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(), ComputeQMMgr::calcMOPAC(), ComputeQMMgr::calcORCA(), Controller::calcPressure(), colvarproxy_namd::calculate(), ComputeQMMgr::calcUSR(), 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< TholeElem, Thole, TholeValue >::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(), CudaComputeNonbonded::CudaComputeNonbonded(), 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< TholeElem, Thole, TholeValue >::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(), ComputeQM::initialize(), ComputePmeCUDA::initialize(), ComputePmeMgr::initialize(), ComputeMsmMgr::initialize(), ComputePmeMgr::initialize_computes(), ComputePmeMgr::initialize_pencils(), Sequencer::integrate(), Controller::integrate(), isPmeProcessor(), Sequencer::langevinPiston(), Sequencer::langevinVelocities(), Sequencer::langevinVelocitiesBBK1(), Sequencer::langevinVelocitiesBBK2(), CudaComputeNonbonded::launchWork(), LJTable::LJTable(), ComputeHomeTuples< TholeElem, Thole, TholeValue >::loadTuples(), HomePatch::loweAndersenVelocities(), WorkDistrib::mapComputes(), Sequencer::maximumMove(), ScriptTcl::measure(), Sequencer::minimize(), HomePatch::minimize_rattle2(), HomePatch::mollyAverage(), HomePatch::mollyMollify(), Controller::multigatorCalcEnthalpy(), NamdHybridLB::NamdHybridLB(), ComputeNonbondedCUDA::noWork(), PmePencil< CBase_PmeZPencil >::order_init(), outputPatchComputeMaps(), 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::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(), ComputeQMMgr::recvPartQM(), ComputeQMMgr::recvPntChrg(), recvReplicaDcdData(), recvReplicaDcdInit(), ComputeNonbondedCUDA::recvYieldDevice(), ComputeNonbondedCUDA::registerPatches(), Sequencer::reloadCharges(), Controller::rescaleaccelMD(), Sequencer::rescaleSoluteCharges(), resendMolecule2(), ScriptTcl::run(), 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(), HomePatch::setLcpoType(), ComputeNonbondedCUDA::skip(), NamdHybridLB::splitComputes(), ComputePmeCUDADevice::spreadCharge(), CollectionMaster::startNextRoundOutputForce(), CollectionMaster::startNextRoundOutputPos(), CollectionMaster::startNextRoundOutputVel(), startup(), NamdCentLB::Strategy(), CollectionMgr::submitForces(), ComputePmeMgr::submitReductions(), Tcl_centerOfMass(), Tcl_centerOfNumber(), Tcl_loadCoords(), Tcl_radiusOfGyration(), Sequencer::tcoupleVelocities(), ComputePme::ungridForces(), 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 1514 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, Object(), SimParameters::outputMaps, PatchMap::patch(), ComputeMap::pid(), simParameters, SimParameters::simulatedNodeSize, SimParameters::simulatedPEs, SimParameters::simulateInitialMapping, and ComputeMap::type().

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

01514                                                               {
01515         if(!simParameters->outputMaps && !simParameters->simulateInitialMapping) return;
01516 
01517         int numpes = CkNumPes();
01518         int nodesize = CkMyNodeSize();
01519         if(simParameters->simulateInitialMapping) {
01520                 numpes = simParameters->simulatedPEs;
01521                 nodesize = simParameters->simulatedNodeSize;
01522         }
01523 
01524         char fname[128];
01525         sprintf(fname, "mapdump_%s.%d_%d_%d_%s", filename, numpes, nodesize, tag, gNAMDBinaryName);
01526 
01527         FILE *fp = fopen(fname, "w");
01528         if(fp == NULL) {
01529                 NAMD_die("Error in outputing PatchMap and ComputeMap info!\n");
01530                 return;
01531         }
01532         PatchMap *pMap = PatchMap::Object();
01533         ComputeMap *cMap = ComputeMap::Object();
01534         int numPatches = pMap->numPatches();
01535         int numComputes = cMap->numComputes();
01536         fprintf(fp, "%d %d %d %d %d %d %d\n", numpes, nodesize, numPatches, numComputes, 
01537                         pMap->gridsize_a(), pMap->gridsize_b(), pMap->gridsize_c());
01538         //output PatchMap info
01539         for(int i=0; i<numPatches; i++) {
01540         #ifdef MEM_OPT_VERSION
01541                 fprintf(fp, "%d %d\n", pMap->numAtoms(i), pMap->node(i));
01542         #else
01543                 fprintf(fp, "%d %d\n", pMap->patch(i)->getNumAtoms(), pMap->node(i));
01544         #endif
01545         }
01546 
01547         //output ComputeMap info
01548         for(int i=0; i<numComputes; i++) {              
01549                 fprintf(fp, "%d %d %d %d\n", cMap->node(i), cMap->type(i), cMap->pid(i,0), cMap->pid(i,1));             
01550         }
01551 }

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

Definition at line 1419 of file Node.C.

References curMFlopStep.

01419                                                         {
01420 #ifdef MEASURE_NAMD_WITH_PAPI
01421         curMFlopStep = step;
01422         double results[NUM_PAPI_EVENTS+1];
01423 
01424         if(turnOnMeasure){              
01425           CkpvAccess(papiEvents)[NUM_PAPI_EVENTS]=CmiWallTimer();
01426 
01427           long long counters[NUM_PAPI_EVENTS+1];
01428           int ret=PAPI_start_counters(CkpvAccess(papiEvents), NUM_PAPI_EVENTS);
01429           if(ret==PAPI_OK)
01430             {
01431               //              CkPrintf("traceBarrier start counters (%d) at step %d called on proc %d\n", turnOnMeasure, step, CkMyPe());
01432             }
01433           else
01434             {
01435               CkPrintf("error PAPI_start_counters (%d) at step %d called on proc %d\n",ret , step, CkMyPe());
01436             }
01437           if(PAPI_read_counters(counters, NUM_PAPI_EVENTS)!=PAPI_OK)
01438             {
01439               CkPrintf("error PAPI_read_counters %d\n",PAPI_read_counters(counters, NUM_PAPI_EVENTS));
01440             };
01441         }else{
01442           long long counters[NUM_PAPI_EVENTS+1];
01443           for(int i=0;i<NUM_PAPI_EVENTS;i++)  counters[i]=0LL;
01444           if(PAPI_read_counters(counters, NUM_PAPI_EVENTS)==PAPI_OK)
01445             {
01446 #if !MEASURE_PAPI_SPP
01447               results[0] = (double)counters[0]/1e6;
01448               results[1] = (double)counters[1]/1e6;
01449 #else
01450               for(int i=0;i<NUM_PAPI_EVENTS;i++)  results[i] = counters[i]/1e6;
01451 #endif
01452               //              for(int i=0;i<NUM_PAPI_EVENTS;i++) CkPrintf("[%d] counter %d is %ld\n",CkMyPe(),i,counters[i]);
01453             }
01454           else
01455             {
01456               //              CkPrintf("error PAPI_read_counters %d\n",PAPI_read_counters(counters, NUM_PAPI_EVENTS));
01457             }
01458           //      CkPrintf("traceBarrier stop counters (%d) at step %d called on proc %d\n", turnOnMeasure, step, CkMyPe());
01459                 
01460           PAPI_stop_counters(counters, NUM_PAPI_EVENTS);        
01461         }
01462         if(CkMyPe()==0)
01463           //        CkPrintf("traceBarrier (%d) at step %d called on proc %d\n", turnOnMeasure, step, CkMyPe());
01464         results[NUM_PAPI_EVENTS]=CkpvAccess(papiEvents)[NUM_PAPI_EVENTS]; //starttime
01465         CProxy_Node nd(CkpvAccess(BOCclass_group).node);
01466         CkCallback cb(CkIndex_Node::resumeAfterPapiMeasureBarrier(NULL), nd[0]);
01467         contribute(sizeof(double)*(NUM_PAPI_EVENTS+1), &results, CkReduction::sum_double, cb);  
01468 #endif
01469 }

void Node::recvCheckpointAck ( CheckpointMsg msg  ) 

Definition at line 1317 of file Node.C.

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

Referenced by recvCheckpointCAck_handler().

01317                                                {
01318   state->controller->recvCheckpointAck(msg->checkpoint);
01319   delete msg;
01320 }

void Node::recvCheckpointReq ( CheckpointMsg msg  ) 

Definition at line 1295 of file Node.C.

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

Referenced by recvCheckpointCReq_handler().

01295                                                {
01296   state->controller->recvCheckpointReq(msg->key,msg->task,msg->checkpoint);
01297 
01298   int remote = msg->replica;
01299   msg->replica = CmiMyPartition();
01300   envelope *env = UsrToEnv(CheckpointMsg::pack(msg));
01301   CmiSetHandler(env,recvCheckpointCAck_index);
01302 #if CMK_HAS_PARTITION
01303   CmiInterSyncSendAndFree(CkMyPe(),remote,env->getTotalsize(),(char*)env);
01304 #else
01305   CmiSyncSendAndFree(CkMyPe(),env->getTotalsize(),(char*)env);
01306 #endif
01307 }

void Node::recvEnableEarlyExit ( void   ) 

Definition at line 1352 of file Node.C.

References enableEarlyExit().

01352                                {
01353   enableEarlyExit();
01354 }

void Node::recvEnableExitScheduler ( void   ) 

Definition at line 1329 of file Node.C.

References enableExitScheduler().

01329                                        {
01330   //CmiPrintf("recvEnableExitScheduler\n");
01331   enableExitScheduler();
01332 }

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

Definition at line 1161 of file Node.C.

References molecule, and Molecule::reloadCharges().

01161                                               {
01162   molecule->reloadCharges(charge,n);
01163 }

void Node::reloadCharges ( const char *  filename  ) 

Definition at line 1144 of file Node.C.

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

01144                                              {
01145   FILE *file = fopen(filename,"r");
01146   if ( ! file ) NAMD_die("node::reloadCharges():Error opening charge file.");
01147 
01148   int n = molecule->numAtoms;
01149   float *charge = new float[n];
01150 
01151   for ( int i = 0; i < n; ++i ) {
01152     if ( ! fscanf(file,"%f",&charge[i]) )
01153       NAMD_die("Node::reloadCharges():Not enough numbers in charge file.");
01154   }
01155 
01156   fclose(file);
01157   CProxy_Node(thisgroup).reloadCharges(charge,n);
01158   delete [] charge;
01159 }

void Node::reloadGridforceGrid ( int  gridnum  ) 

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

01236                                           {
01237     if (CmiMyRank()) return;
01238     DebugM(4, "reloadGridforceGrid(int) called on node " << CkMyPe() << "\n" << endi);
01239     
01240     GridforceGrid *grid = molecule->get_gridfrc_grid(gridnum);
01241     if (grid == NULL) {
01242         NAMD_bug("Node::reloadGridforceGrid(int):grid not found");
01243     }
01244     
01245     if (CkMyPe()) {
01246         // not node 0 -> receive grid
01247         DebugM(4, "Receiving grid\n");
01248         
01249         delete grid;
01250         
01251         MIStream *msg = CkpvAccess(comm)->newInputStream(0, GRIDFORCEGRIDTAG);
01252         grid = GridforceGrid::unpack_grid(gridnum, msg);
01253         molecule->set_gridfrc_grid(gridnum, grid);
01254         delete msg;
01255     } else {
01256         // node 0 -> send grid
01257         DebugM(4, "Sending grid\n");
01258         
01259         MOStream *msg = CkpvAccess(comm)->newOutputStream(ALLBUTME, GRIDFORCEGRIDTAG, BUFSIZE);
01260         GridforceGrid::pack_grid(grid, msg);
01261         msg->end();
01262         delete msg;
01263     }
01264     
01265     DebugM(4, "reloadGridforceGrid(int) finished\n" << endi);
01266 }

void Node::reloadGridforceGrid ( const char *  key  ) 

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

01167                                                {
01168     DebugM(4, "reloadGridforceGrid(const char*) called on node " << CkMyPe() << "\n" << endi);
01169     
01170     int gridnum;
01171     MGridforceParams *mgridParams;
01172     if (key == NULL) {
01173         gridnum = simParameters->mgridforcelist.index_for_key(MGRIDFORCEPARAMS_DEFAULTKEY);
01174         mgridParams = simParameters->mgridforcelist.find_key(MGRIDFORCEPARAMS_DEFAULTKEY);
01175     } else {
01176         gridnum = simParameters->mgridforcelist.index_for_key(key);
01177         mgridParams = simParameters->mgridforcelist.find_key(key);
01178     }
01179     
01180     if (gridnum < 0 || mgridParams == NULL) {
01181         NAMD_die("Node::reloadGridforceGrid(const char*):Could not find grid.");
01182     }
01183     
01184     GridforceGrid *grid = molecule->get_gridfrc_grid(gridnum);
01185     if (grid == NULL) {
01186         NAMD_bug("Node::reloadGridforceGrid(const char*):grid not found");
01187     }
01188     grid->reinitialize(simParameters, mgridParams);
01189     
01190     CProxy_Node(thisgroup).reloadGridforceGrid(gridnum);
01191     
01192     DebugM(4, "reloadGridforceGrid(const char*) finished\n" << endi);
01193 }

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

Definition at line 998 of file Node.C.

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

00998                                                                  {
00999   delete molecule;
01000   molecule = state->molecule = 0;
01001   delete pdb;
01002   pdb = state->pdb = 0;
01003   state->loadStructure(fname,pdbname,1);
01004   this->molecule = state->molecule;
01005   this->pdb = state->pdb;
01006   CProxy_Node nodeProxy(thisgroup);
01007   nodeProxy.resendMolecule();
01008 }

void Node::resendMolecule (  ) 

Definition at line 1011 of file Node.C.

References ALLBUTME, BUFSIZE, computeMgr, molecule, MOLECULETAG, 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.

01011                           {
01012   if ( CmiMyRank() ) {
01013     return;
01014   }
01015   if ( CmiMyPe() == 0 ) {
01016     int bufSize = BUFSIZE;
01017     MOStream *conv_msg;
01018     conv_msg = CkpvAccess(comm)->newOutputStream(ALLBUTME, STATICPARAMSTAG, bufSize);
01019     parameters->send_Parameters(conv_msg);
01020     if(molecule->numAtoms>=1000000) bufSize = 16*BUFSIZE;
01021     conv_msg = CkpvAccess(comm)->newOutputStream(ALLBUTME, MOLECULETAG, bufSize);
01022     molecule->send_Molecule(conv_msg);
01023   } else {
01024     MIStream *conv_msg;
01025     delete parameters;
01026     parameters = new Parameters;
01027     conv_msg = CkpvAccess(comm)->newInputStream(0, STATICPARAMSTAG);
01028     parameters->receive_Parameters(conv_msg);
01029     delete molecule;
01030     molecule = new Molecule(simParameters,parameters);
01031     conv_msg = CkpvAccess(comm)->newInputStream(0, MOLECULETAG);
01032     molecule->receive_Molecule(conv_msg);
01033   }
01034   node_parameters = parameters;
01035   node_molecule = molecule;
01036   SimParameters::nonbonded_select();
01037   if ( simParameters->PMEOn ) SimParameters::pme_select();
01038   computeMgr->sendBuildCudaExclusions();
01039   CProxy_Node nodeProxy(thisgroup);
01040   for ( int i=0; i<CmiMyNodeSize(); ++i ) {
01041     nodeProxy[CmiMyPe()+i].resendMolecule2();
01042   }
01043 }

void Node::resendMolecule2 (  ) 

Definition at line 1045 of file Node.C.

References molecule, Molecule::numAtoms, Object(), and parameters.

01045                            {
01046   parameters = node_parameters;
01047   molecule = node_molecule;
01048   AtomMap::Object()->allocateMap(molecule->numAtoms);
01049 }

void Node::resumeAfterPapiMeasureBarrier ( CkReductionMsg *  msg  ) 

Definition at line 1471 of file Node.C.

References curMFlopStep, simParameters, and state.

01471                                                            {
01472 #ifdef MEASURE_NAMD_WITH_PAPI
01473   
01474         if(simParameters->papiMeasureStartStep != curMFlopStep) {
01475                 double *results = (double *)msg->getData();
01476                 double endtime=CmiWallTimer();
01477                 int bstep = simParameters->papiMeasureStartStep;
01478                 int estep = bstep + simParameters->numPapiMeasureSteps;
01479 #if MEASURE_PAPI_SPP
01480                 CkPrintf("SPP INFO: PAPI_FP_OPS timestep %d to %d is %lf(1e6)\n", bstep,estep,results[0]);
01481                 CkPrintf("SPP INFO: PAPI_TOT_INS timestep %d to %d is %lf(1e6)\n", bstep,estep,results[1]);
01482                 CkPrintf("SPP INFO: perf::PERF_COUNT_HW_CACHE_LL:MISS timestep %d to %d is %lf(1e6)\n", bstep,estep,results[2]);
01483                 CkPrintf("SPP INFO: DATA_PREFETCHER:ALL timestep %d to %d is %lf(1e6)\n", bstep,estep,results[3]);
01484                 CkPrintf("SPP INFO: PAPI_L1_DCA timestep %d to %d is %lf(1e6)\n", bstep,estep,results[4]);
01485                 CkPrintf("SPP INFO: PAPI_TOT_CYC timestep %d to % is %lf(1e6)\n", bstep,estep,results[5]);
01486                 //              CkPrintf("SPP INFO: INSTRUCTION_FETCH_STALL timestep %d to %d is %lf(1e6)\n", bstep,estep,results[6]);
01487                 //              CkPrintf("SPP INFO: WALLtime timestep %d to %d is %lf\n", bstep,estep,endtime-results[NUM_PAPI_EVENTS]/CkNumPes());
01488                 CkPrintf("SPP INFO: WALLtime timestep %d to %d is %lf\n", bstep,estep,endtime-results[NUM_PAPI_EVENTS]);
01489                 CkPrintf("SPP INFO: endtime %lf avgtime %lf tottime %lf\n", endtime,results[NUM_PAPI_EVENTS]/CkNumPes(),results[NUM_PAPI_EVENTS] );
01490 #else
01491                 if(CkpvAccess(papiEvents)[0] == PAPI_FP_INS){
01492                         double totalFPIns = results[0];
01493                         if(CkpvAccess(papiEvents)[1] == PAPI_FMA_INS) totalFPIns += (results[1]*2);
01494                         CkPrintf("FLOPS INFO: from timestep %d to %d, the total FP instruction of NAMD is %lf(x1e6) per processor\n", 
01495                                          bstep, estep, totalFPIns/CkNumPes());
01496                 }else{
01497                         char nameBuf[PAPI_MAX_STR_LEN];
01498                         CkPrintf("PAPI COUNTERS INFO: from timestep %d to %d, ", 
01499                                          bstep, estep);
01500                         for(int i=0; i<NUM_PAPI_EVENTS; i++) {
01501                                 PAPI_event_code_to_name(CkpvAccess(papiEvents)[i], nameBuf);
01502                                 CkPrintf("%s is %lf(x1e6), ", nameBuf, results[i]/CkNumPes());
01503                         }
01504                         CkPrintf("per processor\n");
01505                 }               
01506 #endif
01507         }
01508         delete msg;     
01509         state->controller->resumeAfterPapiMeasureBarrier(curMFlopStep);
01510 #endif
01511 }

void Node::resumeAfterTraceBarrier ( CkReductionMsg *  msg  ) 

Definition at line 1413 of file Node.C.

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

01413                                                      {
01414         CmiAssert(CmiMyPe()==0);
01415         delete msg;     
01416         state->controller->resumeAfterTraceBarrier(curTimeStep);
01417 }

void Node::run ( void   ) 

Definition at line 1096 of file Node.C.

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

Referenced by messageRun().

01097 {
01098   // Start Controller (aka scalar Sequencer) on Pe(0)
01099 //  printf("\n\n I am in Node.C in run method about to call  state->runController\n\n");
01100   if ( ! CkMyPe() ) {
01101     state->runController();
01102   }
01103 
01104   DebugM(4, "Starting Sequencers\n");
01105   // Run Sequencer on each HomePatch - i.e. start simulation
01106   HomePatchList *hpl = PatchMap::Object()->homePatchList();
01107   ResizeArrayIter<HomePatchElem> ai(*hpl);
01108   for (ai=ai.begin(); ai != ai.end(); ai++) {
01109     HomePatch *patch = (*ai).patch;
01110 //CkPrintf("Proc#%d in Node calling Sequencer ",CkMyPe());
01111     patch->runSequencer();
01112   }
01113 
01114   if (!CkMyPe()) {
01115     double newTime = CmiWallTimer();
01116     iout << iINFO << "Startup phase " << startupPhase-1 << " took "
01117          << newTime - startupTime << " s, "
01118          << memusage_MB() << " MB of memory in use\n";
01119     iout << iINFO << "Finished startup at " << newTime << " s, "
01120          << memusage_MB() << " MB of memory in use\n\n" << endi;
01121     fflush(stdout);
01122   }
01123   
01124 }

void Node::saveMolDataPointers ( NamdState state  ) 

Definition at line 1374 of file Node.C.

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

01375 {
01376   this->molecule = state->molecule;
01377   this->parameters = state->parameters;
01378   this->simParameters = state->simParameters;
01379   this->configList = state->configList;
01380   this->pdb = state->pdb;
01381   this->state = state;
01382 }

void Node::scriptBarrier ( void   ) 

Definition at line 1135 of file Node.C.

01135                          {
01136   //script->awaken();
01137 }

void Node::scriptParam ( ScriptParamMsg msg  ) 

Definition at line 1139 of file Node.C.

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

01139                                           {
01140   simParameters->scriptSet(msg->param,msg->value);
01141   delete msg;
01142 }

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

Definition at line 1271 of file Node.C.

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

Referenced by Controller::algorithm().

01271                                                                                                      {
01272   CheckpointMsg *msg = new (1+strlen(key),0) CheckpointMsg;
01273   msg->replica = CmiMyPartition();
01274   msg->task = task;
01275   msg->checkpoint.lattice = lat;
01276   msg->checkpoint.state = cs;
01277   strcpy(msg->key,key);
01278   envelope *env = UsrToEnv(CheckpointMsg::pack(msg));
01279   CmiSetHandler(env,recvCheckpointCReq_index);
01280 #if CMK_HAS_PARTITION
01281   CmiInterSyncSendAndFree(CkMyPe(),remote,env->getTotalsize(),(char*)env);
01282 #else
01283   CmiSyncSendAndFree(CkMyPe(),env->getTotalsize(),(char*)env);
01284 #endif
01285 }

void Node::sendEnableEarlyExit ( void   ) 

Definition at line 1347 of file Node.C.

Referenced by enableEarlyExit().

01347                                    {
01348   CProxy_Node nodeProxy(thisgroup);
01349   nodeProxy[0].recvEnableEarlyExit();
01350 }

void Node::sendEnableExitScheduler ( void   ) 

Definition at line 1323 of file Node.C.

Referenced by enableExitScheduler().

01323                                        {
01324   //CmiPrintf("sendEnableExitScheduler\n");
01325   CProxy_Node nodeProxy(thisgroup);
01326   nodeProxy[0].recvEnableExitScheduler();
01327 }

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

Definition at line 191 of file Node.h.

Referenced by after_backend_init().

00191 { script = s; }

void Node::startHPM (  ) 

Definition at line 1385 of file Node.C.

01385                     {
01386 #if USE_HPM
01387   HPM_Start("500 steps", localRankOnNode);
01388 #endif
01389 }

void Node::startup (  ) 

Definition at line 428 of file Node.C.

References Lattice::a_p(), WorkDistrib::assignNodeToPatch(), Lattice::b_p(), SimParameters::bondedCUDA, ProxyMgr::buildProxySpanningTree(), Lattice::c_p(), computeMap, computeMgr, ComputeMgr::createComputes(), WorkDistrib::createHomePatches(), ProxyMgr::createProxies(), DebugM, WorkDistrib::distributeHomePatches(), endi(), BackEnd::exit(), PDB::get_extremes(), ProxyMgr::getRecvSpanning(), ProxyMgr::getSendSpanning(), iINFO(), iout, SimParameters::isRecvSpanningTreeOn(), SimParameters::isSendSpanningTreeOn(), SimParameters::lattice, SimParameters::mallocTest, mallocTest_size, WorkDistrib::mapComputes(), memusage_MB(), messageRun(), molecule, SimParameters::MSMOn, SimParameters::MsmSerialOn, NAMD_bug(), SimParameters::nonbonded_select(), Molecule::numAtoms, numPatches, ComputeMap::Object(), PatchMap::Object(), Object(), 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(), simParameters, SimParameters::simulatedNodeSize, SimParameters::simulatedPEs, SimParameters::simulateInitialMapping, MsmInitMsg::smax, MsmInitMsg::smin, Random::split(), SimParameters::useCkLoop, SimParameters::useCUDA2, SimParameters::usePMECUDA, and workDistrib.

Referenced by messageStartUp().

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

void Node::stopHPM (  ) 

Definition at line 1391 of file Node.C.

01391                    {
01392 #if USE_HPM
01393   HPM_Stop("500 steps", localRankOnNode);
01394   HPM_Print(CkMyPe(), localRankOnNode);
01395 #endif
01396 }

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

Definition at line 1398 of file Node.C.

References curTimeStep.

01398                                                 {
01399         curTimeStep = step;
01400         if(turnOnTrace) traceBegin();
01401         else traceEnd();
01402 
01403     if(turnOnTrace) CmiTurnOnStats();
01404     else CmiTurnOffStats();
01405 
01406         //CkPrintf("traceBarrier (%d) at step %d called on proc %d\n", turnOnTrace, step, CkMyPe());    
01407         CProxy_Node nd(CkpvAccess(BOCclass_group).node);
01408         CkCallback cb(CkIndex_Node::resumeAfterTraceBarrier(NULL), nd[0]);
01409         contribute(0, NULL, CkReduction::sum_int, cb);
01410         
01411 }

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

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

01220                                                                     {
01221     if (CmiMyRank()) return;
01222     DebugM(4, "updateGridScale(char*, int, float, float, float) called on node " << CkMyPe() << "\n" << endi);
01223        
01224     GridforceGrid *grid = molecule->get_gridfrc_grid(gridnum);
01225     if (grid == NULL) {
01226         NAMD_bug("Node::updateGridScale(char*, int, float, float, float):grid not found");
01227     }
01228     
01229     Vector scale(sx,sy,sz);
01230     simParameters->mgridforcelist.at_index(gridnum)->gridforceScale = scale;
01231     grid->set_scale( scale );
01232 
01233     DebugM(4, "updateGridScale(char*, int, float, float, float) finished\n" << endi);
01234 }

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

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

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


Member Data Documentation

AtomMap* Node::atomMap [protected]

Definition at line 200 of file Node.h.

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

colvarmodule* Node::colvars

Definition at line 184 of file Node.h.

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

Definition at line 202 of file Node.h.

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

Definition at line 169 of file Node.h.

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

Definition at line 156 of file Node.h.

Referenced by papiMeasureBarrier(), and resumeAfterPapiMeasureBarrier().

Definition at line 151 of file Node.h.

Referenced by resumeAfterTraceBarrier(), and traceBarrier().

Definition at line 135 of file Node.h.

float Node::initVM

Definition at line 135 of file Node.h.

Definition at line 203 of file Node.h.

Definition at line 129 of file Node.h.

Referenced by mallocTestQd(), and startup().

Definition at line 176 of file Node.h.

Referenced by Sequencer::addMovDragToPosition(), Sequencer::addRotDragToPosition(), WorkDistrib::assignNodeToPatch(), ComputeNonbondedCUDA::build_exclusions(), ComputeQMMgr::calcMOPAC(), ComputeQMMgr::calcORCA(), Controller::calcPressure(), colvarproxy_namd::calculate(), ComputeQMMgr::calcUSR(), 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< TholeElem, Thole, TholeValue >::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().

PatchMap* Node::patchMap [protected]

Definition at line 201 of file Node.h.

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

Definition at line 178 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< TholeElem, Thole, TholeValue >::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(), 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(), 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(), ComputeQM::initialize(), ComputePmeCUDA::initialize(), ComputePmeMgr::initialize(), ComputeMsmMgr::initialize(), ComputePmeMgr::initialize_computes(), ComputePmeMgr::initialize_pencils(), isPmeProcessor(), CudaComputeNonbonded::launchWork(), LJTable::LJTable(), ComputeHomeTuples< TholeElem, Thole, TholeValue >::loadTuples(), HomePatch::loweAndersenVelocities(), WorkDistrib::mapComputes(), HomePatch::minimize_rattle2(), HomePatch::mollyAverage(), HomePatch::mollyMollify(), Controller::multigatorCalcEnthalpy(), NamdHybridLB::NamdHybridLB(), Node(), ComputeNonbondedCUDA::noWork(), PmePencil< CBase_PmeZPencil >::order_init(), outputPatchComputeMaps(), Patch::Patch(), WorkDistrib::patchMapInit(), HomePatch::positionsReady(), Controller::printDynamicsEnergies(), Controller::printEnergies(), HomePatch::qmSwapAtoms(), HomePatch::rattle1(), HomePatch::rattle1old(), HomePatch::rattle2(), Controller::receivePressure(), recursive_bisect_with_curve(), ComputePmeCUDADevice::recvAtoms(), HomePatch::recvCheckpointLoad(), ComputeMsmSerialMgr::recvCoord(), ComputeFmmSerialMgr::recvCoord(), ComputeExtMgr::recvCoord(), 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(), ComputeNonbondedCUDA::skip(), NamdHybridLB::splitComputes(), ComputePmeCUDADevice::spreadCharge(), startup(), NamdCentLB::Strategy(), CollectionMgr::submitForces(), ComputePmeMgr::submitReductions(), ComputePme::ungridForces(), updateGridScale(), ComputeMgr::updateLocalComputes4(), Output::velocity(), Output::velocityNeeded(), and wrap_coor_int().

Definition at line 163 of file Node.h.

Referenced by Node().

Definition at line 166 of file Node.h.

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


The documentation for this class was generated from the following files:

Generated on 17 Jan 2019 for NAMD by  doxygen 1.6.1