Ice Sheet System Model  4.18
Code documentation
user_params.cpp
Go to the documentation of this file.
1 /* This software was developed by Bruce Hendrickson and Robert Leland *
2  * at Sandia National Laboratories under US Department of Energy *
3  * contract DE-AC04-76DP00789 and is copyrighted by Sandia Corporation. */
4 
5 /* Modified by John Gilbert 25 Aug 1995 for Matlab mex-file interface */
6 /* Modified by Tim Davis, July 6, 1998, for Matlab 5.1 interface, and */
7 /* a more picky compiler (cc) that complains about duplicate global */
8 /* declarations. */
9 
10 #ifdef HAVE_CONFIG_H
11 #include <config.h>
12 #else
13 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
14 #endif
15 
16 #ifdef _HAVE_CHACO_ //only works if dakota library has been compiled in.
17 
18 #include "params.h"
19 
20 #define TRUE 1
21 #define FALSE 0
22 
23 /* Input and ouput control parameters */
24 
25 int CHECK_INPUT = TRUE; /* Check input for consistency? (TRUE/FALSE) */
26 int ECHO = 0; /* Print input/param options? to file? (-2..2) */
27 int OUTPUT_METRICS = 0; /* Controls displaying of results (-2..2) */
28 int OUTPUT_TIME = 0; /* At what level to display timings (0..2) */
29 int OUTPUT_ASSIGN = FALSE; /* Write assignments to file? (TRUE/FALSE) */
30 int OUT_ASSIGN_INV = FALSE;/* If so, use inverse form? (TRUE/FALSE) */
31 int IN_ASSIGN_INV = FALSE; /* Input file in inverse form? (TRUE/FALSE) */
32 int PROMPT = FALSE; /* Prompt for input? (TRUE/FALSE) */
33 int PRINT_HEADERS = FALSE; /* Print pretty output headers (TRUE/FALSE) */
34 
35 /* Eigenvector calculation parameters */
36 
37 int LANCZOS_TYPE = 3; /* type of Lanczos to use */
38  /* 1 => full orthog, 2 => full inverse operator */
39  /* 3 => selective orthogonalization */
40 double EIGEN_TOLERANCE = 1e-3; /* Numerical eigen-tolerance */
41 double SRESTOL = -1.; /* Rel resid tol on T evec; autoset if <= 0 */
42 int LANCZOS_SO_INTERVAL = 10; /* Itns. between SO orthog checks; set >= 2 */
43 int LANCZOS_MAXITNS = -1; /* Max Lanczos its; autoset if <= 0 */
44 double BISECTION_SAFETY = 10; /* Divides Lanczos bisection tol */
45 int LANCZOS_CONVERGENCE_MODE = 0; /* Lanczos convergence test type: */
46  /* 0=> residual, 1=> partition */
47 int RQI_CONVERGENCE_MODE = 1; /* RQI convergence test type: */
48  /* 0=> residual, 1=> partition */
49 int LANCZOS_SO_PRECISION = 2; /* 2 => double Lanczos, 1 => float */
50 int WARNING_EVECS = 2; /* Warnings in eigenvector generation (0..3) */
51 double WARNING_ORTHTOL = 2; /* Warning if Ares and bjitol have this ratio */
52 double WARNING_MISTOL = 100; /* Warning if Ares and bjitol have this ratio */
53 int LANCZOS_TIME = FALSE; /* Detailed Lanczos times? (TRUE/FALSE) */
54 int TIME_KERNELS = FALSE; /* Time numerical kernels? (TRUE/FALSE) */
55 
56 /* Other parameters for spectral methods */
57 
58 int MAKE_CONNECTED = TRUE;/* Connect graph if using spectral method? */
59 int PERTURB = TRUE; /* Randomly perturb matrix in spectral method? */
60 int NPERTURB = 2; /* If so, how many edges to modify? */
61 double PERTURB_MAX = 3.0e-3; /* Largest value for perturbation */
62 int MAPPING_TYPE = 1; /* How to map from eigenvectors to partition */
63  /* 0 => cut at origin, 1 => min-cost assign */
64 int COARSE_NLEVEL_RQI = 2;/* # levels between RQI calls in uncoarsening */
65 int OPT3D_NTRIES = 5; /* # local opts to look for global min in opt3d */
66 
67 /* Kernighan--Lin/Fiduccia--Mattheyses parameters */
68 
69 int KL_METRIC = 2; /* KL interset cost: 1=>cuts, 2=>hops */
70 int KL_RANDOM = TRUE; /* Use randomness in Kernighan-Lin? (TRUE/FALSE)*/
71 int KL_BAD_MOVES = 20; /* Number of unhelpful moves in a row allowed */
72 int KL_NTRIES_BAD = 1; /* # unhelpful passes before quitting KL */
73 int KL_UNDO_LIST = TRUE; /* Only resort changed vtxs? (TRUE/FALSE) */
74 double KL_IMBALANCE = 0.0; /* Fractional imbalance allowed by KL */
75 
76 /* Coarsening parameters */
77 
78 double COARSEN_RATIO_MIN = .7; /* Min vtx reduction each coarsen stage */
79 int COARSE_NLEVEL_KL = 2; /* # levels between KL calls in uncoarsening */
80 int MATCH_TYPE = 1; /* Type of contraction matching (1..4) */
81 int HEAVY_MATCH = FALSE; /* Encourage heavy match edges? (TRUE/FALSE) */
82 int COARSE_KL_BOTTOM = TRUE; /* Force KL at lowest level (TRUE/FALSE) */
83 int COARSEN_VWGTS = TRUE; /* Sum vtx weights in coarsening? (TRUE/FALSE) */
84 int COARSEN_EWGTS = TRUE; /* Sum edge weights in coarsening? (TRUE/FALSE) */
85 int KL_ONLY_BNDY = TRUE; /* Start moving vtxs on boundary? (TRUE/FALSE) */
86 
87 /* Parameters for post-processing options */
88 
89 int REFINE_PARTITION = FALSE; /* Postprocess to improve cuts? */
90 int INTERNAL_VERTICES = FALSE; /* ... to up internal vtxs? (TRUE/FALSE) */
91 int REFINE_MAP = FALSE; /* ... to reduce hops? (TRUE/FALSE) */
92 
93 /* Architecture and simulator parameters */
94 
95 int ARCHITECTURE = 0; /* 0=> hypercube, d=> d-dimensional mesh (0..3)*/
96 
97 /* Modified by Tim Davis: remove duplicate definitions */
98 #ifdef DUPLICATE_DEFINITIONS_REMOVED
99 int SIMULATOR = 0; /* Run simulator? In what mode? */
100 int SIMULATION_ITNS = 1; /* # iterations simulator is to imitate. */
101 int PERCENTAGE_OUTPUT = FALSE; /* Output in percent? (TRUE/FALSE) */
102 double CUT_COST = 0.0; /* Communication cost of a cut-edge. */
103 double HOP_COST = 0.0; /* Communication cost of a hop. */
104 double BDY_COST = 0.0; /* Cost associated with boundary vertices. */
105 double BDY_HOP_COST = 0.0; /* Cost associated with boundary hops. */
106 double STARTUP_COST = 0.0; /* Communication cost of a message startup. */
107  /* Note: nCUBE2 startup: 112e-6, per byte: 4.6e-6, buffering 5.6e-6 */
108  /* Intel Paragon startup: 70e-6, per byte: 5.3e-8 */
109 #endif
110 
111 /* Miscellaneous parameters */
112 
113 int TERM_PROP = FALSE; /* Invoke terminal propagation? (TRUE/FALSE) */
114 double CUT_TO_HOP_COST = 1; /* ..if so, relative importance of cuts/hops */
115 int SEQUENCE = FALSE; /* Only do spectral ordering? (TRUE/FALSE) */
116 char SEQ_FILENAME[NAME_LENGTH] = "Sequence.out"; /* If so, file name */
117 long RANDOM_SEED = 7654321L; /* Seed for random number generator */
118 int NSQRTS = 1000; /* # square roots to precompute if coarsening */
119 int MAKE_VWGTS = FALSE; /* Make vtx weights degrees+1? (TRUE/FALSE) */
120 int FREE_GRAPH = FALSE; /* Free input graph data? (TRUE/FALSE) */
121 const char *PARAMS_FILENAME = "User_Params"; /* File of parameter changes */
122 
123 /* Parameters that control debugging output */
124 
125 int DEBUG_EVECS = 0; /* Debug flag for eigenvector generation (0..5) */
126 int DEBUG_KL = 0; /* Debug flag for Kernighan-Lin (0..3) */
127 int DEBUG_INERTIAL = 0; /* Debug flag for inertial method (0..1) */
128 int DEBUG_CONNECTED = 0; /* Debug flag for connected components (0..1) */
129 int DEBUG_PERTURB = 0; /* Debug flag for matrix perturbation (0..1) */
130 int DEBUG_ASSIGN = 0; /* Debug flag for assignment to sets (0..1) */
131 int DEBUG_OPTIMIZE = 0; /* Debug flag for optimization/rotation (0..2) */
132 int DEBUG_BPMATCH = 0; /* Debug flag for bipartite matching code (0..2) */
133 int DEBUG_COARSEN = 0; /* Debug flag for coarsening/uncoarsening (0..1) */
134 int DEBUG_MEMORY = 0; /* Debug flag for smalloc/sfree (0..3) */
135 int DEBUG_INPUT = 0; /* Debug flag for having read input files (0..1) */
136 int DEBUG_PARAMS = 1; /* Debug flag for reading parameter file (0..2) */
137 int DEBUG_INTERNAL = 0; /* Debug flag for internal vertices (0..2) */
138 int DEBUG_REFINE_PART = 0;/* Debug flag for refine partition (0..1) */
139 int DEBUG_REFINE_MAP = 0; /* Debug flag for refining mapping (0..1) */
140 int DEBUG_SIMULATOR = 0; /* Debug flag for comm simulator (0..2) */
141 int DEBUG_TRACE = 0; /* Trace main execution path (0..2) */
142 int DEBUG_MACH_PARAMS = 0;/* Print computed machine params? (0..1) */
143 
144 #endif //ifdef _HAVE_CHACO_