#include <sfftw.h>#include <srfftw.h>#include <assert.h>#include "InfoStream.h"#include "Node.h"#include "PatchMap.h"#include "PatchMap.inl"#include "AtomMap.h"#include "OptPme.h"#include "OptPmeMgr.decl.h"#include "OptPmeRealSpace.h"#include "PmeKSpace.h"#include "ComputeNonbondedUtil.h"#include "PatchMgr.h"#include "Molecule.h"#include "ReductionMgr.h"#include "ComputeMgr.decl.h"#include "Debug.h"#include "SimParameters.h"#include "WorkDistrib.h"#include "varsizemsg.h"#include "Random.h"#include "Priorities.h"#include "fftlib.h"#include "fftmap.h"#include "fftlib.C"#include "OptPmeMgr.def.h"Go to the source code of this file.
Classes | |
| class | OptPmeMgr |
Defines | |
| #define | MIN_DEBUG_LEVEL 3 |
Functions | |
| void | pme_f2d (double *dst, float *src, int N) |
| void | pme_d2f (float *dst, double *src, int N) |
| void | initializePmeGrid (SimParameters *simParams, PmeGrid &grid) |
| void | scale_n_copy_coordinates (CompAtom *x, PmeParticle p[], int &N, Lattice &lattice, PmeGrid grid, double xmin, double xlen, double ymin, double ylen, double zmin, double zlen, int &scg) |
| void | recv_ungrid_done (void *m) |
Variables | |
| char * | pencilPMEProcessors |
| int | many_to_many_start = 0x7fffffff |
| CmiNodeLock | fftw_plan_lock |
|
|
Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved. |
|
||||||||||||
|
Definition at line 96 of file OptPme.C. References PmeGrid::block1, PmeGrid::block2, PmeGrid::block3, PmeGrid::dim2, PmeGrid::dim3, PmeGrid::K1, PmeGrid::K2, PmeGrid::K3, PmeGrid::order, SimParameters::PMEGridSizeX, SimParameters::PMEGridSizeY, SimParameters::PMEGridSizeZ, SimParameters::PMEInterpOrder, SimParameters::PMEMinPoints, SimParameters::PMEPencils, simParams, PmeGrid::xBlocks, PmeGrid::yBlocks, and PmeGrid::zBlocks. Referenced by OptPmeMgr::initialize(). 00096 {
00097 int xBlocks = 0, yBlocks = 0, zBlocks= 0;
00098
00099 if ( simParams->PMEPencils > 1 ) {
00100 xBlocks = yBlocks = zBlocks = simParams->PMEPencils;
00101 } else {
00102 int nb2 = ( simParams->PMEGridSizeX * simParams->PMEGridSizeY
00103 * simParams->PMEGridSizeZ ) / simParams->PMEMinPoints;
00104 if ( nb2 > CkNumPes() ) nb2 = CkNumPes();
00105 int nb = (int) sqrt((float)nb2);
00106 xBlocks = zBlocks = nb;
00107 yBlocks = nb2 / nb;
00108 }
00109
00110 int dimx = simParams->PMEGridSizeX;
00111 int bx = 1 + ( dimx - 1 ) / xBlocks;
00112 xBlocks = 1 + ( dimx - 1 ) / bx;
00113
00114 int dimy = simParams->PMEGridSizeY;
00115 int by = 1 + ( dimy - 1 ) / yBlocks;
00116 yBlocks = 1 + ( dimy - 1 ) / by;
00117
00118 int dimz = simParams->PMEGridSizeZ / 2 + 1; // complex
00119 int bz = 1 + ( dimz - 1 ) / zBlocks;
00120 zBlocks = 1 + ( dimz - 1 ) / bz;
00121
00122 grid.xBlocks = xBlocks;
00123 grid.yBlocks = yBlocks;
00124 grid.zBlocks = zBlocks;
00125
00126 grid.K1 = simParams->PMEGridSizeX;
00127 grid.K2 = simParams->PMEGridSizeY;
00128 grid.K3 = simParams->PMEGridSizeZ;
00129 grid.order = simParams->PMEInterpOrder;
00130 grid.dim2 = grid.K2;
00131 grid.dim3 = 2 * (grid.K3/2 + 1);
00132
00133 grid.block1 = ( grid.K1 + xBlocks - 1 ) / xBlocks;
00134 grid.block2 = ( grid.K2 + yBlocks - 1 ) / yBlocks;
00135 grid.block3 = ( grid.K3/2 + 1 + zBlocks - 1 ) / zBlocks; // complex
00136 }
|
|
||||||||||||||||
|
Definition at line 988 of file OptPme.C. Referenced by OptPmeCompute::doWork(). 00988 {
00989 #pragma disjoint (*src, *dst)
00990 #pragma unroll (8)
00991 for (int i = 0; i < N; i++)
00992 dst[i] = src[i];
00993 }
|
|
||||||||||||||||
|
Definition at line 981 of file OptPme.C. Referenced by OptPmeCompute::ungridForces(). 00981 {
00982 #pragma disjoint (*src, *dst)
00983 #pragma unroll (8)
00984 for (int i = 0; i < N; i++)
00985 dst[i] = src[i];
00986 }
|
|
|
Definition at line 524 of file OptPme.C. 00524 {
00525 OptPmeDummyMsg *msg = (OptPmeDummyMsg *) m;
00526 CProxy_OptPmeMgr pmeProxy (CkpvAccess(BOCclass_group).computePmeMgr);
00527 pmeProxy[CkMyPe()].ungridCalc (msg);
00528 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 143 of file OptPme.C. References Lattice::a_r(), Lattice::b_r(), BigReal, Lattice::c_r(), PmeParticle::cg, CompAtom::charge, COULOMB, PmeGrid::K1, PmeGrid::K2, PmeGrid::K3, Lattice::origin(), CompAtom::position, PmeParticle::x, Vector::x, PmeParticle::y, Vector::y, PmeParticle::z, and Vector::z. Referenced by OptPmeCompute::doWork(). 00150 {
00151 Vector origin = lattice.origin();
00152 Vector recip1 = lattice.a_r();
00153 Vector recip2 = lattice.b_r();
00154 Vector recip3 = lattice.c_r();
00155 double ox = origin.x;
00156 double oy = origin.y;
00157 double oz = origin.z;
00158 double r1x = recip1.x;
00159 double r1y = recip1.y;
00160 double r1z = recip1.z;
00161 double r2x = recip2.x;
00162 double r2y = recip2.y;
00163 double r2z = recip2.z;
00164 double r3x = recip3.x;
00165 double r3y = recip3.y;
00166 double r3z = recip3.z;
00167 int K1 = grid.K1;
00168 int K2 = grid.K2;
00169 int K3 = grid.K3;
00170
00171 const BigReal coulomb_sqrt = sqrt( COULOMB * ComputeNonbondedUtil::scaling
00172 * ComputeNonbondedUtil::dielectric_1 );
00173
00174
00175 int natoms = 0;
00176 for (int i=0; i<N; i++) {
00177 double px = x[i].position.x - ox;
00178 double py = x[i].position.y - oy;
00179 double pz = x[i].position.z - oz;
00180 double sx = px*r1x + py*r1y + pz*r1z;
00181 double sy = px*r2x + py*r2y + pz*r2z;
00182 double sz = px*r3x + py*r3y + pz*r3z;
00183 p[natoms].x = K1 * ( sx - floor(sx) );
00184 p[natoms].y = K2 * ( sy - floor(sy) );
00185 p[natoms].z = K3 * ( sz - floor(sz) );
00186 // Check for rare rounding condition where K * ( 1 - epsilon ) == K
00187 // which was observed with g++ on Intel x86 architecture.
00188 if ( p[natoms].x == K1 ) p[natoms].x = 0;
00189 if ( p[natoms].y == K2 ) p[natoms].y = 0;
00190 if ( p[natoms].z == K3 ) p[natoms].z = 0;
00191
00192 BigReal u1,u2,u3;
00193 u1 = (int) (p[natoms].x - xmin);
00194 if (u1 >= grid.K1) u1 -= grid.K1;
00195 u2 = (int) (p[natoms].y - ymin);
00196 if (u2 >= grid.K2) u2 -= grid.K2;
00197 u3 = (int) (p[natoms].z - zmin);
00198 if (u3 >= grid.K3) u3 -= grid.K3;
00199
00200 if ( (u1 < 0.0) || (u1 >= xlen) ||
00201 (u2 < 0.0) || (u2 >= ylen) ||
00202 (u3 < 0.0) || (u3 >= zlen) ) {
00203 scg ++;
00204 continue;
00205 }
00206
00207 p[natoms].cg = coulomb_sqrt * x[i].charge;
00208 natoms ++;
00209 }
00210 N = natoms;
00211 }
|
|
|
Definition at line 139 of file OptPme.C. Referenced by OptPmeMgr::OptPmeMgr(). |
|
|
Definition at line 54 of file OptPme.C. Referenced by OptPmeMgr::initialize(). |
|
|
Definition at line 72 of file ComputePme.C. Referenced by ComputePmeMgr::initialize(), OptPmePencilMapX::initialize(), OptPmePencilMapY::initialize(), OptPmePencilMapZ::initialize(), OptPmeMgr::initialize(), and ComputePmeMgr::isPmeProcessor(). |
1.3.9.1