1 | %
|
---|
2 | % function to call the gpart module of the scotch partitioner.
|
---|
3 | % (note that gpart is just a simplied entry into gmap.)
|
---|
4 | %
|
---|
5 | % [maptab]=gpart(npart,adj_mat,vlist,vwgt,ewgt,...
|
---|
6 | % options)
|
---|
7 | %
|
---|
8 | % where the required input is:
|
---|
9 | % npart (double, number of parts for 'cmplt' architecture)
|
---|
10 | % adj_mat (double [sparse nv x nv], vertex adjacency matrix)
|
---|
11 | % vlist (double [nv], vertex labels or [])
|
---|
12 | % vwgt (double [nv], vertex weights (integers) or [])
|
---|
13 | % ewgt (double [sparse nv x nv], edge weights (integers) or [])
|
---|
14 | %
|
---|
15 | % the required output is:
|
---|
16 | % maptab (double [nv x 2], vertex labels and partitions)
|
---|
17 | %
|
---|
18 | % the optional input is:
|
---|
19 | % options (character, options to gpart)
|
---|
20 | % " -h : Display this help"
|
---|
21 | % " -m<strat> : Set mapping strategy (see user's manual)"
|
---|
22 | % " -s<obj> : Force unity weights on <obj>:"
|
---|
23 | % " e : edges"
|
---|
24 | % " v : vertices"
|
---|
25 | % " -V : Print program version and copyright"
|
---|
26 | % " -v<verb> : Set verbose mode to <verb>:"
|
---|
27 | % " m : mapping information"
|
---|
28 | % " s : strategy information"
|
---|
29 | % " t : timing information"
|
---|
30 | % ""
|
---|
31 | % "See default strategy with option '-vs'"
|
---|
32 | %
|
---|
33 | function [maptab]=gpart(npart,adj_mat,vlist,vwgt,ewgt,...
|
---|
34 | varargin)
|
---|
35 |
|
---|
36 | if ~nargin
|
---|
37 | help gpart
|
---|
38 | return
|
---|
39 | end
|
---|
40 |
|
---|
41 | % gmap_mex uses static variables, so clear those out before every run
|
---|
42 | clear gmap_mex
|
---|
43 |
|
---|
44 | [maptab]=gmap_mex(npart,adj_mat,vlist,vwgt,ewgt,...
|
---|
45 | varargin{:});
|
---|
46 |
|
---|
47 | % doesn't hurt to clear out after every run, too
|
---|
48 | clear gmap_mex
|
---|
49 |
|
---|
50 | end
|
---|