1 #include "GSpaceDriver.h"
2 #include "CP_State_GSpacePlane.h"
3 #include "CP_State_ParticlePlane.h"
9 extern CProxy_TimeKeeper TimeKeeperProxy;
10 extern CkVec <CProxy_CP_State_GSpacePlane> UgSpacePlaneProxy;
11 extern CkVec <CProxy_CP_State_ParticlePlane> UparticlePlaneProxy;
12 extern CkVec <CProxy_StructureFactor> UsfCompProxy;
20 thisInstance(_thisInstance),
23 isPsiVupdateNeeded(false)
25 #ifdef DEBUG_CP_GSPACE_CREATION
26 CkPrintf(
"GSpaceDriver[%d,%d] born\n",thisIndex.x,thisIndex.y);
31 ees_nonlocal = sim->ees_nloc_on;
32 natm_nl = sim->natm_nl;
33 cp_min_opt = sim->cp_min_opt;
34 gen_wave = sim->gen_wave;
35 ndump_frq = sim->ndump_frq;
74 if(thisIndex.x==0 && ees_nonlocal==0)
77 int numSfDups = config.numSfDups;
78 if(numSfDups > nstates)
81 CkVec <CkArrayIndex3D> sfelems;
82 for(
int dup=0; dup<numSfDups; dup++)
83 for(
int atm=0;atm<config.numSfGrps; atm++)
84 sfelems.push_back(CkArrayIndex3D(atm,thisIndex.y,dup));
87 (CkArrayIndexMax*)sfelems.getVec(), sfelems.size());
115 isPsiVupdateNeeded =
true;
118 contribute(
sizeof(
int), &foo, CkReduction::min_int, CkCallback(CkIndex_Ortho::resumeV(NULL),
myGSpaceObj->
myOrtho) );
125 CkAbort(
"GSpaceDriver::startNonLocalEes - Iteration mismatch between GSpace and someone else who asked to launch NL computations\n");
130 #define _NLEES_PRIO_START_
131 #ifdef _NLEES_PRIO_START_OFF_
135 CkSetQueueing(msg, CK_QUEUEING_IFIFO);
136 *(
int*)CkPriorityPtr(msg) = config.sfpriority;
138 UparticlePlaneProxy[
thisInstance.proxyOffset](thisIndex.x,thisIndex.y).lPrioStartNLEes(msg);
146 #include "structure_factor/StructureFactorMessages.h"
150 #ifdef _CP_DEBUG_SF_CACHE_
151 CkPrintf(
"GSpaceDriver[%d,%d] Releasing SF computations\n",thisIndex.x,thisIndex.y);
153 #ifdef _CP_DEBUG_STATE_GPP_VERBOSE_
154 CkPrintf(
"GSpaceDriver[%d,%d] Releasing SF computations\n",thisIndex.x,thisIndex.y);
163 CkSetQueueing(msg, CK_QUEUEING_IFIFO);
164 *(
int*)CkPriorityPtr(msg) = config.sfpriority;
172 #include "gSpaceDriver.def.h"
CProxySection_StructureFactor sfCompSectionProxy
Array section of the structure factor chares that I will be triggering.
holds the UberIndex and the offset for proxies
GSpaceDriver_SDAG_CODE GSpaceDriver()
Constructors.
void releaseSFComputeZ()
Triggers nonlocal energy computations.
CProxy_InstanceController instControllerProxy
entry void driveGSpace()
SDAG method for flow control of the Driver and its associated GSpace object.
void startControl()
Entry Method. Creates and invokes the SDAG that controls GSpace execution.
CProxy_Ortho myOrtho
A proxy for the my ortho chare array so I can interact with it.
const UberCollection thisInstance
A handle to the local copy of the config parameters (refresh on migration)
CP_State_GSpacePlane * myGSpaceObj
Pointer to the GSpacePlane object that I am driving (controlling)
bool isFirstStep
True if this is the first step.
A place to collect substep times.
void pup(PUP::er &p)
PUP method.
void startNonLocalEes(int iteration_loc)
Entry Method. Triggers nonlocal energy computations.
void startNLEes(int)
= The entry point to the Euler Exponential Spline non-local method.
CP_State_ParticlePlane * myParticlePlaneObj
Pointer to the ParticlePlane object that I am driving (controlling)
void needUpdatedPsiV()
Entry Method. Ortho notifies us that GSpace needs a tolerance update (velocity rotation) ...
void launchComputeZs()
Entry Method. GSpaceDriver calls this to trigger the launch of the computeZ()s to compute the Z matri...