-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmigratable_charmcollide.patch
110 lines (99 loc) · 3.9 KB
/
migratable_charmcollide.patch
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
diff --git a/src/libs/ck-libs/collide/collidecharm.C b/src/libs/ck-libs/collide/collidecharm.C
index 529f39e0c..c1d287015 100644
--- a/src/libs/ck-libs/collide/collidecharm.C
+++ b/src/libs/ck-libs/collide/collidecharm.C
@@ -377,6 +377,8 @@ void syncReductionMgr::childDone(int stepCount)
tryFinish();
}
+syncReductionMgr::syncReductionMgr(CkMigrateMessage* m) :
+ CBase_syncReductionMgr(m) {}
/*********************** collideMgr ***********************/
//Extract the (signed) low 23 bits of src--
@@ -411,6 +413,9 @@ collideMgr::collideMgr(const CollideGrid3d &gridMap_,
msgsSent=msgsRecvd=0;
}
+collideMgr::collideMgr(CkMigrateMessage* m) : CBase_collideMgr(m),
+ aggregator(gridMap,this) {}
+
//Maintain contributor registration count
void collideMgr::registerContributor(int chunkNo)
{
@@ -619,6 +624,10 @@ void collideVoxel::startCollision(int step,
CC_STATUS("} startCollision");
}
+collideClient::collideClient() {}
+
+collideClient::collideClient(CkMigrateMessage* m) : Group(m) {}
+
collideClient::~collideClient() {}
/********************** serialCollideClient *****************/
@@ -629,6 +638,8 @@ serialCollideClient::serialCollideClient(void) {
useCb = false;
}
+serialCollideClient::serialCollideClient(CkMigrateMessage* m) : collideClient(m) {}
+
serialCollideClient::serialCollideClient(CkCallback clientCb_) {
clientFn=NULL;
clientParam=NULL;
diff --git a/src/libs/ck-libs/collide/collidecharm.ci b/src/libs/ck-libs/collide/collidecharm.ci
index 8f1d507af..b5f833dc1 100644
--- a/src/libs/ck-libs/collide/collidecharm.ci
+++ b/src/libs/ck-libs/collide/collidecharm.ci
@@ -3,18 +3,18 @@ module collidecharm {
group collideClient {
};
- group serialCollideClient : collideClient {
+ group [migratable] serialCollideClient : collideClient {
entry serialCollideClient();
entry serialCollideClient(CkCallback clientCb_);
entry void reductionDone(CkReductionMsg *m);
};
- group syncReductionMgr {
+ group [migratable] syncReductionMgr {
entry syncReductionMgr();
entry void childProd(int stepCount);
entry void childDone(int stepCount);
};
- group collideMgr : syncReductionMgr {
+ group [migratable] collideMgr : syncReductionMgr {
entry collideMgr(CollideGrid3d gridMap,
CProxy_collideClient client,
CkArrayID cells);
diff --git a/src/libs/ck-libs/collide/collidecharm.h b/src/libs/ck-libs/collide/collidecharm.h
index aabf7d268..e93f19f7e 100644
--- a/src/libs/ck-libs/collide/collidecharm.h
+++ b/src/libs/ck-libs/collide/collidecharm.h
@@ -22,6 +22,8 @@
*/
class collideClient : public Group {
public:
+ collideClient();
+ collideClient(CkMigrateMessage* m);
virtual ~collideClient();
virtual void collisions(ArrayElement *src,
int step,CollisionList &colls) =0;
diff --git a/src/libs/ck-libs/collide/collidecharm_impl.h b/src/libs/ck-libs/collide/collidecharm_impl.h
index 7232caf68..b7626bb77 100644
--- a/src/libs/ck-libs/collide/collidecharm_impl.h
+++ b/src/libs/ck-libs/collide/collidecharm_impl.h
@@ -125,6 +125,7 @@ class syncReductionMgr : public CBase_syncReductionMgr
public:
int getStepCount(void) const {return stepCount;}
syncReductionMgr();
+ syncReductionMgr(CkMigrateMessage* m);
//Called by parent-- will you contribute?
void childProd(int stepCount);
@@ -172,6 +173,7 @@ class collideMgr : public CBase_collideMgr
collideMgr(const CollideGrid3d &gridMap,
const CProxy_collideClient &client,
const CProxy_collideVoxel &voxels);
+ collideMgr(CkMigrateMessage* m);
//Maintain contributor registration count
void registerContributor(int chunkNo);
@@ -225,6 +227,7 @@ class serialCollideClient : public collideClient {
public:
serialCollideClient(void);
serialCollideClient(CkCallback clientCb_);
+ serialCollideClient(CkMigrateMessage *m);
/// Call this client function on processor 0:
void setClient(CollisionClientFn clientFn,void *clientParam);