OpenAtom  Version1.5a
TemperController.h
1 #ifndef _TEMPERCONTROLLER_H_
2 #define _TEMPERCONTROLLER_H_
3 /*
4 
5  The Temper controller manages the temperature exchange process for tempers.
6 
7  Basic cycle is:
8  if(iteration % TemperCycle==0)
9  all tempers will pass their energies up to the TemperController
10  all tempers will suspend
11  - this is a global synchronization
12  TemperController will engage the next temperature exchange.
13  - Various schemes exist for this.
14  - Configure choices wrt to temp exchange have no parallel driver impact.
15  TemperController will issue new temperatures back to all Tempers.
16  each temper will apply the new temperatures in Atoms and GSP
17  each temper will resume
18  -once all atoms and GSPs report completion in accepting the new temperature
19  -Resumption within any temper is independent, so this is an
20  instance level completion property.
21 
22 
23  */
24 
26 {
27  public:
30  TemperController(CkMigrateMessage *m) {}
31  void acceptData(int temper, EnergyStruct &energies);
32  void acceptData();
33  private:
34  int numTempers;
35  int numBeads;
36  int reportedIn;
37  EnergyStruct *temperEnergy;
38  double *temperatures;
39 };
40 
41 
42 #endif