#include <sfftw.h>#include <srfftw.h>#include "InfoStream.h"#include "Node.h"#include "PatchMap.h"#include "PatchMap.inl"#include "AtomMap.h"#include "ComputePme.h"#include "ComputePmeMgr.decl.h"#include "PmeRealSpace.h"#include "PmeKSpace.h"#include "ComputeNonbondedUtil.h"#include "PatchMgr.h"#include "Molecule.h"#include "ReductionMgr.h"#include "ComputeMgr.h"#include "ComputeMgr.decl.h"#include "Debug.h"#include "SimParameters.h"#include "WorkDistrib.h"#include "varsizemsg.h"#include "Random.h"#include "Priorities.h"#include "ComputePmeMgr.def.h"Go to the source code of this file.
Classes | |
| class | PmeGridMsg |
| class | PmeTransMsg |
| class | PmeUntransMsg |
| struct | PmePencilInitMsgData |
| class | PmePencilInitMsg |
| struct | LocalPmeInfo |
| class | ComputePmeMgr |
| class | PmePencil< T > |
| class | PmeZPencil |
| class | PmeYPencil |
| class | PmeXPencil |
Defines | |
| #define | MIN_DEBUG_LEVEL 3 |
Functions | |
| void | generatePmePeList (int *peMap, int numPes) |
| void | generatePmePeList2 (int *gridPeMap, int numGridPes, int *transPeMap, int numTransPes) |
| int | isPmeProcessor (int p) |
Variables | |
| char * | pencilPMEProcessors |
|
|
Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved. Definition at line 33 of file ComputePme.C. |
|
||||||||||||
|
Definition at line 120 of file ComputePme.C. References j, ResizeArray< Elem >::resize(), and SortableResizeArray< Elem >::sort(). 00120 {
00121 // decide which pes to use by bit reversal
00122 int i;
00123 int ncpus = CkNumPes();
00124
00125 // find next highest power of two
00126 int npow2 = 1; int nbits = 0;
00127 while ( npow2 < ncpus ) { npow2 *= 2; nbits += 1; }
00128
00129 // build bit reversal sequence
00130 SortableResizeArray<int> seq(ncpus);
00131 i = 0;
00132 for ( int icpu=0; icpu<ncpus; ++icpu ) {
00133 int ri;
00134 for ( ri = ncpus; ri >= ncpus; ++i ) {
00135 ri = 0;
00136 int pow2 = 1;
00137 int rpow2 = npow2 / 2;
00138 for ( int j=0; j<nbits; ++j ) {
00139 ri += rpow2 * ( ( i / pow2 ) % 2 );
00140 pow2 *= 2; rpow2 /= 2;
00141 }
00142 }
00143 seq[icpu] = ri;
00144 }
00145
00146 // extract and sort PME locations
00147 for ( i=0; i<numPes; ++i ) {
00148 seq[i] = seq[ncpus - numPes + i];
00149 }
00150 seq.resize(numPes);
00151 seq.sort();
00152
00153 for ( i=0; i<numPes; ++i )
00154 peMap[i] = seq[i];
00155
00156 //peMap[0] = 0;
00157 }
|
|
||||||||||||||||||||
|
Definition at line 160 of file ComputePme.C. References j, ResizeArray< Elem >::resize(), and SortableResizeArray< Elem >::sort(). Referenced by ComputePmeMgr::initialize(). 00160 {
00161 // decide which pes to use by bit reversal
00162 int i;
00163 int ncpus = CkNumPes();
00164
00165 // find next highest power of two
00166 int npow2 = 1; int nbits = 0;
00167 while ( npow2 < ncpus ) { npow2 *= 2; nbits += 1; }
00168
00169 // build bit reversal sequence
00170 SortableResizeArray<int> seq(ncpus);
00171 SortableResizeArray<int> seq2(ncpus);
00172 i = 0;
00173 for ( int icpu=0; icpu<ncpus; ++icpu ) {
00174 int ri;
00175 for ( ri = ncpus; ri >= ncpus; ++i ) {
00176 ri = 0;
00177 int pow2 = 1;
00178 int rpow2 = npow2 / 2;
00179 for ( int j=0; j<nbits; ++j ) {
00180 ri += rpow2 * ( ( i / pow2 ) % 2 );
00181 pow2 *= 2; rpow2 /= 2;
00182 }
00183 }
00184 seq[icpu] = ri;
00185 seq2[icpu] = ri;
00186 }
00187
00188 // extract and sort PME locations
00189 for ( i=0; i<numGridPes; ++i ) {
00190 seq[i] = seq[ncpus - numGridPes + i];
00191 }
00192 seq.resize(numGridPes);
00193 seq.sort();
00194 int firstTransPe = ncpus - numGridPes - numTransPes;
00195 if ( firstTransPe < 0 ) {
00196 firstTransPe = 0;
00197 // 0 should be first in list, skip if possible
00198 if ( ncpus > numTransPes ) firstTransPe = 1;
00199 }
00200 for ( i=0; i<numTransPes; ++i ) {
00201 seq2[i] = seq2[firstTransPe + i];
00202 }
00203 seq2.resize(numTransPes);
00204 seq2.sort();
00205
00206 for ( i=0; i<numGridPes; ++i )
00207 gridPeMap[i] = seq[i];
00208
00209 for ( i=0; i<numTransPes; ++i )
00210 transPeMap[i] = seq2[i];
00211 }
|
|
|
Definition at line 322 of file ComputePme.C. References pencilPMEProcessors. 00322 {
00323 if (pencilPMEProcessors)
00324 return pencilPMEProcessors[p];
00325 else
00326 return CProxy_ComputePmeMgr::ckLocalBranch(CkpvAccess(BOCclass_group).computePmeMgr)->isPmeProcessor(p);
00327 }
|
|
|
Definition at line 51 of file ComputePme.C. Referenced by OptPmeMgr::initialize(), OptPmePencilMapZ::initialize(), OptPmePencilMapY::initialize(), OptPmePencilMapX::initialize(), ComputePmeMgr::initialize(), ComputePmeMgr::isPmeProcessor(), and isPmeProcessor(). |
1.3.9.1