reimplement sumonly mode(geenrate only one .sum that summarize across all pes) by...
[charm.git] / src / ck-perf / trace-summaryBOC.h
1
2 #include "TraceSummary.decl.h"
3
4 extern CkGroupID traceSummaryGID;
5
6 class TraceSummaryInit : public Chare {
7   public:
8   TraceSummaryInit(CkArgMsg*) {
9     traceSummaryGID = CProxy_TraceSummaryBOC::ckNew();
10     CProxy_TraceSummaryBOC sumProxy(traceSummaryGID);
11     CkCallback *cb = new CkCallback(CkIndex_TraceSummaryBOC::sendSummaryBOC(NULL), 0, sumProxy);
12     CProxy_TraceSummaryBOC(traceSummaryGID).ckSetReductionClient(cb);
13   }
14   TraceSummaryInit(CkMigrateMessage *m):Chare(m) {}
15 };
16
17 class TraceSummaryBOC : public CBase_TraceSummaryBOC {
18 private:
19   int count;
20   BinEntry *bins;
21   int  nBins;
22   int nTracedPEs;
23 public:
24   TraceSummaryBOC(void): count(0), bins(NULL), nBins(0), nTracedPEs(0) {};
25   TraceSummaryBOC(CkMigrateMessage *m):CBase_TraceSummaryBOC(m) {};
26   void startSumOnly();
27   void askSummary(int size);
28   void sendSummaryBOC(CkReductionMsg *);
29 private:
30   void write();
31 };
32
33