#include <Patch.h>
Inheritance diagram for Patch:

|
|
Definition at line 27 of file Patch.C. References SimParameters::lattice, lattice, NAMD_SeparateWaters, Node::Object(), and Node::simParameters. 00027 : 00028 lattice(flags.lattice), 00029 patchID(pd), numAtoms(0), numFixedAtoms(0), 00030 avgPositionPtrBegin(0), avgPositionPtrEnd(0), 00031 positionBox(this,&Patch::positionBoxClosed), 00032 avgPositionBox(this,&Patch::avgPositionBoxClosed), 00033 forceBox(this,&Patch::forceBoxClosed), 00034 boxesOpen(0), _hasNewAtoms(0) 00035 00036 // DMK - Atom Separation (water vs. non-water) 00037 #if NAMD_SeparateWaters != 0 00038 ,numWaterAtoms(-1) 00039 #endif 00040 { 00041 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY 00042 positionPtrBegin = 0; 00043 positionPtrEnd = 0; 00044 #endif 00045 00046 #ifdef NODEAWARE_PROXY_SPANNINGTREE 00047 numChild = 0; 00048 children = NULL; 00049 #ifdef USE_NODEPATCHMGR 00050 nodeChildren = NULL; 00051 numNodeChild = 0; 00052 #endif 00053 #endif 00054 00055 lattice = Node::Object()->simParameters->lattice; 00056 }
|
|
|
Definition at line 34 of file Patch.h. 00034 { };
|
|
|
Definition at line 125 of file Patch.C. References avgPositionPtrBegin, and boxClosed(). 00126 {
00127 avgPositionPtrBegin = 0;
00128 this->boxClosed(3);
00129 }
|
|
|
Implemented in HomePatch, and ProxyPatch. Referenced by avgPositionBoxClosed(), forceBoxClosed(), and positionBoxClosed(). |
|
|
Definition at line 115 of file Patch.C. References boxClosed(), DebugM, Results::f, j, patchID, and results. 00116 {
00117 DebugM(4, "patchID("<<patchID<<") forceBoxClosed! call\n");
00118 for (int j = 0; j < Results::maxNumForces; ++j )
00119 {
00120 results.f[j] = 0;
00121 }
00122 this->boxClosed(1);
00123 }
|
|
|
Definition at line 67 of file Patch.h. Referenced by ComputePatchPair::doWork(), ComputePatch::doWork(), and ComputeNonbondedCUDA::doWork().
|
|
|
Definition at line 55 of file Patch.h. Referenced by WorkDistrib::assignNodeToPatch(), ComputePatchPair::atomUpdate(), ComputePatch::atomUpdate(), ComputeHomePatch::atomUpdate(), ComputeGridForce::doForce(), ComputeNonbondedCUDA::doWork(), dumpbench(), ComputeGridForce::finishForce(), ComputePatchPair::initialize(), ComputePatch::initialize(), ComputeHomePatch::initialize(), ComputeHomeTuples< ExclElem, Exclusion, int >::loadTuples(), and PatchMgr::moveAllBy(). 00055 { return numAtoms; }
|
|
|
Definition at line 65 of file Patch.h. 00065 { return positionComputeList.size(); }
|
|
|
Definition at line 62 of file Patch.h. 00062 { return numFixedAtoms; } // not updated
|
|
|
Definition at line 64 of file Patch.h. References PatchID. Referenced by ProxyMgr::createProxy(), ComputePatch::initialize(), ComputeHomePatch::initialize(), PatchElem::PatchElem(), Sequencer::rebalanceLoad(), Sequencer::Sequencer(), and TuplePatchElem::TuplePatchElem(). 00064 { return patchID; }
|
|
|
Definition at line 33 of file Patch.h. 00033 { return _hasNewAtoms; }
|
|
|
Definition at line 109 of file Patch.C. References boxClosed(). 00110 {
00111 //positionPtrBegin = 0;
00112 this->boxClosed(0);
00113 }
|
|
|
Reimplemented in HomePatch. Definition at line 133 of file Patch.C. References _hasNewAtoms, avgPositionBox, avgPositionPtrBegin, ResizeArrayPrimIter< T >::begin(), ResizeArray< Elem >::begin(), boxesOpen, ComputeMap::compute(), ComputeIDListIter, DebugM, Flags::doMolly, ResizeArrayPrimIter< T >::end(), ResizeArray< Elem >::end(), Results::f, f, flags, Force, forceBox, Sync::holdComputes(), iINFO(), iout, j, PatchMap::node(), numAtoms, PatchMap::Object(), Sync::Object(), AtomMap::Object(), ComputeMap::Object(), OwnerBox< Owner, Data >::open(), p, patchID, Compute::patchReady(), pExt, positionBox, positionComputeList, AtomMap::registerIDs(), ResizeArray< Elem >::resize(), results, and Flags::sequence. Referenced by HomePatch::positionsReady(), ProxyPatch::receiveAll(), and ProxyPatch::receiveData(). 00134 {
00135 DebugM(4,"Patch::positionsReady() - patchID(" << patchID <<")"<<std::endl );
00136 ComputeMap *computeMap = ComputeMap::Object();
00137
00138 if ( doneMigration ){
00139 // #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
00140 // AtomMap::Object()->registerIDs(patchID,positionPtrBegin,positionPtrEnd);
00141 // #else
00142 AtomMap::Object()->registerIDs(patchID,pExt.begin(),pExt.end());
00143 // #endif
00144 }
00145
00146 boxesOpen = 2;
00147 if ( flags.doMolly ) boxesOpen++;
00148 _hasNewAtoms = (doneMigration != 0);
00149
00150 #if CMK_BLUEGENEL
00151 CmiNetworkProgressAfter (0);
00152 #endif
00153
00154 // Give all position pickup boxes access to positions
00155 //positionPtrBegin = p.begin();
00156 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
00157 positionBox.open(positionPtrBegin);
00158 #else
00159 positionBox.open(p.begin());
00160 #endif
00161 if ( flags.doMolly ) {
00162 //avgPositionPtrBegin = p_avg.begin();
00163 avgPositionBox.open(avgPositionPtrBegin);
00164 }
00165
00166 #if CMK_BLUEGENEL
00167 CmiNetworkProgressAfter (0);
00168 #endif
00169
00170 // Give all force deposit boxes access to forces
00171 Force *forcePtr;
00172 for ( int j = 0; j < Results::maxNumForces; ++j )
00173 {
00174 f[j].resize(numAtoms);
00175 forcePtr = f[j].begin();
00176 memset (forcePtr, 0, sizeof (Force) * numAtoms);
00177 results.f[j] = forcePtr;
00178 }
00179 forceBox.open(&results);
00180
00181 // Iterate over compute objects that need to be informed we are ready
00182 ComputeIDListIter cid(positionComputeList);
00183 // gzheng
00184 if (useSync) {
00185 if (Sync::Object()->holdComputes(patchID, cid, doneMigration))
00186 return;
00187 }
00188
00189 int compute_count = 0;
00190 int seq = flags.sequence;
00191 for(cid = cid.begin(); cid != cid.end(); cid++)
00192 {
00193 compute_count++;
00194 computeMap->compute(*cid)->patchReady(patchID,doneMigration,seq);
00195 }
00196 if (compute_count == 0 && PatchMap::Object()->node(patchID) != CkMyPe()) {
00197 iout << iINFO << "PATCH_COUNT: Patch " << patchID
00198 << " on PE " << CkMyPe() <<" home patch "
00199 << PatchMap::Object()->node(patchID)
00200 << " does not have any computes\n"
00201 << endi;
00202 }
00203 }
|
|
||||||||||||
|
Definition at line 77 of file Patch.C. References avgPositionBox, and OwnerBox< Owner, Data >::checkOut(). Referenced by ComputeNonbondedSelf::initialize(), ComputeNonbondedPair::initialize(), PatchElem::PatchElem(), and TuplePatchElem::TuplePatchElem(). 00078 {
00079 //DebugM(4, "registerAvgPositionPickup("<<patchID<<") from " << cid << "\n");
00080 return avgPositionBox.checkOut();
00081 }
|
|
|
Definition at line 90 of file Patch.C. References SortedArray< Elem >::add(), OwnerBox< Owner, Data >::checkOut(), DebugM, forceBox, forceComputeList, and ResizeArray< Elem >::size(). Referenced by ComputePatchPair::initialize(), ComputePatch::initialize(), ComputeHomePatch::initialize(), PatchElem::PatchElem(), ComputeNonbondedCUDA::requirePatch(), and TuplePatchElem::TuplePatchElem(). 00091 {
00092 if (forceComputeList.add(cid) < 0)
00093 {
00094 DebugM(7, "registerForceDeposit() failed for cid " << cid << std::endl);
00095 DebugM(7, " size of forceCompueList " << forceComputeList.size() << std::endl);
00096 return NULL;
00097 }
00098 return forceBox.checkOut();
00099 }
|
|
||||||||||||
|
Definition at line 58 of file Patch.C. References SortedArray< Elem >::add(), OwnerBox< Owner, Data >::checkOut(), DebugM, positionBox, and positionComputeList. Referenced by ComputePatchPair::initialize(), ComputePatch::initialize(), ComputeHomePatch::initialize(), PatchElem::PatchElem(), ComputeNonbondedCUDA::requirePatch(), and TuplePatchElem::TuplePatchElem(). 00059 {
00060 //DebugM(4, "registerPositionPickupa("<<patchID<<") from " << cid << "\n");
00061 if (positionComputeList.add(cid) < 0)
00062 {
00063 DebugM(7, "registerPositionPickup() failed for cid " << cid << std::endl);
00064 return NULL;
00065 }
00066 return positionBox.checkOut();
00067 }
|
|
|
Definition at line 63 of file Patch.h. Referenced by PatchMgr::setHomePatchFixedAtomNum(). 00063 { numFixedAtoms=numFixed; } // not updated
|
|
||||||||||||
|
Definition at line 83 of file Patch.C. References avgPositionBox, OwnerBox< Owner, Data >::checkIn(), and DebugM. Referenced by ComputeNonbondedPair::~ComputeNonbondedPair(), and ComputeNonbondedSelf::~ComputeNonbondedSelf(). 00084 {
00085 DebugM(4, "UnregisterAvgPositionPickup from " << cid << "\n");
00086 avgPositionBox.checkIn(*box);
00087 *box = 0;
00088 }
|
|
||||||||||||
|
Definition at line 101 of file Patch.C. References OwnerBox< Owner, Data >::checkIn(), DebugM, SortedArray< Elem >::del(), forceBox, and forceComputeList. Referenced by ComputeHomePatch::~ComputeHomePatch(), ComputePatch::~ComputePatch(), and ComputePatchPair::~ComputePatchPair(). 00102 {
00103 DebugM(4, "unregisterForceDeposit() computeID("<<cid<<")"<<std::endl);
00104 forceComputeList.del(cid);
00105 forceBox.checkIn(*box);
00106 *box = 0;
00107 }
|
|
||||||||||||
|
Definition at line 69 of file Patch.C. References OwnerBox< Owner, Data >::checkIn(), DebugM, SortedArray< Elem >::del(), positionBox, and positionComputeList. Referenced by ComputeHomePatch::~ComputeHomePatch(), ComputePatch::~ComputePatch(), and ComputePatchPair::~ComputePatchPair(). 00070 {
00071 DebugM(4, "UnregisterPositionPickup from " << cid << "\n");
00072 positionComputeList.del(cid);
00073 positionBox.checkIn(*box);
00074 *box = 0;
00075 }
|
|
|
Definition at line 121 of file Patch.h. Referenced by positionsReady(). |
|
|
Definition at line 113 of file Patch.h. Referenced by positionsReady(), registerAvgPositionPickup(), and unregisterAvgPositionPickup(). |
|
|
|
|
|
Definition at line 105 of file Patch.h. Referenced by avgPositionBoxClosed(), and positionsReady(). |
|
|
|
|
|
Definition at line 119 of file Patch.h. Referenced by positionsReady(). |
|
|
Definition at line 108 of file Patch.h. Referenced by Sequencer::minimizeMoveDownhill(), Sequencer::newMinimizeDirection(), positionsReady(), Sequencer::runComputeObjects(), ComputeGlobal::saveTotalForces(), Sequencer::submitMinimizeReductions(), and Sequencer::submitReductions(). |
|
|
|
Definition at line 115 of file Patch.h. Referenced by positionsReady(), registerForceDeposit(), and unregisterForceDeposit(). |
|
|
Definition at line 116 of file Patch.h. Referenced by registerForceDeposit(), and unregisterForceDeposit(). |
|
|
|
|
|
|
|
Definition at line 77 of file Patch.h. Referenced by ComputeGridForce::doWork(), and positionsReady(). |
|
|
|
|
|
Definition at line 74 of file Patch.h. Referenced by forceBoxClosed(), and positionsReady(). |
|
|
Definition at line 88 of file Patch.h. Referenced by positionsReady(). |
|
|
Definition at line 111 of file Patch.h. Referenced by positionsReady(), registerPositionPickup(), and unregisterPositionPickup(). |
|
|
Definition at line 112 of file Patch.h. Referenced by positionsReady(), registerPositionPickup(), and unregisterPositionPickup(). |
|
|
Definition at line 109 of file Patch.h. Referenced by forceBoxClosed(), and positionsReady(). |
1.3.9.1