90 "Usage: gpmetis [options] graphfile nparts",
92 " Required parameters",
93 " graphfile Stores the graph to be partitioned.",
94 " nparts The number of partitions to split the graph.",
96 " Optional parameters",
98 " Specifies the scheme to be used for computing the k-way partitioning.",
99 " The possible values are:",
100 " rb - Recursive bisectioning",
101 " kway - Direct k-way partitioning [default]",
104 " Specifies the scheme to be used to match the vertices of the graph",
105 " during the coarsening.",
106 " The possible values are:",
107 " rm - Random matching",
108 " shem - Sorted heavy-edge matching [default]",
110 " -iptype=string [applies only when -ptype=rb]",
111 " Specifies the scheme to be used to compute the initial partitioning",
113 " The possible values are:",
114 " grow - Grow a bisection using a greedy scheme [default for ncon=1]",
115 " random - Compute a bisection at random [default for ncon>1]",
117 " -objtype=string [applies only when -ptype=kway]",
118 " Specifies the objective that the partitioning routines will optimize.",
119 " The possible values are:",
120 " cut - Minimize the edgecut [default]",
121 " vol - Minimize the total communication volume",
133 " Specifies that the coarsening will not perform any 2-hop matchings",
134 " when the standard matching fails to sufficiently contract the graph.",
136 " -contig [applies only when -ptype=kway]",
137 " Specifies that the partitioning routines should try to produce",
138 " partitions that are contiguous. Note that if the input graph is not",
139 " connected this option is ignored.",
141 " -minconn [applies only when -ptype=kway]",
142 " Specifies that the partitioning routines should try to minimize the",
143 " maximum degree of the subdomain graph, i.e., the graph in which each",
144 " partition is a node, and edges connect subdomains with a shared",
148 " Specifies the name of the file that stores the target weights for",
149 " each partition. By default, all partitions are assumed to be of ",
153 " Specifies the maximum allowed load imbalance among the partitions.",
154 " A value of x indicates that the allowed load imbalance is 1+x/1000.",
155 " For ptype=rb, the load imbalance is measured as the ratio of the ",
156 " 2*max(left,right)/(left+right), where left and right are the sizes",
157 " of the respective partitions at each bisection. ",
158 " For ptype=kway, the load imbalance is measured as the ratio of ",
159 " max_i(pwgts[i])/avgpwgt, where pwgts[i] is the weight of the ith",
160 " partition and avgpwgt is the sum of the total vertex weights divided",
161 " by the number of partitions requested.",
162 " For ptype=rb, the default value is 1 (i.e., load imbalance of 1.001).",
163 " For ptype=kway, the default value is 30 (i.e., load imbalance of 1.03).",
166 " Applies only for multi-constraint partitioning and specifies the per",
167 " constraint allowed load imbalance among partitions. The required ",
168 " parameter corresponds to a space separated set of floating point",
169 " numbers, one for each of the constraints. For example, for three",
170 " constraints, the string can be \"1.02 1.2 1.35\" indicating a ",
171 " desired maximum load imbalance of 2%, 20%, and 35%, respectively.",
172 " The load imbalance is defined in a way similar to ufactor.",
173 " If supplied, this parameter takes priority over ufactor.",
176 " Specifies the number of iterations for the refinement algorithms",
177 " at each stage of the uncoarsening process. Default is 10.",
180 " Specifies the number of different partitionings that it will compute.",
181 " The final partitioning is the one that achieves the best edgecut or",
182 " communication volume. Default is 1.",
185 " Specifies that no partitioning file should be generated.",
195 " Selects the seed of the random number generator. ",
198 " Selects the dbglvl. ",
201 " Prints this message.",
207 " Usage: gpmetis [options] <filename> <nparts>",
208 " use 'gpmetis -help' for a summary of the options.",
224 memset((
void *)params, 0,
sizeof(
params_t));
275 errexit(
"Invalid option -%s=%s\n", long_options[option_index].name,
gk_optarg);
280 errexit(
"Invalid option -%s=%s\n", long_options[option_index].name,
gk_optarg);
285 errexit(
"Invalid option -%s=%s\n", long_options[option_index].name,
gk_optarg);
344 for (i=0; strlen(
helpstr[i]) > 0; i++)
350 errexit(
"Illegal command-line option(s)\n" 351 "Use %s -help for a summary of the options.\n", argv[0]);
356 printf(
"Missing parameters.");
366 errexit(
"The number of partitions should be greater than 1!\n");
381 errexit(
"***The -contig option cannot be specified with rb partitioning. Will be ignored.\n");
383 errexit(
"***The -minconn option cannot be specified with rb partitioning. Will be ignored. \n");
385 errexit(
"The -objtype=vol option cannot be specified with rb partitioning.\n");
The structure that stores the information about the command-line options.
void errexit(char *f_str,...)
static char helpstr[][100]
static gk_StringMap_t objtype_options[]
int gk_optind
Index in ARGV of the next element to be scanned.
params_t * parse_cmdline(int argc, char *argv[])
static gk_StringMap_t ctype_options[]
static char shorthelpstr[][100]
#define gk_clearcputimer(tmr)
static gk_StringMap_t iptype_options[]
static SmartStereoProjectionParams params
char * gk_strdup(char *orgstr)
Duplicates a string.
char * gk_optarg
For communication arguments to the caller.
static struct gk_option long_options[]
void * gk_malloc(size_t nbytes, char *msg)
static gk_StringMap_t ptype_options[]
Annotation for function names.
int gk_GetStringID(gk_StringMap_t *strmap, char *key)
int gk_getopt_long_only(int argc, char **argv, char *options, struct gk_option *long_options, int *opt_index)
Parse command-line arguments with only long options.
static gk_StringMap_t rtype_options[]