#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 lattice = Node::Object()->simParameters->lattice; 00046 }
|
|
|
Definition at line 34 of file Patch.h. 00034 { };
|
|
|
Definition at line 115 of file Patch.C. References avgPositionPtrBegin, and boxClosed(). 00116 {
00117 avgPositionPtrBegin = 0;
00118 this->boxClosed(3);
00119 }
|
|
|
Implemented in HomePatch, and ProxyPatch. Referenced by avgPositionBoxClosed(), forceBoxClosed(), and positionBoxClosed(). |
|
|
Definition at line 105 of file Patch.C. References boxClosed(), DebugM, Results::f, patchID, and results. 00106 {
00107 DebugM(4, "patchID("<<patchID<<") forceBoxClosed! call\n");
00108 for (int j = 0; j < Results::maxNumForces; ++j )
00109 {
00110 results.f[j] = 0;
00111 }
00112 this->boxClosed(1);
00113 }
|
|
|
Definition at line 55 of file Patch.h. Referenced by WorkDistrib::assignNodeToPatch(), ComputePatchPair::atomUpdate(), ComputePatch::atomUpdate(), ComputeHomePatch::atomUpdate(), dumpbench(), ComputePatchPair::initialize(), ComputePatch::initialize(), ComputeHomePatch::initialize(), ComputeHomeTuples< BondElem, Bond, BondValue >::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 99 of file Patch.C. References boxClosed(). 00100 {
00101 //positionPtrBegin = 0;
00102 this->boxClosed(0);
00103 }
|
|
|
Reimplemented in HomePatch. Definition at line 123 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, PatchMap::node(), numAtoms, PatchMap::Object(), Sync::Object(), AtomMap::Object(), ComputeMap::Object(), OwnerBox< Owner, Data >::open(), p, patchID, Compute::patchReady(), positionBox, positionComputeList, AtomMap::registerIDs(), ResizeArray< Elem >::resize(), results, and Flags::sequence. Referenced by HomePatch::positionsReady(), ProxyPatch::receiveAll(), and ProxyPatch::receiveData(). 00124 {
00125 DebugM(4,"Patch::positionsReady() - patchID(" << patchID <<")"<<std::endl );
00126 ComputeMap *computeMap = ComputeMap::Object();
00127
00128 if ( doneMigration ){
00129 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
00130 AtomMap::Object()->registerIDs(patchID,positionPtrBegin,positionPtrEnd);
00131 #else
00132 AtomMap::Object()->registerIDs(patchID,p.begin(),p.end());
00133 #endif
00134 }
00135
00136 boxesOpen = 2;
00137 if ( flags.doMolly ) boxesOpen++;
00138 _hasNewAtoms = (doneMigration != 0);
00139
00140 #if CMK_VERSION_BLUEGENE
00141 CmiNetworkProgressAfter (0);
00142 #endif
00143
00144 // Give all position pickup boxes access to positions
00145 //positionPtrBegin = p.begin();
00146 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
00147 positionBox.open(positionPtrBegin);
00148 #else
00149 positionBox.open(p.begin());
00150 #endif
00151 if ( flags.doMolly ) {
00152 //avgPositionPtrBegin = p_avg.begin();
00153 avgPositionBox.open(avgPositionPtrBegin);
00154 }
00155
00156 #if CMK_VERSION_BLUEGENE
00157 CmiNetworkProgressAfter (0);
00158 #endif
00159
00160 // Give all force deposit boxes access to forces
00161 Force *forcePtr;
00162 for ( int j = 0; j < Results::maxNumForces; ++j )
00163 {
00164 f[j].resize(numAtoms);
00165 forcePtr = f[j].begin();
00166 memset (forcePtr, 0, sizeof (Force) * numAtoms);
00167 results.f[j] = forcePtr;
00168 }
00169 forceBox.open(&results);
00170
00171 // Iterate over compute objects that need to be informed we are ready
00172 ComputeIDListIter cid(positionComputeList);
00173 // gzheng
00174 if (useSync) {
00175 if (Sync::Object()->holdComputes(patchID, cid, doneMigration))
00176 return;
00177 }
00178
00179 int compute_count = 0;
00180 int seq = flags.sequence;
00181 for(cid = cid.begin(); cid != cid.end(); cid++)
00182 {
00183 compute_count++;
00184 computeMap->compute(*cid)->patchReady(patchID,doneMigration,seq);
00185 }
00186 if (compute_count == 0 && PatchMap::Object()->node(patchID) != CkMyPe()) {
00187 iout << iINFO << "PATCH_COUNT: Patch " << patchID
00188 << " on PE " << CkMyPe() <<" home patch "
00189 << PatchMap::Object()->node(patchID)
00190 << " does not have any computes\n"
00191 << endi;
00192 }
00193 }
|
|
||||||||||||
|
Definition at line 67 of file Patch.C. References avgPositionBox, and OwnerBox< Owner, Data >::checkOut(). Referenced by ComputeNonbondedSelf::initialize(), ComputeNonbondedPair::initialize(), PatchElem::PatchElem(), and TuplePatchElem::TuplePatchElem(). 00068 {
00069 //DebugM(4, "registerAvgPositionPickup("<<patchID<<") from " << cid << "\n");
00070 return avgPositionBox.checkOut();
00071 }
|
|
|
Definition at line 80 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(), and TuplePatchElem::TuplePatchElem(). 00081 {
00082 if (forceComputeList.add(cid) < 0)
00083 {
00084 DebugM(7, "registerForceDeposit() failed for cid " << cid << std::endl);
00085 DebugM(7, " size of forceCompueList " << forceComputeList.size() << std::endl);
00086 return NULL;
00087 }
00088 return forceBox.checkOut();
00089 }
|
|
||||||||||||
|
Definition at line 48 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(), and TuplePatchElem::TuplePatchElem(). 00049 {
00050 //DebugM(4, "registerPositionPickupa("<<patchID<<") from " << cid << "\n");
00051 if (positionComputeList.add(cid) < 0)
00052 {
00053 DebugM(7, "registerPositionPickup() failed for cid " << cid << std::endl);
00054 return NULL;
00055 }
00056 return positionBox.checkOut();
00057 }
|
|
|
Definition at line 63 of file Patch.h. Referenced by PatchMgr::setHomePatchFixedAtomNum(). 00063 { numFixedAtoms=numFixed; } // not updated
|
|
||||||||||||
|
Definition at line 73 of file Patch.C. References avgPositionBox, OwnerBox< Owner, Data >::checkIn(), and DebugM. Referenced by ComputeNonbondedPair::~ComputeNonbondedPair(), and ComputeNonbondedSelf::~ComputeNonbondedSelf(). 00074 {
00075 DebugM(4, "UnregisterAvgPositionPickup from " << cid << "\n");
00076 avgPositionBox.checkIn(*box);
00077 *box = 0;
00078 }
|
|
||||||||||||
|
Definition at line 91 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(). 00092 {
00093 DebugM(4, "unregisterForceDeposit() computeID("<<cid<<")"<<std::endl);
00094 forceComputeList.del(cid);
00095 forceBox.checkIn(*box);
00096 *box = 0;
00097 }
|
|
||||||||||||
|
Definition at line 59 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(). 00060 {
00061 DebugM(4, "UnregisterPositionPickup from " << cid << "\n");
00062 positionComputeList.del(cid);
00063 positionBox.checkIn(*box);
00064 *box = 0;
00065 }
|
|
|
Definition at line 125 of file Patch.h. Referenced by positionsReady(). |
|
|
Definition at line 117 of file Patch.h. Referenced by positionsReady(), registerAvgPositionPickup(), and unregisterAvgPositionPickup(). |
|
|
|
|
|
Definition at line 109 of file Patch.h. Referenced by avgPositionBoxClosed(), and positionsReady(). |
|
|
|
|
|
Definition at line 123 of file Patch.h. Referenced by positionsReady(). |
|
|
Definition at line 112 of file Patch.h. Referenced by Sequencer::newMinimizeDirection(), positionsReady(), ComputeGlobal::saveTotalForces(), Sequencer::submitMinimizeReductions(), and Sequencer::submitReductions(). |
|
|
Definition at line 72 of file Patch.h. Referenced by ComputeStir::doForce(), ComputeEField::doForce(), Sync::holdComputes(), Sequencer::integrate(), Sequencer::minimize(), ComputeNonbondedPair::noWork(), positionsReady(), and Sequencer::runComputeObjects(). |
|
|
Definition at line 119 of file Patch.h. Referenced by positionsReady(), registerForceDeposit(), and unregisterForceDeposit(). |
|
|
Definition at line 120 of file Patch.h. Referenced by registerForceDeposit(), and unregisterForceDeposit(). |
|
|
|
|
|
|
|
Definition at line 79 of file Patch.h. Referenced by positionsReady(). |
|
|
|
|
|
Definition at line 76 of file Patch.h. Referenced by forceBoxClosed(), and positionsReady(). |
|
|
Definition at line 115 of file Patch.h. Referenced by positionsReady(), registerPositionPickup(), and unregisterPositionPickup(). |
|
|
Definition at line 116 of file Patch.h. Referenced by positionsReady(), registerPositionPickup(), and unregisterPositionPickup(). |
|
|
Definition at line 113 of file Patch.h. Referenced by forceBoxClosed(), and positionsReady(). |
1.3.9.1