00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef COMPONENT_GLOBALOPTS_C_DEFINED
00039 #define COMPONENT_GLOBALOPTS_C_DEFINED
00040
00041 #include "Component/GlobalOpts.H"
00042
00043 #include "Component/ModelOptionDef.H"
00044 #include "Util/fpu.H"
00045
00046
00047
00048 const ModelOptionDef OPT_ShowHelpMessage =
00049 { MODOPT_FLAG, "ShowHelpMessage", &MOC_GENERAL, OPTEXP_CORE,
00050 "Show help message and option syntax",
00051 "help", 'h', "", "true" };
00052
00053
00054 const ModelOptionDef OPT_ShowVersion =
00055 { MODOPT_FLAG, "ShowVersion", &MOC_GENERAL, OPTEXP_CORE,
00056 "Show the package name, version, and the svn repository "
00057 "version of the current build",
00058 "version", '\0', "", "false" };
00059
00060
00061 const ModelOptionDef OPT_ShowSvnVersion =
00062 { MODOPT_FLAG, "ShowSvnVersion", &MOC_GENERAL, OPTEXP_CORE,
00063 "Show the svn repository version of the current build",
00064 "svnversion", '\0', "", "false" };
00065
00066
00067 const ModelOptionDef OPT_CheckPristine =
00068 { MODOPT_FLAG, "CheckPristine", &MOC_GENERAL, OPTEXP_CORE,
00069 "Check if the executable was built from pristine source (i.e., "
00070 "all files up-to-date and not locally modified), and return an "
00071 "exit code of zero if true, and non-zero otherwise",
00072 "check-pristine", '\0', "", "false" };
00073
00074
00075 const ModelOptionDef OPT_DebugMode =
00076 { MODOPT_FLAG, "DebugMode", &MOC_GENERAL, OPTEXP_CORE,
00077 "Use debug mode, which, in particular, will increase the verbosity of "
00078 "the log messages and printout all model parameter values just before "
00079 "the model starts",
00080 "debug", 'd', "", "false" };
00081
00082
00083 const ModelOptionDef OPT_UsingFPE =
00084 { MODOPT_FLAG, "UsingFPE", &MOC_GENERAL, OPTEXP_CORE,
00085 "Use floating-point exceptions, which will abort execution if overflow, "
00086 "underflow, invalid or division by zero are encountered",
00087 "use-fpe", '\0', "", "true" };
00088
00089
00090 const ModelOptionDef OPT_FpuPrecision =
00091 { MODOPT_ARG(FpuPrecision), "FpuPrecision", &MOC_GENERAL, OPTEXP_CORE,
00092 "Specifies the precision in which the floating-point unit (FPU) "
00093 "should operate; default is 'extended'",
00094 "fpu-precision", '\0', "<single|double|extended>", "extended" };
00095
00096
00097 const ModelOptionDef OPT_FpuRoundingMode =
00098 { MODOPT_ARG(FpuRoundingMode), "FpuRoundingMode", &MOC_GENERAL, OPTEXP_CORE,
00099 "Specifies the rounding-mode in which the floating-point unit (FPU) "
00100 "should operate; options are nearest (toward nearest), down "
00101 "(toward -inf), up (toward +inf), zero (toward zero)",
00102 "fpu-rounding", '\0', "<nearest|down|up|zero>", "nearest" };
00103
00104
00105 const ModelOptionDef OPT_TestMode =
00106 { MODOPT_FLAG, "TestMode", &MOC_GENERAL, OPTEXP_CORE,
00107 "Use test mode, which, in particular, will turn off randomness (like "
00108 "--nouse-random), reset random numbers to a reproducible pseudo "
00109 "sequence, and turn off most displays. This is mostly useful for "
00110 "execution of the test suite, or any situation where you need "
00111 "deterministic, reproducible behavior",
00112 "test-mode", 'Z', "", "false" };
00113
00114
00115 const ModelOptionDef OPT_LoadConfigFile =
00116 { MODOPT_ARG_STRING, "LoadConfigFile", &MOC_GENERAL, OPTEXP_CORE,
00117 "Load configuration from file",
00118 "load-config-from", '\0', "<file.pmap>", "" };
00119
00120
00121 const ModelOptionDef OPT_SaveConfigFile =
00122 { MODOPT_ARG_STRING, "SaveConfigFile", &MOC_GENERAL, OPTEXP_CORE,
00123 "Save configuration to file",
00124 "save-config-to", '\0', "<file.pmap>", "" };
00125
00126
00127 const ModelOptionDef OPT_TextLogFile =
00128 { MODOPT_ARG_STRING, "TextLogFile", &MOC_GENERAL, OPTEXP_CORE,
00129 "Save text log messages to file",
00130 "textlog", '\0', "<file.log>", "" };
00131
00132
00133 const ModelOptionDef OPT_UseRandom =
00134 { MODOPT_FLAG, "UseRandom", &MOC_GENERAL, OPTEXP_CORE,
00135 "Add small amounts of random noise to various stages of model",
00136 "use-random", '\0', "", "true" };
00137
00138
00139 const ModelOptionDef OPT_ProfileOutFile =
00140 { MODOPT_ARG_STRING, "ProfileOutFile", &MOC_GENERAL, OPTEXP_CORE,
00141 "Where to save profiling information upon program exit (if 'none' "
00142 "is passed for the filename, then profiling information will not "
00143 "be saved at all)",
00144 "profile-out", '\0', "<filename>", "" };
00145
00146
00147 const ModelOptionDef OPT_LogVerb =
00148 { MODOPT_ARG_STRING, "LogVerb", &MOC_GENERAL, OPTEXP_CORE,
00149 "Verbosity of log messages displayed during execution. If 'Default' is "
00150 "selected, will use whatever value may have been set as default "
00151 "in the program.",
00152 "logverb", '\0', "<Debug|Info|Error|Fatal|Default>", "Default" };
00153
00154
00155 const ModelOptionDef OPT_EchoArgs =
00156 { MODOPT_FLAG, "EchoArgs", &MOC_GENERAL, OPTEXP_CORE,
00157 "Echo all the command-line arguments to stdout after "
00158 "command-line parsing is done.",
00159 "echo-args", '\0', "", "false" };
00160
00161
00162 const ModelOptionDef OPT_MemCaching =
00163 { MODOPT_FLAG, "MemCaching", &MOC_GENERAL, OPTEXP_CORE,
00164 "Whether to cache memory allocations of commonly-used sizes.",
00165 "mem-caching", '\0', "", "true" };
00166
00167
00168
00169
00170
00171
00172
00173
00174 #endif // COMPONENT_GLOBALOPTS_C_DEFINED