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