-
Notifications
You must be signed in to change notification settings - Fork 28
/
ParallelGravity.ci
616 lines (558 loc) · 24.1 KB
/
ParallelGravity.ci
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
//ParallelGravity.ci
mainmodule ParallelGravity {
extern module Reductions;
include "keytype.h";
readonly CProxy_Main mainChare;
readonly int verbosity;
readonly CProxy_TreePiece treeProxy;
#ifdef REDUCTION_HELPER
readonly CProxy_ReductionHelper reductionHelperProxy;
#endif
readonly CProxy_LvArray lvProxy;
readonly CProxy_LvArray smoothProxy;
readonly CProxy_LvArray gravityProxy;
readonly CProxy_TreePiece streamingProxy;
readonly CProxy_CkCacheManager<KeyType> cacheNode;
readonly CProxy_CkCacheManager<KeyType> cacheGravPart;
readonly CProxy_CkCacheManager<KeyType> cacheSmoothPart;
readonly CProxy_DataManager dMProxy;
readonly CProxy_PETreeMerger peTreeMergerProxy;
readonly CProxy_DumpFrameData dfDataProxy;
readonly CProxy_IntraNodeLBManager nodeLBMgrProxy;
readonly bool _cache;
readonly int _nocache;
readonly int _cacheLineDepth;
readonly unsigned int _yieldPeriod;
readonly DomainsDec domainDecomposition;
readonly double dExtraStore;
readonly double dMaxBalance;
readonly double dFracLoadBalance;
readonly double dGlassDamper;
readonly int bUseCkLoopPar;
readonly int peanoKey;
readonly GenericTrees useTree;
readonly int _prefetch;
readonly int _randChunks;
readonly int _numChunks;
readonly CkArrayID treePieceID;
readonly CkGroupID dataManagerID;
readonly unsigned int numTreePieces;
readonly unsigned int particlesPerChare;
readonly unsigned int bucketSize;
readonly int nIOProcessor;
// jetley
readonly int localNodesPerReq;
readonly int remoteNodesPerReq;
readonly int remoteResumeNodesPerReq;
readonly int localPartsPerReq;
readonly int remotePartsPerReq;
readonly int remoteResumePartsPerReq;
readonly double largePhaseThreshold;
readonly int START_REG;
readonly int START_IB;
readonly int START_PW;
readonly int boundaryEvaluationUE;
readonly int weightBalanceUE;
readonly int networkProgressUE;
readonly int nodeForceUE;
readonly int partForceUE;
readonly int tbFlushRequestsUE;
readonly int prefetchDoneUE;
#ifdef PUSH_GRAVITY
readonly CkGroupID ckMulticastGrpId;
#endif
readonly CProxy_ProjectionsControl prjgrp;
// number of bins to use for the first
// iteration of every decomposition step
readonly int numInitDecompBins;
// Specifies the number of sub-bins a bin is split into
// for Oct decomposition
readonly int octRefineLevel;
readonly int doDumpLB;
readonly int lbDumpIteration;
readonly int doSimulateLB;
message dummyMsg;
message ComputeChunkMsg;
message EwaldMsg{
bool fromInit;
};
message ORBSplittersMsg{
double pos[];
char dim[];
};
message ParticleShuffleMsg {
double loads[];
unsigned int parts_per_phase[];
GravityParticle particles[];
extraSPHData pGas[];
extraStarData pStar[];
};
#ifdef PUSH_GRAVITY
message BucketMsg {
GenericTreeNode buckets[];
ExternalGravityParticle particles[];
};
#endif
PUPable DensitySmoothParams;
PUPable DenDvDxSmoothParams;
PUPable DenDvDxNeighborSmParams;
PUPable MarkSmoothParams;
PUPable PressureSmoothParams;
PUPable DistDeletedGasSmoothParams;
PUPable AGORApreCheckSmoothParams;
PUPable DistStellarFeedbackSmoothParams;
PUPable SinkFormTestSmoothParams;
PUPable SinkFormSmoothParams;
PUPable BHDensitySmoothParams;
PUPable BHAccreteSmoothParams;
PUPable BHIdentifySmoothParams;
PUPable BHSinkMergeSmoothParams;
PUPable SinkAccreteTestSmoothParams;
PUPable SinkingAverageSmoothParams;
PUPable SinkAccreteSmoothParams;
PUPable Fdbk;
PUPable StarLog;
PUPable Chabrier;
PUPable MillerScalo;
PUPable Kroupa93;
PUPable Kroupa01;
#ifdef SUPERBUBBLE
PUPable PromoteToHotGasSmoothParams;
PUPable ShareWithHotGasSmoothParams;
PUPable uHotOutputParams;
PUPable uOutputParams;
PUPable MassHotOutputParams;
PUPable TempEffOutputParams;
#endif
//SIDM
PUPable SIDMSmoothParams;
#ifdef COLLISION
PUPable CollisionSmoothParams;
#endif
PUPable MassOutputParams;
PUPable PosOutputParams;
PUPable VelOutputParams;
PUPable PotOutputParams;
#ifdef COLLISION
PUPable SpinOutputParams;
#endif
PUPable GasDenOutputParams;
PUPable TempOutputParams;
PUPable AccOutputParams;
PUPable DenOutputParams;
PUPable HsmOutputParams;
PUPable SoftOutputParams;
PUPable PresOutputParams;
PUPable DivVOutputParams;
PUPable PDVOutputParams;
PUPable MuMaxOutputParams;
PUPable BSwOutputParams;
PUPable CsOutputParams;
PUPable EDotOutputParams;
PUPable Cool0OutputParams;
PUPable Cool1OutputParams;
PUPable Cool2OutputParams;
PUPable Cool3OutputParams;
#ifdef COOLING_MOLECULARH
PUPable LWOutputParams;
#endif /*COOLING_MOLECULARH*/
PUPable OxOutputParams;
PUPable FeOutputParams;
PUPable MetalsOutputParams;
PUPable MetalsDotOutputParams;
PUPable OxygenMassFracDotOutputParams;
PUPable IronMassFracDotOutputParams;
PUPable MFormOutputParams;
PUPable TimeFormOutputParams;
PUPable AgeOutputParams;
PUPable coolontimeOutputParams;
PUPable ESNRateOutputParams;
PUPable AlphaOutputParams;
PUPable DvDsOutputParams;
PUPable DtOutputParams;
PUPable KeyOutputParams;
PUPable DomainOutputParams;
PUPable RungOutputParams;
PUPable IOrderOutputParams;
PUPable IGasOrderOutputParams;
PUPable iNSIDMOutputParams;
mainchare [migratable] Main {
entry Main(CkArgMsg*);
entry [threaded] void setupICs();
entry [threaded] void initialForces();
entry [threaded] void doSimulation();
entry [threaded] void restart(CkCheckpointStatusMsg *msg);
entry [threaded] void cbOpen(Ck::IO::FileReadyMsg *msg);
entry void cbIOReady(Ck::IO::SessionReadyMsg *msg);
entry void cbIOComplete(CkMessage *msg);
entry [threaded] void cbIOClosed(CkMessage *msg);
entry void niceExit();
entry void liveVizImagePrep(liveVizRequestMsg *msg);
};
group [migratable] ProjectionsControl {
entry ProjectionsControl();
entry [notrace] void on(CkCallback);
entry [notrace] void off(CkCallback);
};
#ifdef REDUCTION_HELPER
group [migratable] ReductionHelper {
entry ReductionHelper();
entry void countTreePieces(const CkCallback &cb);
entry [nokeep] void evaluateBoundaries(SFC::Key keys[n], const int n, int isRefine, const CkCallback& cb);
entry void evaluateBoundaries(const CkBitVector &binsToSplit, const CkCallback& cb);
};
#endif
chare [migratable] Sorter {
entry Sorter();
entry [threaded]
void startSorting(const CkGroupID& dataManagerID,
const double toler,
const CkCallback& cb, bool decompose);
entry void collectEvaluations(CkReductionMsg* m);
entry void collectORBCounts(CkReductionMsg* m);
entry void finishPhase(CkReductionMsg* m);
entry void doORBDecomposition(CkReductionMsg* m);
entry void readytoSendORB(CkReductionMsg* m);
};
nodegroup [migratable] DataManager {
entry DataManager(const CkArrayID& treePieceID);
entry void acceptResponsibleIndex(const int responsible[n], const int n,
const CkCallback& cb);
entry void acceptFinalKeys(const SFC::Key keys[n],
const int responsible[n - 1],
uint64_t bins[n - 1], const int n,
const CkCallback& cb);
entry void clearRegisteredPieces(const CkCallback& cb);
entry void combineLocalTrees(CkReductionMsg *m);
#ifdef CUDA
entry void startLocalWalk();
entry void resumeRemoteChunk();
entry void createStreams(int _numStreams, const CkCallback& cb);
entry void unmarkTreePiecesForCleanup(const CkCallback& cb);
#endif
entry void initCooling(double dGmPerCcUnit, double dComovingGmPerCcUnit,
double dErgPerGmUnit, double dSecUnit, double dKpcUnit,
COOLPARAM inParam, const CkCallback& cb);
entry void dmCoolTableRead(double dTableData[nData], int nData, const CkCallback& cb);
entry void CoolingSetTime(double z, double dTime, const CkCallback& cb);
entry void SetStarCM(double dCenterOfMass[4], const CkCallback& cb);
entry void memoryStats(const CkCallback& cb);
entry void resetReadOnly(Parameters param, const CkCallback &cb);
entry void initStarLog(std::string _fileName, const CkCallback &cb);
};
array [1D] TreePiece {
entry TreePiece();
// DEBUGGING
entry void quiescence();
entry void memCacheStats(const CkCallback &cb);
// entry void report();
entry void nextBucket(dummyMsg *m);
entry void nextBucketSmooth(dummyMsg *msg);
entry void nextBucketReSmooth(dummyMsg *msg);
entry void nextBucketMarkSmooth(dummyMsg *msg);
entry void resetObjectLoad(const CkCallback& cb);
entry void setPeriodic(int nReplicas, Vector3D<cosmoType> fPeriod, int bEwald,
double fEwCut, double fEwhCut, int bPeriod,
int bComove, double dRhoFac);
entry [notrace] void EwaldInit();
entry [notrace] void initCoolingData(const CkCallback& cb);
entry void calculateEwald(EwaldMsg *m);
entry [notrace] void EwaldGPUComplete();
entry void EwaldGPU();
entry void velScale(double dScale, const CkCallback& cb);
//entry void markPresence(const CkCallback& cb);
entry void loadNChilada(const std::string& filename, const double dTuFac,
const CkCallback& cb);
entry void readFloatBinary(CkReference<OutputParams> params, int bParaRead,
const CkCallback& cb);
entry void loadTipsy(const std::string& filename,
const double dTuFac,
const bool bDoublePos,
const bool bDoubleVel,
const CkCallback& cb);
entry void readTipsyArray(CkReference<OutputParams> params, const CkCallback& cb);
entry void resetMetals(const CkCallback& cb);
entry void getMaxIOrds(const CkCallback& cb);
entry void RestartEnergy(double dTuFac, const CkCallback& cb);
entry void findTotalMass(const CkCallback &cb);
entry void recvTotalMass(CkReductionMsg *msg);
entry void setupWrite(int iStage, u_int64_t iPrevOffset,
const std::string& filename,
const double dTime, const double dvFac,
const double duTfac,
const bool bDoublePos,
const bool bDoubleVel,
const int bCool,
const CkCallback& cb);
entry void parallelWrite(int iPass, const CkCallback& cb,
const std::string& filename, const double dTime,
const double dvFac, // scale velocities
const double duTFac, // convert temperature
const bool bDoublePos,
const bool bDoubleVel,
const int bCool);
entry void serialWrite(u_int64_t iPrevOffset, const std::string& filename,
const double dTime, const double dvFac,
const double duTfac,
const bool bDoublePos,
const bool bDoubleVel,
const int bCool,
const CkCallback& cb);
entry void oneNodeWrite(int iIndex,
int iOutParticles,
int iOutSPH,
int iOutStar,
GravityParticle particles[iOutParticles+2], // particles to
// write
extraSPHData pGas[iOutSPH], // SPH data
extraStarData pStar[iOutStar], // Star data
int piSPH[iOutSPH], // SPH data offsets
int piStar[iOutStar], // Star data offsets
const u_int64_t iPrevOffset,
const std::string& filename, // output file
const double dTime, // time or expansion
const double dvFac, // velocity conversion
const double duTFac, // temperature conversion
const bool bDoublePos,
const bool bDoubleVel,
const int bCool, const CkCallback& cb);
entry void reOrder(int64_t nMaxOrder, const CkCallback& cb);
entry void ioShuffle(CkReductionMsg *msg);
entry void ioAcceptSortedParticles(ParticleShuffleMsg *);
entry void assignKeys(CkReductionMsg* m);
entry [nokeep] void evaluateBoundaries(SFC::Key keys[n], const int n, int isRefine, const CkCallback& cb);
entry void unshuffleParticles(CkReductionMsg* m);
entry void acceptSortedParticles(ParticleShuffleMsg *);
entry void unshuffleParticlesWoDD(const CkCallback& cb);
entry void shuffleAfterQD();
entry void acceptSortedParticlesFromOther(ParticleShuffleMsg *);
//ORB
entry void initORBPieces(const CkCallback& cb);
entry void initBeforeORBSend(unsigned int myCount, unsigned int myCountGas,
unsigned int myCountStar,
const CkCallback& cb, const CkCallback& cback);
entry void sendORBParticles();
entry void acceptORBParticles(const GravityParticle particles[n],
const int n,
const extraSPHData pGas[nGasIn],
const int nGasIn,
const extraStarData pStar[nStarIn],
const int nStarIn);
entry void finalizeBoundaries(ORBSplittersMsg *splittersMsg);
entry void evaluateParticleCounts(ORBSplittersMsg *splittersMsg);
entry void kick(int iKickRung, double dDelta[MAXRUNG+1], int bClosing,
int bNeedVPred, int bGasIsothermal, double dMaxEnergy, double duDelta[MAXRUNG+1],
double gammam1, double dThermalCondSatCoeff,
double dMultiPhaseMaxTime, double dMultiPhaseMinTemp, double dEvapCoeff, const CkCallback& cb);
entry void initAccel(int iKickRung, const CkCallback& cb);
entry void applyFrameAcc(int iKickRung, Vector3D<double> frameAcc, const CkCallback& cb);
entry void externalForce(int activeRung, const ExternalForce& exForce, int bKepStep,
const CkCallback& cb);
#ifdef COOLING_MOLECULARH
entry void distribLymanWerner(const CkCallback& cb);
#endif
#ifdef COLLISION
entry void adjust(int iKickRung, int bCollStep, int bEpsAccStep,
int bGravStep, int bKepStep, int bSphStep,
int bViscosityLimitdt, double dEta, double dEtaCourant,
double dEtauDot, double dDiffCoeff, double dEtaDiffusion,
double dDelta, double dAccFac,
double dCosmoFac, double dhMinOverSoft,
double dResolveJeans,
int bDoGas,
const CkCallback& cb);
#else
entry void adjust(int iKickRung, int bEpsAccStep,
int bGravStep, int bSphStep,
int bViscosityLimitdt, double dEta, double dEtaCourant,
double dEtauDot, double dDiffCoeff, double dEtaDiffusion,
double dDelta, double dAccFac,
double dCosmoFac, double dhMinOverSoft,
double dResolveJeans,
int bDoGas,
const CkCallback& cb);
#endif
entry void truncateRung(int iCurrMaxRung, const CkCallback& cb);
entry void rungStats(const CkCallback& cb);
entry void countActive(int activeRung, const CkCallback& cb);
entry void countType(int iType, const CkCallback& cb);
entry void outputBlackHoles(const std::string& pszFileName, double dvFac,
long lFPos, const CkCallback &cb);
entry void SetSink(double dSinkMassMin, const CkCallback &cb);
entry void SinkStep(int iCurrSinkRung, int iKickRung, const CkCallback &cb);
entry void formSinks(int bJeans, double dJConst2, int bDensity,
double dDensityCut, double dTime, int iKickRung, int bSimple,
const CkCallback &cb);
entry void emergencyAdjust(int iRung, double dDelta, double dDeltaThresh,
const CkCallback &cb);
entry void assignDomain(const CkCallback &cb);
entry void drift(double dDelta, int bNeedVPred, int bGasIsoThermal,
double dvDelta, double duDelta, int nGrowMass,
bool buildTree, double dMaxEnergy, const CkCallback& cb);
entry void starCenterOfMass(const CkCallback& cb);
entry void calcEnergy(const CkCallback& cb);
entry void colNParts(const CkCallback &cb);
entry [nokeep] void newOrder(const NewMaxOrder nStarts[n], const int n,
const CkCallback &cb);
entry void setNParts(int64_t _nTotalSPH, int64_t _nTotalDark,
int64_t _nTotalStar, const CkCallback &cb);
entry void setSoft(const double dSoft, const CkCallback &cb);
entry void physicalSoft(const double dSoftMax, const double dFac,
const int bSoftMaxMul, const CkCallback& cb);
entry void growMass(int nGrowMass, double dDeltaM, const CkCallback& cb);
entry void InitEnergy(double dTuFac, double z, double dTime, double gammam1,
const CkCallback& cb);
entry void updateuDot(int activeRung, double duDelta[MAXRUNG+1],
double dStartTime[MAXRUNG+1], int bCool, int bAll,
int bUpdateState, double dResolveJeans, double gammam1, const CkCallback& cb);
entry void ballMax(int activeRung, double dFac, const CkCallback& cb);
entry void sphViscosityLimiter(int bOn, int activeRung,
const CkCallback& cb);
entry void getAdiabaticGasPressure(double gamma, double gammam1, double dTuFac, double dThermalCondCoeff,
double dThermalCond2Coeff, double dThermalCondSatCoeff, double dThermalCond2SatCoeff,
double dEvapMinTemp, double dDtCourantFac, double dResolveJeans, const CkCallback &cb);
entry void getCoolingGasPressure(double gamma, double gammam1, double dThermalCondCoeff,
double dThermalCond2Coeff, double dThermalCondSatCoeff, double dThermalCond2SatCoeff,
double dEvapMinTemp, double dDtCourantFac, double dResolveJeans, const CkCallback &cb);
#ifdef SPLITGAS
entry void SplitGas(double dInitGasMass,const CkCallback& cb);
#endif
entry void initRand(int iRand, const CkCallback &cb);
entry void FormStars(Stfm param, double dTime, double dDelta,
double dCosmoFac, const CkCallback& cb);
entry void flushStarLog(const CkCallback& cb);
entry void Feedback(Fdbk fb, double dTime, double dDelta,
const CkCallback& cb);
entry void massMetalsEnergyCheck(int bPreDist, const CkCallback& cb);
#ifdef COLLISION
entry void delEjected(double dDelDist, const CkCallback& cb);
entry void getNearCollPartners(const CkCallback& cb);
entry void logOverlaps(const CkCallback& cb);
entry void getCollInfo(const CkCallback& cb);
entry void getCollInfo(int64_t iOrder, const CkCallback& cb);
entry void resolveCollision(Collision coll, const ColliderInfo &c1, const ColliderInfo &c2,
double baseStep, double timeNow, double dCentMass, const CkCallback& cb);
entry void sameHigherRung(int64_t iord1, int rung1, int64_t iord2, int rung2, const CkCallback& cb);
entry void resolveWallCollision(Collision coll, const ColliderInfo &c1, const CkCallback& cb);
entry void unKickCollStep(int iKickRung, double dDeltaBase, const CkCallback& cb);
entry void placeOnCollRung(int64_t iOrder, int collStepRung, const CkCallback& cb);
entry void resetRungs(const CkCallback& cb);
entry void getNeedCollStep(int collStepRung, const CkCallback& cb);
#endif
entry void setTypeFromFile(int iSetMask, char file[256],
const CkCallback& cb);
entry void getCOM(const CkCallback& cb, int bLiveViz);
entry void getCOMByType(int iType, const CkCallback& cb, int bLiveViz);
entry void DumpFrame(InDumpFrame in, const CkCallback& cb, int liveVizDump) ;
entry void liveVizDumpFrameInit(liveVizRequestMsg * msg);
entry void setProjections(int bOn);
#ifdef PUSH_GRAVITY
entry void buildTree(int bucketSize, const CkCallback& cb, bool merge);
#else
entry void buildTree(int bucketSize, const CkCallback& cb);
#endif
entry void startOctTreeBuild(CkReductionMsg* m);
entry void recvBoundary(SFC::Key key, NborDir dir);
entry void recvdBoundaries(CkReductionMsg* m);
entry void startORBTreeBuild(CkReductionMsg* m);
entry void startGravity(int activeRung, int bUseCpu_, double myTheta, const CkCallback &cb);
#ifdef PUSH_GRAVITY
entry void startPushGravity(int am, double myTheta);
entry void recvPushBuckets(BucketMsg *);
entry void recvPushAccelerations(CkReductionMsg *);
#endif
entry void startSmooth(CkPointer<SmoothParams>, int iLowhFix, int nSmooth,
double dfBall2OverSoft2, const CkCallback &cb);
entry void startReSmooth(CkPointer<SmoothParams>, const CkCallback &cb);
entry void startMarkSmooth(CkPointer<SmoothParams>, const CkCallback &cb);
entry void finishNodeCache(const CkCallback &cb);
entry
#ifndef MERGE_REMOTE_REQUESTS
[inline]
#endif
void requestRemoteMoments(const Tree::NodeKey key, int sender);
entry void receiveRemoteMoments(Tree::NodeKey key, Tree::NodeType type,
int firstParticle, int numParticles, int remIdx, MultipoleMoments& moments,
OrientedBox<double>& box, OrientedBox<double>& boxBall,
unsigned int iParticleTypes, int64_t nSPH);
#ifdef CUDA
entry void commenceCalculateGravityLocal(intptr_t d_localMoments,
intptr_t d_localParts,
intptr_t d_localVars,
intptr_t streams, int numStreams,
size_t sMoments, size_t sCompactParts, size_t sVarParts);
#else
entry void commenceCalculateGravityLocal();
#endif
entry void calculateGravityRemote(ComputeChunkMsg *msg);
entry [notrace] void calculateReSmoothLocal();
entry [notrace] void calculateMarkSmoothLocal();
entry void finishWalk();
entry void finishSmoothWalk();
entry [expedited] void fillRequestNode(CkCacheRequestMsg<KeyType> *msg);
entry [local] void receiveNodeCallback(GenericTreeNode *node, int chunk, int reqID, int awi, void *source);
//entry void receiveNode(GenericTreeNode node[1],
// unsigned int reqID);
//entry void receiveParticle(GravityParticle part,
// BucketGravityRequest &req);
entry [expedited] void fillRequestParticles(CkCacheRequestMsg<KeyType> *msg);
entry [expedited] void fillRequestSmoothParticles(CkCacheRequestMsg<KeyType> *msg);
entry void flushSmoothParticles(CkCacheFillMsg<KeyType> *msg);
entry [local] void receiveParticlesCallback(ExternalGravityParticle *egp, int num, int chunk, int reqID, Tree::NodeKey &remoteBucket, int awi, void *source);
entry [local] void receiveParticlesFullCallback(GravityParticle *egp, int num, int chunk, int reqID, Tree::NodeKey &remoteBucket, int awi, void *source);
// jetley
entry void startlb(const CkCallback &cb, int activeRung);
entry void ResumeFromSync();
entry [reductiontarget] void getParticleInfoForLB(int64_t active_part,
int64_t total_part);
//jetley
// entry void receiveProxy(CkGroupID);
entry void doAtSync();
entry void outputASCII(CkReference<OutputParams>, int bParaWrite,
const CkCallback& cb);
entry void oneNodeOutVec(CkReference<OutputParams>, Vector3D<double> avOut[nPart],
int nPart, int iIndex, int bDone,
const CkCallback& cb) ;
entry void oneNodeOutArr(CkReference<OutputParams>, double adOut[nPart],
int nPart, int iIndex, int bDone,
const CkCallback& cb) ;
entry void outputBinary(Ck::IO::Session, CkReference<OutputParams>);
entry void minmaxNCOut(CkReference<OutputParams> params, const CkCallback& cb);
entry void outputBinaryStart(CkReference<OutputParams> params,
int64_t nStart, const CkCallback& cb);
entry void oneNodeOutIntArr(CkReference<OutputParams>, int aiOut[nPart],
int nPart, int iIndex, const CkCallback& cb);
entry void outputStatistics(const CkCallback& cb);
entry void collectStatistics(const CkCallback &cb);
// jetley
#ifdef CUDA
entry void continueStartRemoteChunk(int chunk, intptr_t d_remoteMoments, intptr_t d_remoteParts);
entry void fillGPUBuffer(intptr_t bufLocalParts,
intptr_t bufLocalMoments,
intptr_t pLocalMoments, int partIndex, int nParts, intptr_t node);
entry void updateParticles(intptr_t data, int partIndex);
#else
entry void continueStartRemoteChunk(int chunk);
#endif
entry void continueWrapUp();
// jetley - balancing before initial forces
entry void balanceBeforeInitialForces(const CkCallback &cb);
};
array [1D] LvArray {
entry LvArray();
};
group [migratable] PETreeMerger {
entry PETreeMerger();
};
group [migratable] DumpFrameData {
entry DumpFrameData();
entry void clearFrame(InDumpFrame in, const CkCallback& cb);
entry void combineFrame(InDumpFrame in, const CkCallback& cb);
};
group [migratable] IntraNodeLBManager {
entry IntraNodeLBManager(int dummy, CkGroupID gid);
entry [local] void registerTP();
entry [local] void finishedTPWork();
};
initproc void registerStatistics();
};