diff --git a/Makefile.in b/Makefile.in index 24a9bde15..44d9ee8ed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -125,7 +125,7 @@ defines := $(strip @HEXADECAPOLE@ @FLAG_RTFORCE@ @FLAG_ARCH@ \ @FLAG_VSIGVISC@ @FLAG_DAMPING@ @FLAG_DIFFHARMONIC@ \ @FLAG_TREE_BUILD@ $(debug_defines) @FLAG_INTERLIST@ \ @FLAG_NSMOOTHINNER@ @FLAG_SPLITGAS@ @FLAG_SIDMINTERACT@ \ - @FLAG_SUPERBUBBLE@ $(cuda_defines) -DREDUCTION_HELPER) + @FLAG_SUPERBUBBLE@ $(cuda_defines)) modules := $(strip -language charm++ -balancer @DEFAULT_LB@ \ $(foreach m,$(charm_modules),-module $(m)) \ diff --git a/ParallelGravity.ci b/ParallelGravity.ci index a09835bf5..2f86e6e71 100644 --- a/ParallelGravity.ci +++ b/ParallelGravity.ci @@ -9,9 +9,7 @@ mainmodule ParallelGravity { 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; @@ -203,7 +201,6 @@ mainmodule ParallelGravity { entry [notrace] void off(CkCallback); }; -#ifdef REDUCTION_HELPER group [migratable] ReductionHelper { entry ReductionHelper(); entry void countTreePieces(const CkCallback &cb); @@ -211,7 +208,6 @@ mainmodule ParallelGravity { entry void evaluateBoundaries(const CkBitVector &binsToSplit, const CkCallback& cb); }; -#endif chare [migratable] Sorter { entry Sorter(); diff --git a/ParallelGravity.cpp b/ParallelGravity.cpp index bbd6c65e9..82724c307 100644 --- a/ParallelGravity.cpp +++ b/ParallelGravity.cpp @@ -63,9 +63,7 @@ CProxy_Main mainChare; int verbosity; int bVDetails; CProxy_TreePiece treeProxy; ///< Proxy for the TreePiece chare array -#ifdef REDUCTION_HELPER CProxy_ReductionHelper reductionHelperProxy; -#endif CProxy_LvArray lvProxy; ///< Proxy for the liveViz array CProxy_LvArray smoothProxy; ///< Proxy for smooth reductions CProxy_LvArray gravityProxy; ///< Proxy for gravity reductions @@ -1337,9 +1335,7 @@ Main::Main(CkArgMsg* m) { prjgrp = CProxy_ProjectionsControl::ckNew(); treeProxy = pieces; -#ifdef REDUCTION_HELPER reductionHelperProxy = CProxy_ReductionHelper::ckNew(); -#endif opts.bindTo(treeProxy); lvProxy = CProxy_LvArray::ckNew(opts); // Create an array for the smooth reductions diff --git a/ParallelGravity.h b/ParallelGravity.h index bdc0dd03a..3bfcf5e43 100644 --- a/ParallelGravity.h +++ b/ParallelGravity.h @@ -144,9 +144,7 @@ extern double dGlassDamper; extern int bUseCkLoopPar; extern GenericTrees useTree; extern CProxy_TreePiece treeProxy; -#ifdef REDUCTION_HELPER extern CProxy_ReductionHelper reductionHelperProxy; -#endif extern CProxy_LvArray lvProxy; // Proxy for the liveViz array extern CProxy_LvArray smoothProxy; // Proxy for smooth reduction extern CProxy_LvArray gravityProxy; // Proxy for gravity reduction @@ -1148,10 +1146,9 @@ class TreePiece : public CBase_TreePiece { /// The counts of how many particles belonging to other /// TreePieces I currently hold -#ifndef REDUCTION_HELPER CkVec myBinCounts; -#endif std::vector myBinCountsORB; + /// My index in the responsibility array. int myPlace; /// The keys determined by the Sorter that separate me from my @@ -2055,8 +2052,6 @@ bool bIsReplica(int reqID); void printGenericTree(GenericTreeNode* node, std::ostream& os) ; //bool compBucket(GenericTreeNode *ln,GenericTreeNode *rn); -#ifdef REDUCTION_HELPER - class TreePieceCounter : public CkLocIterator { public: TreePieceCounter() { reset(); } @@ -2091,7 +2086,7 @@ class ReductionHelper : public CBase_ReductionHelper { TreePieceCounter localTreePieces; std::vector splitters; }; -#endif + /// @brief Used to count non-empty treepieces on the local processor. class NonEmptyTreePieceCounter : public CkLocIterator { diff --git a/Sorter.cpp b/Sorter.cpp index 3d2e09979..6e112b484 100644 --- a/Sorter.cpp +++ b/Sorter.cpp @@ -275,13 +275,9 @@ void Sorter::startSorting(const CkGroupID& dataManagerID, Key k; BinaryTreeNode *rt; -#ifdef REDUCTION_HELPER // The reduction helper needs to know the number of pieces on each processor. reductionHelperProxy.countTreePieces(CkCallbackResumeThread()); CProxy_ReductionHelper boundariesTargetProxy = reductionHelperProxy; -#else - CProxy_TreePiece boundariesTargetProxy = treeProxy; -#endif decompTime = CmiWallTimer(); @@ -542,12 +538,9 @@ void Sorter::collectEvaluationsOct(CkReductionMsg* m) { int arraySize = (1< 0) { @@ -686,12 +675,8 @@ void TreePiece::evaluateBoundaries(SFC::Key* keys, const int n, int skipEvery, c } //send my bin counts back in a reduction -#ifdef REDUCTION_HELPER reductionHelperProxy.ckLocalBranch()->reduceBinCounts(numBins, myCounts, cb); delete[] myCounts; -#else - contribute(numBins * sizeof(int64_t), myCounts, CkReduction::sum_long, cb); -#endif } void TreePiece::unshuffleParticlesWoDD(const CkCallback& callback) { @@ -6640,7 +6625,6 @@ void TreePiece::clearMarkedBucketsAll(){ #endif -#ifdef REDUCTION_HELPER ReductionHelper::ReductionHelper(){ } @@ -6705,6 +6689,4 @@ void ReductionHelper::senseLocalTreePieces(){ mgr->iterate(localTreePieces); } -#endif -