#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 91 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(). 00091 {
00092 int xBlocks = 0, yBlocks = 0, zBlocks= 0;
00093
00094 if ( simParams->PMEPencils > 1 ) {
00095 xBlocks = yBlocks = zBlocks = simParams->PMEPencils;
00096 } else {
00097 int nb2 = ( simParams->PMEGridSizeX * simParams->PMEGridSizeY
00098 * simParams->PMEGridSizeZ ) / simParams->PMEMinPoints;
00099 if ( nb2 > CkNumPes() ) nb2 = CkNumPes();
00100 int nb = (int) sqrt((float)nb2);
00101 xBlocks = zBlocks = nb;
00102 yBlocks = nb2 / nb;
00103 }
00104
00105 int dimx = simParams->PMEGridSizeX;
00106 int bx = 1 + ( dimx - 1 ) / xBlocks;
00107 xBlocks = 1 + ( dimx - 1 ) / bx;
00108
00109 int dimy = simParams->PMEGridSizeY;
00110 int by = 1 + ( dimy - 1 ) / yBlocks;
00111 yBlocks = 1 + ( dimy - 1 ) / by;
00112
00113 int dimz = simParams->PMEGridSizeZ / 2 + 1; // complex
00114 int bz = 1 + ( dimz - 1 ) / zBlocks;
00115 zBlocks = 1 + ( dimz - 1 ) / bz;
00116
00117 grid.xBlocks = xBlocks;
00118 grid.yBlocks = yBlocks;
00119 grid.zBlocks = zBlocks;
00120
00121 grid.K1 = simParams->PMEGridSizeX;
00122 grid.K2 = simParams->PMEGridSizeY;
00123 grid.K3 = simParams->PMEGridSizeZ;
00124 grid.order = simParams->PMEInterpOrder;
00125 grid.dim2 = grid.K2;
00126 grid.dim3 = 2 * (grid.K3/2 + 1);
00127
00128 grid.block1 = ( grid.K1 + xBlocks - 1 ) / xBlocks;
00129 grid.block2 = ( grid.K2 + yBlocks - 1 ) / yBlocks;
00130 grid.block3 = ( grid.K3/2 + 1 + zBlocks - 1 ) / zBlocks; // complex
00131 }
|
|
||||||||||||||||
|
Definition at line 952 of file OptPme.C. Referenced by OptPmeCompute::doWork(). 00952 {
00953 #pragma disjoint (*src, *dst)
00954 #pragma unroll (8)
00955 for (int i = 0; i < N; i++)
00956 dst[i] = src[i];
00957 }
|
|
||||||||||||||||
|
Definition at line 945 of file OptPme.C. Referenced by OptPmeCompute::ungridForces(). 00945 {
00946 #pragma disjoint (*src, *dst)
00947 #pragma unroll (8)
00948 for (int i = 0; i < N; i++)
00949 dst[i] = src[i];
00950 }
|
|
|
Definition at line 493 of file OptPme.C. 00493 {
00494 OptPmeDummyMsg *msg = (OptPmeDummyMsg *) m;
00495 CProxy_OptPmeMgr pmeProxy (CkpvAccess(BOCclass_group).computePmeMgr);
00496 pmeProxy[CkMyPe()].ungridCalc (msg);
00497 }
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 138 of file OptPme.C. References Lattice::a_r(), Lattice::b_r(), BigReal, Lattice::c_r(), PmeParticle::cg, CompAtom::charge, COLOUMB, 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(). 00145 {
00146 Vector origin = lattice.origin();
00147 Vector recip1 = lattice.a_r();
00148 Vector recip2 = lattice.b_r();
00149 Vector recip3 = lattice.c_r();
00150 double ox = origin.x;
00151 double oy = origin.y;
00152 double oz = origin.z;
00153 double r1x = recip1.x;
00154 double r1y = recip1.y;
00155 double r1z = recip1.z;
00156 double r2x = recip2.x;
00157 double r2y = recip2.y;
00158 double r2z = recip2.z;
00159 double r3x = recip3.x;
00160 double r3y = recip3.y;
00161 double r3z = recip3.z;
00162 int K1 = grid.K1;
00163 int K2 = grid.K2;
00164 int K3 = grid.K3;
00165
00166 const BigReal coloumb_sqrt = sqrt( COLOUMB * ComputeNonbondedUtil::scaling
00167 * ComputeNonbondedUtil::dielectric_1 );
00168
00169
00170 int natoms = 0;
00171 for (int i=0; i<N; i++) {
00172 double px = x[i].position.x - ox;
00173 double py = x[i].position.y - oy;
00174 double pz = x[i].position.z - oz;
00175 double sx = px*r1x + py*r1y + pz*r1z;
00176 double sy = px*r2x + py*r2y + pz*r2z;
00177 double sz = px*r3x + py*r3y + pz*r3z;
00178 p[natoms].x = K1 * ( sx - floor(sx) );
00179 p[natoms].y = K2 * ( sy - floor(sy) );
00180 p[natoms].z = K3 * ( sz - floor(sz) );
00181 // Check for rare rounding condition where K * ( 1 - epsilon ) == K
00182 // which was observed with g++ on Intel x86 architecture.
00183 if ( p[natoms].x == K1 ) p[natoms].x = 0;
00184 if ( p[natoms].y == K2 ) p[natoms].y = 0;
00185 if ( p[natoms].z == K3 ) p[natoms].z = 0;
00186
00187 BigReal u1,u2,u3;
00188 u1 = (int) (p[natoms].x - xmin);
00189 if (u1 >= grid.K1) u1 -= grid.K1;
00190 u2 = (int) (p[natoms].y - ymin);
00191 if (u2 >= grid.K2) u2 -= grid.K2;
00192 u3 = (int) (p[natoms].z - zmin);
00193 if (u3 >= grid.K3) u3 -= grid.K3;
00194
00195 if ( (u1 < 0.0) || (u1 >= xlen) ||
00196 (u2 < 0.0) || (u2 >= ylen) ||
00197 (u3 < 0.0) || (u3 >= zlen) ) {
00198 scg ++;
00199 continue;
00200 }
00201
00202 p[natoms].cg = coloumb_sqrt * x[i].charge;
00203 natoms ++;
00204 }
00205 N = natoms;
00206 }
|
|
|
Definition at line 134 of file OptPme.C. Referenced by OptPmeMgr::OptPmeMgr(). |
|
|
Definition at line 50 of file OptPme.C. Referenced by OptPmeMgr::initialize(). |
|
|
Definition at line 51 of file ComputePme.C. Referenced by ComputePmeMgr::initialize(), OptPmePencilMapX::initialize(), OptPmePencilMapY::initialize(), OptPmePencilMapZ::initialize(), OptPmeMgr::initialize(), isPmeProcessor(), and ComputePmeMgr::isPmeProcessor(). |
1.3.9.1