00001
00002
00004 #ifndef POSE_CONFIG_H
00005 #define POSE_CONFIG_H
00006 #include <limits.h>
00007
00009
00010
00012 #define POSE_STATS_ON 1
00014 //#define POSE_DOP_ON 1
00016 //#define TRACE_DETAIL 1
00017
00019 #define USE_LONG_TIMESTAMPS 1
00020
00022 #define DETERMINISTIC_EVENTS 1
00023
00025 #define MEM_COARSE
00026 #define MAX_USAGE 5 // maximum checkpoints per object for coarse mem. man.
00027
00029 #define MSG_RECYCLING 1
00030
00032
00033
00035
00036
00038
00039
00040 #ifdef POSE_COMM_ON
00041 #include <StreamingStrategy.h>
00042 #include <MeshStreamingStrategy.h>
00043 #include <PrioStreaming.h>
00044 #endif
00045
00046 #define COMM_TIMEOUT 1
00047 #define COMM_MAXMSG 20
00048
00050 #define MAX_ITERATIONS 100 // maximum forward executions per Step call
00051 #define STORE_RATE 5 // default checkpoint rate: 1 for every n events
00052 #define SPEC_WINDOW 10 // speculative event window size
00053 #define MIN_LEASH 10 // min speculative window for adaptive strategy
00054 #define MAX_LEASH 100 // max speculative window for adaptive strategy
00055 #define LEASH_FLEX 10 // leash increment
00056
00058 #define MAX_LEASH_MULTIPLIER 3 // factor used to calculate the max timeleash
00059 #define MAX_RB_PER_GVT_ITER 2 // max rollbacks allowed per GVT iteration
00060 #define PVT_STRAT_CALC_PERIOD 50 // number of GVT iterations between adapt5 strat calcs50
00061 #define EVQ_SPARSE_CALC_PERIOD 50 // number of commits between evq sparsity calcs100
00062 #define AVG_LEASH_CALC_PERIOD 50 // number of rollbacks between average leash calcs
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 #define TS_DIFF_WIN_SIZE 16 // number of timestamp diffs to use in calculating the leash
00079 #define HIGHEST_DIFFS_TO_IGNORE 2 // ignore this many of the highest diffs in the leash calculation
00080 #define NUM_DIFFS_TO_AVERAGE 14 // how many diffs are averaged to get the final leash
00081 #define DIFFS_TO_STORE HIGHEST_DIFFS_TO_IGNORE + NUM_DIFFS_TO_AVERAGE // for convenience
00082
00083
00085 #define LB_SKIP 51 // LB done 1/LB_SKIP times GVT iterations
00086 #define LB_THRESHOLD 4000 // 20 heavy objects
00087 #define LB_DIFF 2000 // min diff between min and max load PEs
00088
00090 #define POSE_CHECKPOINT_DIRECTORY "__pose_chkpt_files" // directory where checkpoint files are stored
00091
00092
00093 #define MAX_POOL_SIZE 40 // maximum size of a memory pool
00094 #define MAX_RECYCLABLE 1000 // maximum size of a recyclable block
00095 #define SEND 0
00096 #define RECV 1
00097 #define OPTIMISTIC 0
00098 #define CONSERVATIVE 1
00099
00101 #define NUM_PVT_DEBUG_BUFFER_LINES 1
00102 #define PVT_DEBUG_BUFFER_LINE_LENGTH 1
00103
00104 #if USE_LONG_TIMESTAMPS
00105 typedef CmiInt8 POSE_TimeType;
00106
00107
00108
00109
00110 #ifdef LLONG_MAX
00111 const POSE_TimeType POSE_TimeMax=LLONG_MAX;
00112
00113 const POSE_TimeType POSE_UnsetTS=-1LL;
00114 #else
00115 const POSE_TimeType POSE_TimeMax=9223372036854775807LL;
00116
00117 const POSE_TimeType POSE_UnsetTS=-1LL;
00118 #endif
00119 #else
00120 typedef int POSE_TimeType;
00121 const POSE_TimeType POSE_TimeMax=INT_MAX;
00122 const POSE_TimeType POSE_UnsetTS=-1;
00123 #endif
00124
00125
00126
00127
00128
00129 enum POSE_Commlib_strat {nostrat, stream, mesh, prio};
00130
00131 class POSE_Config
00132 {
00133 public:
00134 bool stats;
00135 int start_proj;
00136 int end_proj;
00137 bool trace;
00138 bool dop;
00139 bool dopSkipCalcs;
00140 int max_usage;
00141 bool msg_pool;
00142 int msg_pool_size;
00143 int max_pool_msg_size;
00144 POSE_Commlib_strat commlib_strat;
00145 int commlib_timeout;
00146 int commlib_maxmsg;
00147 bool lb_on;
00148 int lb_skip;
00149 int lb_threshold;
00150 int lb_diff;
00151 int store_rate;
00152 int max_iter;
00153 int spec_window;
00154 int min_leash;
00155 int max_leash;
00156 int leash_flex;
00157 bool deterministic;
00158 int checkpoint_gvt_interval;
00159 int checkpoint_time_interval;
00160 int lb_gvt_interval;
00161
00162 POSE_Config() :
00163 #ifdef POSE_STATS_ON
00164 stats(true),
00165 #else
00166 stats(false),
00167 #endif
00168 start_proj(-1),
00169 end_proj(-1),
00170 #ifdef TRACE_DETAIL
00171 trace(true),
00172 #else
00173 trace(false),
00174 #endif
00175 #ifdef POSE_DOP_ON
00176 dop(true),
00177 #else
00178 dop(false),
00179 #endif
00180 dopSkipCalcs(false),
00181 max_usage(MAX_USAGE),
00183 #ifdef MSG_RECYCLING
00184 msg_pool(true),
00185 #else
00186 msg_pool(false),
00187 #endif
00188 msg_pool_size(40),
00189 max_pool_msg_size(1000),
00190 #ifdef POSE_COMM_ON
00191 commlib_strat(nostrat),
00192 #else
00193 commlib_strat(stream),
00194 #endif
00195 commlib_timeout(COMM_TIMEOUT),
00196 commlib_maxmsg(COMM_MAXMSG),
00197 #ifdef LB_ON
00198 lb_on(true),
00199 #else
00200 lb_on(false),
00201 #endif
00202 lb_skip(LB_SKIP),
00203 lb_threshold(LB_THRESHOLD),
00204 lb_diff(LB_DIFF),
00205 store_rate(STORE_RATE),
00206 max_iter(MAX_ITERATIONS),
00207 spec_window(SPEC_WINDOW),
00208 min_leash(MIN_LEASH),
00209 max_leash(MAX_LEASH),
00210 leash_flex(LEASH_FLEX),
00211 #ifdef DETERMINISTIC_EVENTS
00212 deterministic(true),
00213 #else
00214 deterministic(false),
00215 #endif
00216 checkpoint_gvt_interval(0),
00217 checkpoint_time_interval(0),
00218 lb_gvt_interval(0)
00219 {
00220 }
00221 };
00222 PUPbytes(POSE_Config)
00223
00224 #endif