Revert "Remove setCacheProxy entry method from PageArray"
authorPhil Miller <mille121@illinois.edu>
Sun, 12 Jul 2009 22:07:28 +0000 (17:07 -0500)
committerPhil Miller <mille121@illinois.edu>
Thu, 10 Dec 2009 22:22:57 +0000 (16:22 -0600)
This reverts commit 8c3894674485ef32220f559b2a9a2200563306b7.

That commit was dumb, because it was based on an invalid creation structure for the various arrays. I was thinking serially, not parallel-y

src/libs/ck-libs/multiphaseSharedArrays/msa-DistPageMgr.ci
src/libs/ck-libs/multiphaseSharedArrays/msa-DistPageMgr.h

index 7362dfb5fb6ec24e32a6b8bc4b3d7beb94c900af..f1e464e5173fdd98a563a27fff64f6f76e05c8a8 100644 (file)
@@ -27,7 +27,8 @@ module msa
     // virtualizes the storage for the pages
     template<class ENTRY_TYPE, class ENTRY_OPS_CLASS,unsigned int ENTRIES_PER_PAGE> array[1D] MSA_PageArray
     {
-        entry MSA_PageArray(CProxy_MSA_CacheGroup<ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE> cache);
+        entry MSA_PageArray(void);
+       entry void setCacheProxy(CProxy_MSA_CacheGroup<ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE> cache);
        
         entry void GetPage(int pe);
         entry void PAReceivePage(ENTRY_TYPE page[ENTRIES_PER_PAGE], int pe, MSA_Page_Fault_t pageState);
index a84e6410aace7180a428096b8bf79c61ded33b44..8be1a4310d4d89a001923e851f2825c8a133a912 100644 (file)
@@ -794,7 +794,7 @@ public:
                  nEntries(nEntries_), 
                  pageTable(nPages, NULL),
                  pageStateStorage(nPages, NULL),
-                 pageArray(CProxy_PageArray_t::ckNew(thisProxy, nPages_)),
+                 pageArray(CProxy_PageArray_t::ckNew(nPages_)),
                  thisProxy(thisgroup),
                  max_resident_pages(max_bytes_/(sizeof(ENTRY_TYPE)*ENTRIES_PER_PAGE)),
                  entryOpsObject(new ENTRY_OPS_CLASS),
@@ -802,6 +802,7 @@ public:
                  outOfBufferInPrefetch(0), syncAckCount(0),syncThreadCount(0),
                  resident_pages(0),numberLocalWorkerThreads(0), enrollDoneq(0)
                {
+                       pageArray.setCacheProxy(thisProxy);
                        pageArray.ckSetReductionClient(new CkCallback(CkIndex_MSA_CacheGroup<ENTRY_TYPE, ENTRY_OPS_CLASS, ENTRIES_PER_PAGE>::SyncDone(), thisProxy));
 
                        MSADEBPRINT(printf("MSA_CacheGroup nEntries %d \n",nEntries););
@@ -1295,9 +1296,14 @@ protected:
                }
 
 public:
-    inline MSA_PageArray(CProxy_CacheGroup_t &cache_) : epage(NULL), cache(cache_) { }
+    inline MSA_PageArray() : epage(NULL) { }
     inline MSA_PageArray(CkMigrateMessage* m) { delete m; }
     
+    void setCacheProxy(CProxy_CacheGroup_t &cache_)
+               {
+                       cache=cache_;
+               }
+    
     virtual void pup(PUP::er& p)
                {
                        ArrayElement1D::pup(p);