NAMD
Patch.C
Go to the documentation of this file.
1 
7 #include "InfoStream.h"
8 #include "Patch.h"
9 #include "PatchMap.h"
10 #include "Compute.h"
11 
12 #include "AtomMap.h"
13 #include "ComputeMap.h"
14 #include "Node.h"
15 #include "Molecule.h"
16 #include "SimParameters.h"
17 #include "ResizeArrayPrimIter.h"
18 #include "Priorities.h"
19 #include "ReductionMgr.h"
20 
21 #include "Sync.h"
22 
23 #include <algorithm>
24 
26 
28  bool operator() (Compute *i, Compute *j) const {
29  return ( i->priority() < j->priority() );
30  }
31 };
32 
33 //#define DEBUGM
34 #define MIN_DEBUG_LEVEL 4
35 #include "Debug.h"
36 
38  delete atomMapper;
39 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP))
40  delete reduction;
41 #endif
42 }
43 
45  lattice(flags.lattice),
46  patchID(pd), numAtoms(0), numFixedAtoms(0),
47  avgPositionPtrBegin(0), avgPositionPtrEnd(0),
48  velocityPtrBegin(0), velocityPtrEnd(0), // BEGIN LA, END LA
49  positionBox(this,&Patch::positionBoxClosed,pd,0),
50  avgPositionBox(this,&Patch::avgPositionBoxClosed,pd,3),
51  velocityBox(this,&Patch::velocityBoxClosed,pd,4), // BEGIN LA, END LA
52  psiSumBox(this,&Patch::psiSumBoxClosed,pd,5), // begin gbis
53  intRadBox(this,&Patch::intRadBoxClosed,pd,6),
54  bornRadBox(this,&Patch::bornRadBoxClosed,pd,7),
55  dEdaSumBox(this,&Patch::dEdaSumBoxClosed,pd,8),
56  dHdrPrefixBox(this,&Patch::dHdrPrefixBoxClosed,pd,9), //end gbis
57  lcpoTypeBox(this,&Patch::lcpoTypeBoxClosed,pd,10),
58  forceBox(this,&Patch::forceBoxClosed,pd,1),
59  boxesOpen(0), _hasNewAtoms(0),
60  computesSortedByPriority(0), firstHoldableCompute(0)
61 
62  // DMK - Atom Separation (water vs. non-water)
63  #if NAMD_SeparateWaters != 0
64  ,numWaterAtoms(-1)
65  #endif
66 {
67  //CkPrintf("GBIS: PatchCreated\n");
68 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
69  positionPtrBegin = 0;
70  positionPtrEnd = 0;
71 #endif
72 
73  nChild = 0;
74  child = NULL;
75 #ifdef NODEAWARE_PROXY_SPANNINGTREE
76  #ifdef USE_NODEPATCHMGR
77  nodeChildren = NULL;
78  numNodeChild = 0;
79  #endif
80 #endif
81 
83  atomMapper = new AtomMapper(pd);
84 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP))
86 #endif
87 
88  // DMK
89  #if defined(NAMD_MIC)
90  cudaAtomPtr = NULL;
91  #if MIC_SUBMIT_ATOMS_ON_ARRIVAL != 0
92  pthread_mutex_init(&mic_atomData_mutex, NULL);
93  mic_atomData = NULL;
94  mic_atomData_seq = -1;
95  mic_atomData_allocSize_host = 0;
96  for (int i = 0; i < MIC_MAX_DEVICES_PER_NODE; i++) {
97  mic_atomData_prev[i] = NULL;
98  mic_atomData_deviceSeq[i] = -1;
99  mic_atomData_devicePtr[i] = 0;
100  mic_atomData_allocSize_device[i] = 0;
101  }
102  #endif
103  #endif
104 }
105 
107 {
108  if ( computesSortedByPriority ) {
111  }
112  //DebugM(4, "registerPositionPickupa("<<patchID<<") from " << cid->cid << "\n");
113  if (positionComputeList.add(cid) < 0)
114  {
115  DebugM(7, "registerPositionPickup() failed for cid " << cid->cid << std::endl);
116  return NULL;
117  }
118  return positionBox.checkOut(cid->cid);
119 }
120 
122 {
123  if ( computesSortedByPriority ) {
126  }
127  DebugM(4, "UnregisterPositionPickup from " << cid->cid << "\n");
129  positionBox.checkIn(*box);
130  *box = 0;
131 }
132 
134 {
135  //DebugM(4, "registerAvgPositionPickup("<<patchID<<") from " << cid->cid << "\n");
136  return avgPositionBox.checkOut(cid->cid);
137 }
138 
140 {
141  DebugM(4, "UnregisterAvgPositionPickup from " << cid->cid << "\n");
142  avgPositionBox.checkIn(*box);
143  *box = 0;
144 }
145 
146 // BEGIN LA
148 {
149  //DebugM(4, "registerVelocityPickup("<<patchID<<") from " << cid->cid << "\n");
150  return velocityBox.checkOut(cid->cid);
151 }
152 
154 {
155  DebugM(4, "UnregisterVelocityPickup from " << cid->cid << "\n");
156  velocityBox.checkIn(*box);
157  *box = 0;
158 }
159 // END LA
160 
161 //begin gbis
162 //deposit, not pickup
164 
165  if (psiSumComputeList.add(cid) < 0) {
166  DebugM(7, "registerPsiSumDeposit() failed for cid " << cid->cid << std::endl);
167  DebugM(7, " size of psiSumCompueList " << psiSumComputeList.size() << std::endl);
168  return NULL;
169  }
170  return psiSumBox.checkOut(cid->cid);
171 }
172 
174  psiSumComputeList.del(cid);
175  psiSumBox.checkIn(*box);
176  *box = 0;
177 }
179  return intRadBox.checkOut(cid->cid);
180 }
182  intRadBox.checkIn(*box);
183  *box = 0;
184 }
185 
186 //LCPO
188  return lcpoTypeBox.checkOut(cid->cid);
189 }
191  lcpoTypeBox.checkIn(*box);
192  *box = 0;
193 }
194 
196  return bornRadBox.checkOut(cid->cid);
197 }
199  bornRadBox.checkIn(*box);
200  *box = 0;
201 }
202 
204  if (dEdaSumComputeList.add(cid) < 0) {
205  DebugM(7, "registerDEdaSumDeposit() failed for cid " << cid->cid << std::endl);
206  DebugM(7, " size of dEdaSumCompueList " << dEdaSumComputeList.size() << std::endl);
207  return NULL;
208  }
209  return dEdaSumBox.checkOut(cid->cid);
210 }
212  dEdaSumComputeList.del(cid);
213  dEdaSumBox.checkIn(*box);
214  *box = 0;
215 }
216 
218 {
219  return dHdrPrefixBox.checkOut(cid->cid);
220 }
222  dHdrPrefixBox.checkIn(*box);
223  *box = 0;
224 }
225 //end gbis
226 
228 {
229  if (forceComputeList.add(cid) < 0)
230  {
231  DebugM(7, "registerForceDeposit() failed for cid " << cid->cid << std::endl);
232  DebugM(7, " size of forceCompueList " << forceComputeList.size() << std::endl);
233  return NULL;
234  }
235  return forceBox.checkOut(cid->cid);
236 }
237 
239 {
240  DebugM(4, "unregisterForceDeposit() computeID("<<cid<<")"<<std::endl);
241  forceComputeList.del(cid);
242  forceBox.checkIn(*box);
243  *box = 0;
244 }
245 
247 {
248  //positionPtrBegin = 0;
249  this->boxClosed(0);
250 }
251 
253 {
254  DebugM(4, "patchID("<<patchID<<") forceBoxClosed! call\n");
255 
256 #if ! ( defined(NAMD_CUDA) || defined(NAMD_HIP))
257  // calculate direct nonbonded virial from segregated forces and aggregate forces
258  const Vector center = lattice.unscale( PatchMap::Object()->center(patchID) );
259 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
260  const CompAtom * const __restrict pd = positionPtrBegin;
261 #else
262  const CompAtom * const __restrict pd = p.begin();
263 #endif
264  const int n = numAtoms;
265  int roff = 0;
266 
267 #ifdef NAMD_AVXTILES
268  // If "Tiles" algorithm is active, perform same reduction and virial calc
269  // in BigReal precision, but add in forces stored in tiles data structures
270  // if they were touched on this patch.
271  if (Node::Object()->simParameters->useAVXTiles) {
272  double virialHold[6], virialSlowHold[6];
273  tiles.nativeForceVirialUpdate(flags.doFullElectrostatics, flags.doVirial,
274  pd, center, results.f[Results::nbond],
276  results.f[Results::nbond_virial],
277  results.f[Results::slow_virial],
278  virialHold, virialSlowHold);
279  f[Results::nbond_virial].resize(0);
280  f[Results::slow_virial].resize(0);
281  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XX) += virialHold[0];
282  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XY) += virialHold[1];
283  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XZ) += virialHold[2];
284  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YX) += virialHold[1];
285  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YY) += virialHold[3];
286  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YZ) += virialHold[4];
287  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZX) += virialHold[2];
288  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZY) += virialHold[4];
289  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZZ) += virialHold[5];
291  roff += REDUCTION_VIRIAL_SLOW_XX - REDUCTION_VIRIAL_NBOND_XX;
292  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XX) += virialSlowHold[0];
293  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XY) += virialSlowHold[1];
294  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XZ) += virialSlowHold[2];
295  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YX) += virialSlowHold[1];
296  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YY) += virialSlowHold[3];
297  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YZ) += virialSlowHold[4];
298  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZX) += virialSlowHold[2];
299  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZY) += virialSlowHold[4];
300  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZZ) += virialSlowHold[5];
301  }
302  reduction->submit();
303  for (int j = 0; j < Results::maxNumForces; ++j ) results.f[j] = 0;
304  this->boxClosed(1);
305  return;
306  }
307 #endif
308 
309  for ( int j1 = Results::nbond; j1 <= Results::slow; ++j1, roff += REDUCTION_VIRIAL_SLOW_XX - REDUCTION_VIRIAL_NBOND_XX ) {
310  int j2 = j1 + ( Results::nbond_virial - Results::nbond );
311  Force * __restrict f1 = results.f[j1];
312  Force * __restrict f2 = results.f[j2];
313  BigReal virial_xx = 0.;
314  BigReal virial_xy = 0.;
315  BigReal virial_xz = 0.;
316  BigReal virial_yy = 0.;
317  BigReal virial_yz = 0.;
318  BigReal virial_zz = 0.;
319 #pragma omp simd reduction(+:virial_xx,virial_xy,virial_xz,virial_yy,virial_yz,virial_zz)
320 #pragma ivdep
321  for ( int i=0; i<n; ++i ) {
322  BigReal p_x = pd[i].position.x - center.x;
323  BigReal p_y = pd[i].position.y - center.y;
324  BigReal p_z = pd[i].position.z - center.z;
325  BigReal f_x = f2[i].x;
326  BigReal f_y = f2[i].y;
327  BigReal f_z = f2[i].z;
328  virial_xx += f_x * p_x;
329  virial_xy += f_x * p_y;
330  virial_xz += f_x * p_z;
331  virial_yy += f_y * p_y;
332  virial_yz += f_y * p_z;
333  virial_zz += f_z * p_z;
334  f1[i].x += f_x;
335  f1[i].y += f_y;
336  f1[i].z += f_z;
337  }
338  f[j2].resize(0);
339  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XX) += virial_xx;
340  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XY) += virial_xy;
341  reduction->item(roff + REDUCTION_VIRIAL_NBOND_XZ) += virial_xz;
342  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YX) += virial_xy;
343  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YY) += virial_yy;
344  reduction->item(roff + REDUCTION_VIRIAL_NBOND_YZ) += virial_yz;
345  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZX) += virial_xz;
346  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZY) += virial_yz;
347  reduction->item(roff + REDUCTION_VIRIAL_NBOND_ZZ) += virial_zz;
348  }
349  reduction->submit();
350 #endif
351 
352  for (int j = 0; j < Results::maxNumForces; ++j )
353  {
354  results.f[j] = 0;
355  }
356  this->boxClosed(1);
357 }
358 
360 {
362  this->boxClosed(3);
363 }
364 
365 // BEGIN LA
367 {
368  DebugM(4, "patchID("<<patchID<<") velocityBoxClosed! call\n");
369  velocityPtrBegin = 0;
370  this->boxClosed(4); // ?? Don't know about number
371 }
372 // END LA
373 
374 // void Patch::boxClosed(int box) is virtual
375 
376 // begin gbis
378  this->boxClosed(5);
379 }
381  //dHdrPrefixPtr = 0;
382  this->boxClosed(6);
383 }
385  //bornRadPtr = 0;
386  this->boxClosed(7);
387 }
389  //dEdaSumPtr = 0;
390  this->boxClosed(8);
391 }
393  //dHdrPrefixPtr = 0;
394  this->boxClosed(9);
395 }
396 // end gbis
397 
398 //LCPO
400  this->boxClosed(10);
401 }
402 
403 void Patch::positionsReady(int doneMigration, int startup)
404 {
405  DebugM(4,"Patch::positionsReady() - patchID(" << patchID <<")"<<std::endl );
407 
408  // The atom map needs to be updated for host migration, device migration startup and
409  // device migration + some advanced features
410  const bool updateAtomMap = (startup ||
411  !simParams->useDeviceMigration ||
412  simParams->updateAtomMap);
413  if (doneMigration && updateAtomMap) {
414 // #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
415 // AtomMap::Object()->registerIDs(patchID,positionPtrBegin,positionPtrEnd);
416 // #else
418 // #endif
419 
420  #ifdef NAMD_AVXTILES
422  #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
423  const CompAtom * const pd = positionPtrBegin;
424  #else
425  const CompAtom * const pd = p.begin();
426  #endif
427  tiles.atomUpdate(pd, getCompAtomExtInfo());
428  }
429  #endif
430  }
431 
432 #ifdef NAMD_KNL
433  #if defined(NAMD_AVXTILES)
434  if (!Node::Object()->simParameters->useAVXTiles)
435  #endif
436  {
437  const Vector center = lattice.unscale( PatchMap::Object()->center(patchID) );
438  const int n = numAtoms;
439  pFlt.resize(n);
440  CompAtomFlt * const pf = pFlt.begin();
441 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
442  const CompAtom * const pd = positionPtrBegin;
443 #else
444  const CompAtom * const pd = p.begin();
445 #endif
446  for ( int i=0; i<n; ++i ) {
447  // need to subtract center in double precision, then assign to float
448  pf[i].position.x = pd[i].position.x - center.x;
449  pf[i].position.y = pd[i].position.y - center.y;
450  pf[i].position.z = pd[i].position.z - center.z;
451  pf[i].vdwType = pd[i].vdwType;
452  }
453  }
454 #endif
455  boxesOpen = 2;
456  if ( flags.doMolly ) boxesOpen++;
457  // BEGIN LA
458  if (flags.doLoweAndersen) {
459  DebugM(4, "Patch::positionsReady, flags.doMolly = " << flags.doMolly << "\n");
460  boxesOpen++;
461  }
462  // END LA
463  _hasNewAtoms = (doneMigration != 0);
464 
465 #if CMK_BLUEGENEL
466  CmiNetworkProgressAfter (0);
467 #endif
468 
469  // Give all position pickup boxes access to positions
470  //positionPtrBegin = p.begin();
471 #ifdef REMOVE_PROXYDATAMSG_EXTRACOPY
472  positionBox.open(positionPtrBegin);
473 #else
474  positionBox.open(p.begin());
475 #endif
476  if ( flags.doMolly ) {
477  //avgPositionPtrBegin = p_avg.begin();
479  }
480 
481  // BEGIN LA
482  if (flags.doLoweAndersen) {
484  }
485  // END LA
486  // begin gbis
487  if (flags.doGBIS) {
488  boxesOpen += 5;
489  //intRad should already be taken care of
491  psiSum.resize(numAtoms);//resize array
492  psiSum.setall(0);
494  psiFin.resize(numAtoms);//has no box
495  psiFin.setall(0);
497  bornRad.setall(0);
499  dEdaSum.resize(numAtoms);//resize array
500  dEdaSum.setall(0);
503  dHdrPrefix.setall(0);
505  }
506  // end gbis
507 
508  //LCPO
509  if (flags.doLCPO) {
510  boxesOpen++;
512  }
513 
514 #if CMK_BLUEGENEL
515  CmiNetworkProgressAfter (0);
516 #endif
517 
518  // Give all force deposit boxes access to forces
519  Force *forcePtr;
520 #ifdef NODEGROUP_FORCE_REGISTER
521 //#if 0
522  // Clear forces if GPU-offload or GPU-resident without device migration
523  const bool clearForces = (!simParams->CUDASOAintegrate ||
524  (doneMigration && !simParams->useDeviceMigration) );
525  for ( int j = 0; j < Results::maxNumForces; ++j )
526  {
527  f[j].resize(numAtoms);
528  forcePtr = f[j].begin();
529  if(clearForces) memset (forcePtr, 0, sizeof (Force) * numAtoms);
530  results.f[j] = forcePtr;
531  }
532 #else
533  for ( int j = 0; j < Results::maxNumForces; ++j )
534  {
535  f[j].resize(numAtoms);
536  forcePtr = f[j].begin();
537  memset (forcePtr, 0, sizeof (Force) * numAtoms);
538  results.f[j] = forcePtr;
539  }
540 #ifdef DEBUG_MINIMIZE
541  Force *pf = results.f[1];
542  int k=0;
543  printf("%s, line %d\n", __FILE__, __LINE__);
544  printf(" initial: pf[%d] = %f %f %f\n", k, pf[k].x, pf[k].y, pf[k].z);
545 #endif
546 #endif
547  // fprintf(stderr, "(Pe[%d] tstep %d) opening box on patch %d\n",
548  // CkMyPe(), this->flags.step, this->patchID);
550 
551  #ifdef NAMD_AVXTILES
552  // Zero data in arrays in "Tiles" data structures if they have been touched
553  if (Node::Object()->simParameters->useAVXTiles)
554  tiles.zeroForces(flags.doFullElectrostatics);
555  #endif
556 
557  if ( ! computesSortedByPriority ) {
558  if (positionComputeList.size() == 0 && PatchMap::Object()->node(patchID) != CkMyPe()) {
559  iout << iINFO << "PATCH_COUNT: Patch " << patchID
560  << " on PE " << CkMyPe() <<" home patch "
562  << " does not have any computes\n"
563  << endi;
564  }
565 
566  // XXX TODO: Maybe get rid of this sorting and see what happens
568  std::sort(positionComputeList.begin(), positionComputeList.end(), so);
570  int i;
571  for ( i=0; i<positionComputeList.size(); ++i ) {
572  if ( positionComputeList[i]->priority() > PME_PRIORITY ) break;
573  }
575  }
576 
577  int seq = flags.sequence;
578 
579  // Iterate over compute objects that need to be informed we are ready
581  for ( int i=0; i < firstHoldableCompute; ++i, ++cid ) {
582  (*cid)->patchReady(patchID,doneMigration,seq);
583  }
584  Compute **cend = positionComputeList.end();
585  // gzheng
586  if (Sync::Object()->holdComputes(patchID, cid, cend, doneMigration, seq)) {
587  return;
588  }
589 
590  for( ; cid != cend; cid++ ) {
591  (*cid)->patchReady(patchID,doneMigration,seq);
592  }
593 
594 }
595 
596 // begin gbis
597 
600 
601  int seq = flags.sequence;
602  for(cid = cid.begin(); cid != cid.end(); cid++) {
603  if ( (*cid)->type() == computeNonbondedSelfType ||
604  (*cid)->type() == computeNonbondedPairType
605 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
606  || (*cid)->type() == computeNonbondedCUDA2Type
607 #endif
608  ) {
609  (*cid)->gbisP2PatchReady(patchID,seq);
610  }
611  }
612 }
613 
615 
617 
618  int seq = flags.sequence;
619  for(cid = cid.begin(); cid != cid.end(); cid++) {
620  if ( (*cid)->type() == computeNonbondedSelfType ||
621  (*cid)->type() == computeNonbondedPairType
622 #if defined(NAMD_CUDA) || defined(NAMD_HIP)
623  || (*cid)->type() == computeNonbondedCUDA2Type
624 #endif
625  ) {
626  (*cid)->gbisP3PatchReady(patchID,seq);
627  }
628  }
629 }
630 
631 //end gbis
632 
static Node * Object()
Definition: Node.h:86
ComputePtrList forceComputeList
Definition: Patch.h:247
register BigReal virial_xy
Box< Patch, GBReal > * registerDEdaSumDeposit(Compute *cid)
Definition: Patch.C:203
register BigReal virial_xz
std::ostream & iINFO(std::ostream &s)
Definition: InfoStream.C:81
Box< Patch, CompAtom > * registerAvgPositionPickup(Compute *cid)
Definition: Patch.C:133
int firstHoldableCompute
Definition: Patch.h:218
int size(void) const
Definition: ResizeArray.h:131
RealList intRad
Definition: Patch.h:162
register BigReal virial_yz
int computesSortedByPriority
Definition: Patch.h:217
void unregisterAvgPositionPickup(Compute *cid, Box< Patch, CompAtom > **const box)
Definition: Patch.C:139
ComputePtrList dEdaSumComputeList
Definition: Patch.h:237
OwnerBox< Patch, Results > forceBox
Definition: Patch.h:246
ComputePtrList psiSumComputeList
Definition: Patch.h:233
void unregisterPsiSumDeposit(Compute *cid, Box< Patch, GBReal > **const box)
Definition: Patch.C:173
void dHdrPrefixBoxClosed(void)
Definition: Patch.C:392
Lattice & lattice
Definition: Patch.h:127
bool operator()(Compute *i, Compute *j) const
Definition: Patch.C:28
void checkIn(Box< Owner, Data > *box)
Definition: OwnerBox.h:104
static PatchMap * Object()
Definition: PatchMap.h:27
Definition: Vector.h:72
#define NAMD_SeparateWaters
DMK - Atom Separation (water vs. non-water)
Definition: common.h:204
void sort(void)
Definition: SortedArray.h:66
SimParameters * simParameters
Definition: Node.h:181
OwnerBox< Patch, Real > bornRadBox
Definition: Patch.h:234
NAMD_HOST_DEVICE Position unscale(ScaledPosition s) const
Definition: Lattice.h:77
BigReal & item(int i)
Definition: ReductionMgr.h:313
#define DebugM(x, y)
Definition: Debug.h:75
void unregisterForceDeposit(Compute *cid, Box< Patch, Results > **const box)
Definition: Patch.C:238
OwnerBox< Patch, int > lcpoTypeBox
Definition: Patch.h:243
std::ostream & endi(std::ostream &s)
Definition: InfoStream.C:54
BigReal z
Definition: Vector.h:74
void unregisterDHdrPrefixPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:221
RealList dHdrPrefix
Definition: Patch.h:166
Position position
Definition: NamdTypes.h:77
SubmitReduction * willSubmit(int setID, int size=-1)
Definition: ReductionMgr.C:366
Box< Patch, Real > * registerBornRadPickup(Compute *cid)
Definition: Patch.C:195
GBRealList psiFin
Definition: Patch.h:164
void dEdaSumBoxClosed(void)
Definition: Patch.C:388
void registerIDsCompAtomExt(const CompAtomExt *begin, const CompAtomExt *end)
Definition: AtomMap.C:24
static ReductionMgr * Object(void)
Definition: ReductionMgr.h:279
#define iout
Definition: InfoStream.h:51
int doLoweAndersen
Definition: PatchTypes.h:27
Box< Patch, int > * registerLcpoTypePickup(Compute *cid)
Definition: Patch.C:187
ResizeArrayPrimIter< Compute * > ComputePtrListIter
Definition: Patch.C:25
CudaAtom * cudaAtomPtr
Definition: Patch.h:212
void forceBoxClosed(void)
Definition: Patch.C:252
AtomMapper * atomMapper
Definition: Patch.h:159
GBRealList dEdaSum
Definition: Patch.h:167
void open(Data *d)
Definition: OwnerBox.h:39
Definition: Patch.h:35
Flags flags
Definition: Patch.h:128
void resize(int i)
Definition: ResizeArray.h:84
void setall(const Elem &elem)
Definition: ResizeArray.h:94
Patch(PatchID pd)
Definition: Patch.C:44
register BigReal virial_yy
Box< Patch, GBReal > * registerPsiSumDeposit(Compute *cid)
Definition: Patch.C:163
#define PME_PRIORITY
Definition: Priorities.h:29
int add(const Elem &elem)
Definition: SortedArray.h:55
int boxesOpen
Definition: Patch.h:250
OwnerBox< Patch, CompAtom > avgPositionBox
Definition: Patch.h:222
ResizeArrayPrimIter< T > end(void) const
IntList lcpoType
Definition: Patch.h:171
GBRealList psiSum
Definition: Patch.h:163
void gbisP2Ready()
Definition: Patch.C:598
int doFullElectrostatics
Definition: PatchTypes.h:23
Box< Patch, Real > * registerIntRadPickup(Compute *cid)
Definition: Patch.C:178
OwnerBox< Patch, CompAtom > positionBox
Definition: Patch.h:220
int16 vdwType
Definition: NamdTypes.h:79
Force * f[maxNumForces]
Definition: PatchTypes.h:146
CompAtomList p
Definition: Patch.h:153
int priority(void)
Definition: Compute.h:65
static Sync * Object()
Definition: Sync.h:52
int numAtoms
Definition: Patch.h:151
register BigReal virial_zz
BigReal x
Definition: Vector.h:74
void lcpoTypeBoxClosed(void)
Definition: Patch.C:399
int sequence
Definition: PatchTypes.h:18
void del(const Elem &elem)
Definition: SortedArray.h:59
Box< Owner, Data > * checkOut(int id)
Definition: OwnerBox.h:85
CompAtom * avgPositionPtrBegin
Definition: Patch.h:204
void gbisP3Ready()
Definition: Patch.C:614
OwnerBox< Patch, CompAtom > velocityBox
Definition: Patch.h:225
void unregisterBornRadPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:198
ComputePtrList positionComputeList
Definition: Patch.h:221
OwnerBox< Patch, Real > intRadBox
Definition: Patch.h:230
void unregisterPositionPickup(Compute *cid, Box< Patch, CompAtom > **const box)
Definition: Patch.C:121
ResizeArrayPrimIter< T > begin(void) const
OwnerBox< Patch, Real > dHdrPrefixBox
Definition: Patch.h:238
#define simParams
Definition: Output.C:129
RealList bornRad
Definition: Patch.h:165
iterator begin(void)
Definition: ResizeArray.h:36
const PatchID patchID
Definition: Patch.h:150
int _hasNewAtoms
Definition: Patch.h:252
OwnerBox< Patch, GBReal > dEdaSumBox
Definition: Patch.h:236
iterator end(void)
Definition: ResizeArray.h:37
void unregisterIntRadPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:181
Box< Patch, Real > * registerDHdrPrefixPickup(Compute *cid)
Definition: Patch.C:217
int doVirial
Definition: PatchTypes.h:21
BigReal y
Definition: Vector.h:74
int doLCPO
Definition: PatchTypes.h:30
register BigReal virial_xx
int * child
Definition: Patch.h:269
void bornRadBoxClosed(void)
Definition: Patch.C:384
void positionBoxClosed(void)
Definition: Patch.C:246
void unregisterVelocityPickup(Compute *cid, Box< Patch, CompAtom > **const box)
Definition: Patch.C:153
int doGBIS
Definition: PatchTypes.h:29
Results results
Definition: Patch.h:215
void submit(void)
Definition: ReductionMgr.h:324
void avgPositionBoxClosed(void)
Definition: Patch.C:359
int node(int pid) const
Definition: PatchMap.h:114
ForceList f[Results::maxNumForces]
Definition: Patch.h:214
void velocityBoxClosed(void)
Definition: Patch.C:366
int nChild
Definition: Patch.h:270
int32 PatchID
Definition: NamdTypes.h:277
CompAtomExtList pExt
Definition: Patch.h:181
void positionsReady(int n=0, int startup=1)
Definition: Patch.C:403
const ComputeID cid
Definition: Compute.h:43
void unregisterDEdaSumDeposit(Compute *cid, Box< Patch, GBReal > **const box)
Definition: Patch.C:211
OwnerBox< Patch, GBReal > psiSumBox
Definition: Patch.h:232
void intRadBoxClosed(void)
Definition: Patch.C:380
void psiSumBoxClosed(void)
Definition: Patch.C:377
Box< Patch, CompAtom > * registerVelocityPickup(Compute *cid)
Definition: Patch.C:147
virtual ~Patch()
Definition: Patch.C:37
void unregisterLcpoTypePickup(Compute *cid, Box< Patch, int > **const box)
Definition: Patch.C:190
int doMolly
Definition: PatchTypes.h:24
virtual void boxClosed(int)=0
Box< Patch, CompAtom > * registerPositionPickup(Compute *cid)
Definition: Patch.C:106
double BigReal
Definition: common.h:123
CompAtom * velocityPtrBegin
Definition: Patch.h:208
CompAtomExt * getCompAtomExtInfo()
Definition: Patch.h:117
Box< Patch, Results > * registerForceDeposit(Compute *cid)
Definition: Patch.C:227