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 #include "params.h" 6 7 #define TRUE 1 8 #define FALSE 0 9 10 11 /* Input and ouput control parameters */ 12 13 int CHECK_INPUT = TRUE; /* Check input for consistency? (TRUE/FALSE) */ 14 int ECHO = 2; /* Print input/param options? to file? (-2..2) */ 15 int OUTPUT_METRICS = 2; /* Controls displaying of results (-2..2) */ 16 int OUTPUT_TIME = 2; /* At what level to display timings (0..2) */ 17 int OUTPUT_ASSIGN = FALSE; /* Write assignments to file? (TRUE/FALSE) */ 18 int OUT_ASSIGN_INV = FALSE;/* If so, use inverse form? (TRUE/FALSE) */ 19 int IN_ASSIGN_INV = FALSE; /* Input file in inverse form? (TRUE/FALSE) */ 20 int PROMPT = TRUE; /* Prompt for input? (TRUE/FALSE) */ 21 int PRINT_HEADERS = TRUE; /* Print pretty output headers (TRUE/FALSE) */ 22 23 24 /* Eigenvector calculation parameters */ 25 26 int LANCZOS_TYPE = 3; /* type of Lanczos to use */ 27 /* 1 => full orthog, 2 => full inverse operator */ 28 /* 3 => selective orthogonalization */ 29 double EIGEN_TOLERANCE = 1e-3; /* Numerical eigen-tolerance */ 30 double SRESTOL = -1.; /* Rel resid tol on T evec; autoset if <= 0 */ 31 int LANCZOS_SO_INTERVAL = 10; /* Itns. between SO orthog checks; set >= 2 */ 32 int LANCZOS_MAXITNS = -1; /* Max Lanczos its; autoset if <= 0 */ 33 double BISECTION_SAFETY = 10; /* Divides Lanczos bisection tol */ 34 int LANCZOS_CONVERGENCE_MODE = 0; /* Lanczos convergence test type: */ 35 /* 0=> residual, 1=> partition */ 36 int RQI_CONVERGENCE_MODE = 1; /* RQI convergence test type: */ 37 /* 0=> residual, 1=> partition */ 38 int LANCZOS_SO_PRECISION = 2; /* 2 => double Lanczos, 1 => float */ 39 int WARNING_EVECS = 2; /* Warnings in eigenvector generation (0..3) */ 40 double WARNING_ORTHTOL = 2; /* Warning if Ares and bjitol have this ratio */ 41 double WARNING_MISTOL = 100; /* Warning if Ares and bjitol have this ratio */ 42 int LANCZOS_TIME = FALSE; /* Detailed Lanczos times? (TRUE/FALSE) */ 43 int TIME_KERNELS = FALSE; /* Time numerical kernels? (TRUE/FALSE) */ 44 45 46 /* Other parameters for spectral methods */ 47 48 int MAKE_CONNECTED = TRUE;/* Connect graph if using spectral method? */ 49 int PERTURB = TRUE; /* Randomly perturb matrix in spectral method? */ 50 int NPERTURB = 2; /* If so, how many edges to modify? */ 51 double PERTURB_MAX = 3.0e-3; /* Largest value for perturbation */ 52 int MAPPING_TYPE = 1; /* How to map from eigenvectors to partition */ 53 /* 0 => cut at origin, 1 => min-cost assign */ 54 int COARSE_NLEVEL_RQI = 2;/* # levels between RQI calls in uncoarsening */ 55 int OPT3D_NTRIES = 5; /* # local opts to look for global min in opt3d */ 56 57 58 /* Kernighan--Lin/Fiduccia--Mattheyses parameters */ 59 60 int KL_METRIC = 2; /* KL interset cost: 1=>cuts, 2=>hops */ 61 int KL_RANDOM = TRUE; /* Use randomness in Kernighan-Lin? (TRUE/FALSE)*/ 62 int KL_BAD_MOVES = 20; /* Number of unhelpful moves in a row allowed */ 63 int KL_NTRIES_BAD = 1; /* # unhelpful passes before quitting KL */ 64 int KL_UNDO_LIST = TRUE; /* Only resort changed vtxs? (TRUE/FALSE) */ 65 double KL_IMBALANCE = 0.0; /* Fractional imbalance allowed by KL */ 66 67 68 /* Coarsening parameters */ 69 70 double COARSEN_RATIO_MIN = .7; /* Min vtx reduction each coarsen stage */ 71 int COARSE_NLEVEL_KL = 2; /* # levels between KL calls in uncoarsening */ 72 int MATCH_TYPE = 1; /* Type of contraction matching (1..5) */ 73 int HEAVY_MATCH = FALSE; /* Encourage heavy match edges? (TRUE/FALSE) */ 74 int COARSE_KL_BOTTOM = TRUE; /* Force KL at lowest level (TRUE/FALSE) */ 75 int COARSEN_VWGTS = TRUE; /* Sum vtx weights in coarsening? (TRUE/FALSE) */ 76 int COARSEN_EWGTS = TRUE; /* Sum edge weights in coarsening? (TRUE/FALSE) */ 77 int KL_ONLY_BNDY = TRUE; /* Start moving vtxs on boundary? (TRUE/FALSE) */ 78 79 80 /* Parameters for post-processing options */ 81 82 int REFINE_PARTITION = FALSE; /* Postprocess to improve cuts? */ 83 int INTERNAL_VERTICES = FALSE; /* ... to up internal vtxs? (TRUE/FALSE) */ 84 int REFINE_MAP = FALSE; /* ... to reduce hops? (TRUE/FALSE) */ 85 86 87 /* Architecture parameters */ 88 89 int ARCHITECTURE = 0; /* 0=> hypercube, d=> d-dimensional mesh (0..3)*/ 90 91 92 /* Miscellaneous parameters */ 93 94 int TERM_PROP = FALSE; /* Invoke terminal propagation? (TRUE/FALSE) */ 95 double CUT_TO_HOP_COST = 1; /* ..if so, relative importance of cuts/hops */ 96 int SEQUENCE = FALSE; /* Only do spectral ordering? (TRUE/FALSE) */ 97 char SEQ_FILENAME[NAME_LENGTH] = "Sequence.out"; /* If so, file name */ 98 long RANDOM_SEED = 7654321L; /* Seed for random number generator */ 99 int NSQRTS = 1000; /* # square roots to precompute if coarsening */ 100 int MAKE_VWGTS = FALSE; /* Make vtx weights degrees+1? (TRUE/FALSE) */ 101 int FREE_GRAPH = FALSE; /* Free input graph data? (TRUE/FALSE) */ 102 char *PARAMS_FILENAME = "User_Params"; /* File of parameter changes */ 103 104 105 /* Parameters that control debugging output */ 106 107 int DEBUG_EVECS = 0; /* Debug flag for eigenvector generation (0..5) */ 108 int DEBUG_KL = 0; /* Debug flag for Kernighan-Lin (0..3) */ 109 int DEBUG_INERTIAL = 0; /* Debug flag for inertial method (0..1) */ 110 int DEBUG_CONNECTED = 0; /* Debug flag for connected components (0..1) */ 111 int DEBUG_PERTURB = 0; /* Debug flag for matrix perturbation (0..1) */ 112 int DEBUG_ASSIGN = 0; /* Debug flag for assignment to sets (0..1) */ 113 int DEBUG_OPTIMIZE = 0; /* Debug flag for optimization/rotation (0..2) */ 114 int DEBUG_BPMATCH = 0; /* Debug flag for bipartite matching code (0..2) */ 115 int DEBUG_COARSEN = 0; /* Debug flag for coarsening/uncoarsening (0..1) */ 116 int DEBUG_MEMORY = 0; /* Debug flag for smalloc/sfree (0..3) */ 117 int DEBUG_INPUT = 0; /* Debug flag for having read input files (0..1) */ 118 int DEBUG_PARAMS = 2; /* Debug flag for reading parameter file (0..2) */ 119 int DEBUG_INTERNAL = 0; /* Debug flag for internal vertices (0..2) */ 120 int DEBUG_REFINE_PART = 0;/* Debug flag for refine partition (0..1) */ 121 int DEBUG_REFINE_MAP = 0; /* Debug flag for refining mapping (0..1) */ 122 int DEBUG_SIMULATOR = 0; /* Debug flag for comm simulator (0..2) */ 123 int DEBUG_TRACE = 0; /* Trace main execution path (0..2) */ 124 int DEBUG_MACH_PARAMS = 0;/* Print computed machine params? (0..1) */ 125