File: drivers.tex

package info (click to toggle)
spooles 2.2-9
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 19,012 kB
  • sloc: ansic: 146,834; csh: 3,615; makefile: 2,040; perl: 74
file content (310 lines) | stat: -rw-r--r-- 12,217 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
\par
\section{Driver programs for the {\tt Graph} object}
\label{section:Graph:drivers}
\par
This section contains brief descriptions of six driver programs.
\par
%=======================================================================
\begin{enumerate}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
checkComponents msglvl msgFile inGraphFile 
\end{verbatim}
This driver program reads in a {\tt Graph} object from a file,
and prints out information about the number of vertices and weights
of the vertices in the components.
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means that all objects are written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
The {\tt inGraphFile} parameter is the input file for the {\tt Graph}
object. It must be of the form {\tt *.graphf} or {\tt *.graphb}.
The {\tt Graph} object is read from the file via the
{\tt Graph\_readFromFile()} method.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
compressGraph msglvl msgFile inGraphFile coarseType outMapFile outGraphFile
\end{verbatim}
This driver program reads in a {\tt Graph} object from a file,
computes the equivalence map to its natural compressed graph
(the first graph need not be unit weight), and constructs the
natural compressed graph.
The equivalence map and compressed graph are optionally written out
to files.
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means that all objects are written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
The {\tt inGraphFile} parameter is the input file for the {\tt Graph}
object. It must be of the form {\tt *.graphf} or {\tt *.graphb}.
The {\tt Graph} object is read from the file via the
{\tt Graph\_readFromFile()} method.
\item
The {\tt coarseType} parameter defines the type of compressed
graph; valid values are in {\tt [0,3]}.
\item
The {\tt outMapFile} parameter is the output file for the {\tt IV}
object that holds the equivalence map.
If {\tt outMapFile} is {\tt none} then the {\tt IV} object is not
written to a file. 
Otherwise, the {\tt IV\_writeToFile()} method is called to write
the {\tt IV} object to 
a formatted file (if {\tt outMapFile} is of the form {\tt *.ivf}),
or
a binary file (if {\tt outMapFile} is of the form {\tt *.ivb}).
\item
The {\tt outGraphFile} parameter is the output file for the 
compressed {\tt Graph} object. 
If {\tt outGraphFile} is {\tt none} then the {\tt Graph} object is not
written to a file. 
Otherwise, the {\tt Graph\_writeToFile()} method is called to write
the graph to 
a formatted file (if {\tt outGraphFile} is of the form {\tt *.graphf}),
or
a binary file (if {\tt outGraphFile} is of the form {\tt *.graphb}).
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
expandGraph msglvl msgFile inGraphFile inMapFile outGraphFile
\end{verbatim}
This driver program reads in a {\tt Graph} object and a map {\tt
IV} object from two files.
It then creates a new {\tt Graph} object which is the original
graph ``expanded'' by the map, and optionally writes this object
to a file.
The program {\tt expandGraph} is the inverse of {\tt compressGraph}.
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means that all objects are written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
The {\tt inGraphFile} parameter is the input file for the {\tt Graph}
object. It must be of the form {\tt *.graphf} or {\tt *.graphb}.
The {\tt Graph} object is read from the file via the
{\tt Graph\_readFromFile()} method.
\item
The {\tt inMapFile} parameter is the input file for the {\tt IV}
object that holds the expansion map.
The {\tt IV\_readFromFile()} method is called to read
the map from 
a formatted file (if {\tt inMapFile} is of the form {\tt *.ivf}),
or
a binary file (if {\tt inMapFile} is of the form {\tt *.ivb}).
\item
The {\tt outGraphFile} parameter is the output file for the 
compressed {\tt Graph} object. 
If {\tt outGraphFile} is {\tt none} then the {\tt Graph} object is not
written to a file. 
Otherwise, the {\tt Graph\_writeToFile()} method is called to write
the graph to 
a formatted file (if {\tt outGraphFile} is of the form {\tt *.graphf}),
or
a binary file (if {\tt outGraphFile} is of the form {\tt *.graphb}).
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
mkGridGraph msglvl msgFile stencil n1 n2 n3 outFile 
\end{verbatim}
This driver program creates a Graph object for a finite difference
operator on a ${\tt n1} \times {\tt n2} \times {\tt n3}$ regular grid.
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means that all objects are written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
Valid {\tt stencil} values are 
{\tt 5} for a 2-D 5-point operator,
{\tt 7} for a 3-D 7-point operator,
{\tt 9} for a 2-D 9-point operator,
{\tt 13} for a 2-D 13-point operator
and
{\tt 27} for a 3-D 27-point operator.
\item
{\tt n1} is the number of points in the first direction.
\item
{\tt n2} is the number of points in the second direction.
\item
{\tt n3} is the number of points in the third direction,
ignored for {\tt stencil} = {\tt 5}, {\tt 9} and {\tt 13}.
\item
The {\tt Graph} object is written to file {\tt outFile}.
It must be of the form {\tt *.graphf} or {\tt *.graphb}.
The {\tt Graph} object is written to the file via the
{\tt Graph\_writeToFile()} method.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testIO msglvl msgFile inFile outFile
\end{verbatim}
This driver program reads in a {\tt Graph} object from {\tt inFile}
and writes out the object to {\tt outFile}
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt Graph} object is written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
The {\tt inFile} parameter is the input file for the {\tt Graph}
object. It must be of the form {\tt *.graphf} or {\tt *.graphb}.
The {\tt Graph} object is read from the file via the
{\tt Graph\_readFromFile()} method.
\item
The {\tt outFile} parameter is the output file for the {\tt Graph}
object. It must be of the form {\tt *.graphf} or {\tt *.graphb}.
The {\tt Graph} object is written to the file via the
{\tt Graph\_writeToFile()} method.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testIsSymmetric msglvl msgFile inFile 
\end{verbatim}
This driver program reads in a {\tt Graph} object and tests whether
it is symmetric using the {\tt Graph\_isSymmetric()} method.
This was useful in one application where the {\tt Graph} object was
constructed improperly.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt Graph} object is written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
The {\tt inFile} parameter is the input file for the {\tt Graph}
object. It must be of the form {\tt *.graphf} or {\tt *.graphb}.
The {\tt Graph} object is read from the file via the
{\tt Graph\_readFromFile()} method.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testWirebasket msglvl msgFile inGraphFile inStagesFile
               outStagesFile radius
\end{verbatim}
This driver program reads in a {\tt Graph} object and 
and a file that contains the stages ids of the vertices,
(stage equal to zero means the vertex is in the Schur complement),
and overwrites the stages vector to specify the stage that the
vertex lies for a wirebasket domain decomposition of the graph.
For a Schur complement vertex, its stage is precisely the number of
domains that lie within {\tt radius} edges of it.
The new stages vector is written to the {\tt outStagesFile} file.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt Graph} object is written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
The {\tt inGraphFile} parameter is the input file for the {\tt Graph}
object. It must be of the form {\tt *.graphf} or {\tt *.graphb}.
The {\tt Graph} object is read from the file via the
{\tt Graph\_readFromFile()} method.
\item
The {\tt inStagesFile} parameter is the input file for the {\tt IV}
object that holds the component ids. 
It must be of the form {\tt *.ivf} or {\tt *.ivb}.
The {\tt IV} object is read from the file via the
{\tt IV\_readFromFile()} method.
\item
The {\tt outStagesFile} parameter is the output file for the 
stages {\tt IV} object. 
It must be of the form {\tt *.ivf} or {\tt *.ivb}.
The {\tt IV} object is written to the file via the
{\tt IV\_writeToFile()} method.
\item
The {\tt radius} parameter is used to define the stage of a Schur
complement vertex, namely the stage is the number of domains that
are found within {\tt radius} edges of the vertex.
\end{itemize}
The two plots below illustrate the wirebasket stages for a $15
\times 15$ grid.
They show the stages for {\tt radius = 1} on the
left and {\tt radius = 2} on the right.
The domains are $3 \times 3$ subgrids whose vertices have labels
equal to zero.
\begin{center}
\makebox{
% \psfig{file=rad1.eps,width=2.7in,height=2.70in}
\psfig{file=../../Graph/doc/rad1.eps,width=2.7in,height=2.70in}
% \psfig{file=rad2.eps,width=2.7in,height=2.70in}
\psfig{file=../../Graph/doc/rad2.eps,width=2.7in,height=2.70in}
}
\end{center}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
writeMetisFile msglvl msgFile inGraphFile outMetisFile 
\end{verbatim}
This driver program reads in an {\tt Graph} object and write it out
to a file in the format required by the {\bf METIS} software
package.
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means that all objects are written
to the message file.
\item
The {\tt msgFile} parameter determines the message file --- if {\tt
msgFile} is {\tt stdout}, then the message file is {\it stdout},
otherwise a file is opened with {\it append} status to receive any
output data.
\item
The {\tt inGraphFile} parameter is the input file for the {\tt Graph}
object. It must be of the form {\tt *.graphf} or {\tt *.graphb}.
The {\tt Graph} object is read from the file via the
{\tt Graph\_readFromFile()} method.
\item
The {\tt outMetisFile} parameter is the outfile file for the {\bf
METIS} graph object. 
\end{itemize}
%-----------------------------------------------------------------------
\end{enumerate}