1 /*===========================================================================*
2  * This file is part of the Abstract Library for Parallel Search (ALPS).     *
3  *                                                                           *
4  * ALPS is distributed under the Eclipse Public License as part of the       *
5  * COIN-OR repository (http://www.coin-or.org).                              *
6  *                                                                           *
7  * Authors:                                                                  *
8  *                                                                           *
9  *          Yan Xu, Lehigh University                                        *
10  *          Aykut Bulut, Lehigh University                                   *
11  *          Ted Ralphs, Lehigh University                                    *
12  *                                                                           *
13  * Conceptual Design:                                                        *
14  *                                                                           *
15  *          Yan Xu, Lehigh University                                        *
16  *          Ted Ralphs, Lehigh University                                    *
17  *          Laszlo Ladanyi, IBM T.J. Watson Research Center                  *
18  *          Matthew Saltzman, Clemson University                             *
19  *                                                                           *
20  *                                                                           *
21  * Copyright (C) 2001-2019, Lehigh University, Yan Xu, Aykut Bulut, and      *
22  *                          Ted Ralphs.                                      *
23  * All Rights Reserved.                                                      *
24  *===========================================================================*/
25 
26 
27 #ifndef AlpsMessageTag_h_
28 #define AlpsMessageTag_h_
29 
30 // This file is fully docified.
31 
32 /** This enumerative constant describes the message tags different
33     processes of Alps understand. */
34 
35 enum AlpsMessageTag{
36 
37   /** The message tag indicating that the send ask the recv to
38       continue or terminate. */
39   // 0
40   AlpsMsgContOrTerm = 0,
41 
42   /** Ask the receiver worker to donor workload to the specified worker. */
43   // 1
44   AlpsMsgAskDonate,
45 
46   /** Ask the receiver worker to donor workload to the specified hub. */
47   // 2
48   AlpsMsgAskDonateToHub,
49 
50   /** Aks the receiver hub to share workload with the specified hub. */
51   // 3
52   AlpsMsgAskHubShare,
53 
54   /** The message tag indicating that initialization is finished. */
55   // 4
56   AlpsMsgFinishInit,
57 
58   /** Hub load, msg counts are in the buf. */
59   // 5
60   AlpsMsgHubLoad,
61 
62   /** The message tag indicating that the send ask the recv to
63       send its load information. */
64   // 6
65   AlpsMsgAskLoad,
66 
67   /** The message tag indicating that the send ask the recv to
68       pause current work immediately or after finishing the work on hand. */
69   // 7
70   AlpsMsgAskPause,
71 
72   /** The message tag indicating that the send ask the recv to terminate. */
73   // 8
74   AlpsMsgAskTerminate,
75 
76   /** The message tag indicating that the process sent the message is idle. */
77   // 9
78   AlpsMsgIdle,
79 
80   /** The message tag indicating that a incumbent is in the message buf. */
81   // 10
82   AlpsMsgIncumbent,
83 
84   /** The message tag indicating that cluster and system workloads are in
85       the message buf. */
86   // 11
87   AlpsMsgLoadInfo,
88 
89   /** The message tag indicating that the sender has no workload. */
90   // 12
91   AlpsMsgWorkerNeedWork,
92 
93   /** The message tag indicating that a model is being sent or received. */
94   // 13
95   AlpsMsgModel,
96 
97   /** The message tag indicating that a node is being sent or received. */
98   // 14
99   AlpsMsgNode,
100 
101   /** The message tag indicating that parameters are being sent or received. */
102   // 15
103   AlpsMsgParams,
104 
105   /** Termination check. */
106   // 16
107   AlpsMsgTermCheck,
108 
109   /** Hub check the status of its workers. */
110   // 17
111   AlpsMsgHubCheckCluster,
112 
113   /** Hub periodically check the status of its workers.*/
114   // 18
115   AlpsMsgHubPeriodCheck,
116 
117   /** Hub periodically report its status to master.*/
118   // 19
119   AlpsMsgHubPeriodReport,
120 
121   /** Hub's status is in buf. */
122   // 20
123   AlpsMsgHubStatus,
124 
125   /** Worker's status is in buf. */
126   // 21
127   AlpsMsgWorkerStatus,
128 
129   /** Hub's status is in buf, used in termination checking. */
130   // 22
131   AlpsMsgHubTermStatus,
132 
133   /** Worker's status is in buf, used in termination checking. */
134   // 23
135   AlpsMsgWorkerTermStatus,
136 
137   /** The size of the message. */
138   // 24
139   AlpsMsgSize,
140 
141   /** Send or receive a subtree due to master load balancing. */
142   // 25
143   AlpsMsgSubTreeByMaster,
144 
145   /** Send or receive a subtree due to hub load balancing. */
146   // 26
147   AlpsMsgSubTree,
148 
149   /** Tree node size */
150   // 27
151   AlpsMsgNodeSize,
152 
153   // 28
154   AlpsMsgTellMasterRecv,
155 
156   // 29
157   AlpsMsgTellHubRecv,
158 
159   // 30
160   AlpsMsgIndicesFromMaster,
161 
162   // 31
163   AlpsMsgWorkerAskIndices,
164 
165   // 32
166   AlpsMsgForceTerm,
167 
168   // 33
169   AlpsMsgMasterIncumbent,
170 
171   // 34
172   AlpsMsgHubIncumbent,
173 
174   // 35
175   AlpsMsgAskHubPause,
176 
177   /** Ask the receiver worker to donor workload to the specified worker. */
178   // 36
179   AlpsMsgAskDonateToWorker,
180 
181   // 37
182   AlpsMsgSubTreeByWorker,
183 
184   // 38
185   AlpsMsgIncumbentTwo,
186 
187   /** The message tag indicating that knowledge generated during rampup about
188       model is being sent or received. */
189   // 39
190   AlpsMsgModelGenRampUp,
191 
192   /** The message tag indicating that knowledge generated during search about
193       model is being sent or received. */
194   // 40
195   AlpsMsgModelGenSearch,
196 
197   /** When requested by master during inter balance, hub failed to identify
198       a donor worker. */
199   // 41
200   AlpsMsgHubFailFindDonor,
201 
202   /** Load info during ramp up */
203   // 42
204   AlpsMsgRampUpLoad,
205 
206   /** Donate during ramp up */
207   // 43
208   AlpsMsgRampUpDonate,
209 
210   /** Hub finished ramp up. Used in spiral method. */
211   // 44
212   AlpsMsgFinishInitHub,
213 
214   /** Error code. */
215   AlpsMsgErrorCode
216 };
217 
218 #endif
219