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 (649 lines) | stat: -rw-r--r-- 22,818 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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
\par
\section{Driver programs found in the {\tt Misc} directory}
\label{section:Misc:drivers}
\par
This section contains brief descriptions of the driver programs.
\par
%=======================================================================
\begin{enumerate}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testNDperm msglvl msgFile n1 n2 n3 outPermFile
\end{verbatim}
This driver program generates a {\tt Perm} object that contains a
nested dissection ordering for a {\tt n1 x n2 x n3} regular grid.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt Perm} object is written
to the output 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
{\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.
\item
The {\tt outPermFile} parameter is the output file for the {\tt Perm}
object. 
If {\tt outPermFile} is {\tt none} then the {\tt Perm} object is not
written to a file. 
Otherwise, the {\tt Perm\_writeToFile()} method is called to write
the object to 
a formatted file (if {\tt outPermFile} is of the form {\tt *.permf}),
or
a binary file (if {\tt outPermFile} is of the form {\tt *.permb}).
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testOrderViaMMD msglvl msgFile GraphFile seed ETreeFile
\end{verbatim}
This program reads in a {\tt Graph} object from a file and computes
a multiple minimum degree ordering of the graph.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt Perm} object is written
to the output 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 seed} parameter is a random number seed.
\item
The {\tt ETreeFile} parameter is the output file for the {\tt ETree}
object. 
If {\tt ETreeFile} is {\tt none} then the {\tt ETree} object is not
written to a file. 
Otherwise, the {\tt ETree\_writeToFile()} method is called to write
the object to 
a formatted file (if {\tt ETreeFile} is of the form {\tt *.etreef}),
or
a binary file (if {\tt ETreeFile} is of the form {\tt *.etreeb}).
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testOrderViaND msglvl msgFile GraphFile maxdomainsize seed ETreeFile
\end{verbatim}
This program reads in a {\tt Graph} object from a file and computes
a generalized nested dissection ordering of the graph.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt Perm} object is written
to the output 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 maxdomainsize} parameter governs the partition of a graph.
If a subgraph has more than {\tt maxdomainsize} vertices, it is
split.
\item
The {\tt seed} parameter is a random number seed.
\item
The {\tt ETreeFile} parameter is the output file for the {\tt ETree}
object. 
If {\tt ETreeFile} is {\tt none} then the {\tt ETree} object is not
written to a file. 
Otherwise, the {\tt ETree\_writeToFile()} method is called to write
the object to 
a formatted file (if {\tt ETreeFile} is of the form {\tt *.etreef}),
or
a binary file (if {\tt ETreeFile} is of the form {\tt *.etreeb}).
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testOrderViaMS msglvl msgFile GraphFile maxdomainsize seed ETreeFile
\end{verbatim}
This program reads in a {\tt Graph} object from a file and computes
a multisection ordering of the graph.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt Perm} object is written
to the output 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 maxdomainsize} parameter governs the partition of a graph.
If a subgraph has more than {\tt maxdomainsize} vertices, it is
split.
\item
The {\tt seed} parameter is a random number seed.
\item
The {\tt ETreeFile} parameter is the output file for the {\tt ETree}
object. 
If {\tt ETreeFile} is {\tt none} then the {\tt ETree} object is not
written to a file. 
Otherwise, the {\tt ETree\_writeToFile()} method is called to write
the object to 
a formatted file (if {\tt ETreeFile} is of the form {\tt *.etreef}),
or
a binary file (if {\tt ETreeFile} is of the form {\tt *.etreeb}).
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
drawGraph msglvl msgFile inGraphFile inCoordsFile inTagsIVfile
          outEPSfile linewidth1 linewidth2 bbox[4] rect[4] radius
\end{verbatim}
This driver program generates a Encapsulated Postscript file 
{\tt outEPSfile} of a 2-D graph using a {\tt Graph} object,
a {\tt Coords} object and a tags {\tt IV} object that contains the
component ids of the vertices.
\par
See the {\tt doDraw} script file in this directory for an example
calling sequence.
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means that all objects are written
to the output 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 inCoordsFile} parameter is the input file for the {\tt Coords}
object. It must be of the form {\tt *.coordsf} or {\tt *.coordsb}.
The {\tt Coords} object is read from the file via the
{\tt Coords\_readFromFile()} method.
\item
The {\tt inTagsIVfile} parameter is the input file for the tags
{\tt IV} object. 
It must be of the form {\tt 'none'}, {\tt *.ivf} or {\tt *.ivb}.
The {\tt IV} object is read from the file via the
{\tt IV\_readFromFile()} method.
\item
The {\tt outEPSfile} parameter is the output file for the Encapsulated
Postscript file.
\item
The {\tt linewidth1} parameter governs the linewidth of edges
between vertices in the same component.
\item
The {\tt linewidth2} parameter governs the linewidth of edges
between vertices in different components.
\item
The {\tt bbox[4]} array is the bounding box for the plot.
In Postscript the coordinates are in {\it points}, where there are
72 points per inch.
For example, a bounding box of {\tt 0 0 200 300} will create a plot
whose size is 2.78 inches by 4.17 inches.
\item
The {\tt rect[4]} array is the enclosing rectangle for the plot.
To put a 20 point margin around the plot, set
{\tt rect[0] = bbox[0] + 20},
{\tt rect[1] = bbox[1] + 20},
{\tt rect[2] = bbox[2] - 20} and
{\tt rect[3] = bbox[3] - 20}.
\item
The {\tt radius} parameter governs the size of the filled circle
that is centered on each vertex.
The dimension is in points.
\end{itemize}
See Figure~\ref{fig-R2D100} for a plot of the graph of {\tt R2D100},
a randomly triangulated grid with 100 vertices with {\tt linewidth1
= 3}.
Figure~\ref{fig-R2D100-fishnet} illustrates a domain decomposition
obtained from the fishnet algorithm 
of Chapter~\ref{chapter:GPart:intro} 
with {\tt linewidth1 = 3} and {\tt linewidth2 = 0.1}.
\par
\begin{figure}[htbp]
\caption{{\sc R2D100}}
\label{fig-R2D100}
\begin{center}
\mbox{
% \psfig{file=R2D100notags.eps,height=4.00in,width=4.00in}
\psfig{file=../../misc/doc/R2D100notags.eps,height=4.00in,width=4.00in}
}
\end{center}
\end{figure}
\par
\begin{figure}[htbp]
\caption{{\sc R2D100: fishnet domain decomposition}}
\label{fig-R2D100-fishnet}
\begin{center}
\mbox{
% \psfig{file=R2D100fishnet.eps,height=4.00in,width=4.00in}
\psfig{file=../../misc/doc/R2D100fishnet.eps,height=4.00in,width=4.00in}
}
\end{center}
\end{figure}

%-----------------------------------------------------------------------
\item
\begin{verbatim}
testSemi msglvl msgFile GraphFile ETreeFile mapFile
\end{verbatim}
This program is used to compute the effect of using a semi-implicit
factorization to solve 
$$
AX = 
\left \lbrack \begin{array}{cc}
A_{0,0} & A_{0,1} \cr
A_{1,0} & A_{1,1} 
\end{array} \right \rbrack
\left \lbrack \begin{array}{c}
X_0 \cr
X_1 
\end{array} \right \rbrack
=
\left \lbrack \begin{array}{c}
B_0 \cr
B_1 
\end{array} \right \rbrack
= B.
$$
$A$ is factored as
$$
\left \lbrack \begin{array}{cc}
A_{0,0} & A_{0,1} \cr
A_{1,0} & A_{1,1} 
\end{array} \right \rbrack
=
\left \lbrack \begin{array}{cc}
L_{0,0} & 0 \cr
L_{1,0} & L_{1,1} 
\end{array} \right \rbrack
\left \lbrack \begin{array}{cc}
U_{0,0} & U_{0,1} \cr
 0 & U_{1,1} 
\end{array} \right \rbrack,
$$
and to solve $AX = B$, we do the following steps.
\begin{itemize}
\item solve $L_{0,0} Y_0 = B_0$
\item solve $L_{1,1} U_{1,1} X_1 = B_1 - L_{1,0} Y_0$
\item solve $U_{0,0} X_0 = Y_0 - U_{0,1} X_1$
\end{itemize}
An alternative factorization is
$$
A =
\left \lbrack \begin{array}{cc}
L_{0,0} & 0 \cr
A_{1,0}U_{0,0}^{-1} & L_{1,1} 
\end{array} \right \rbrack
\left \lbrack \begin{array}{cc}
U_{0,0} & L_{0,0}^{-1}U_{0,1} \cr
 0 & U_{1,1} 
\end{array} \right \rbrack.
$$
To solve $AX = B$, we do the following {\it semi-implicit solve}.
\begin{itemize}
\item solve $L_{0,0} U_{0,0} Z_0 = B_0$
\item solve $L_{1,1} U_{1,1} X_1 = B_1 - A_{1,0} Z_0$
\item solve $L_{0,0} U_{0,0} X_0 = B_0 - A_{0,1} X_1$
\end{itemize}
When we compare the semi-implicit solve against the explicit solve,
we see that the former needs
$A_{0,1}$ and $A_{1,0}$ but not $L_{1,0}$ or $A_{0,1}$.
and executes two solves with $L_{0,0}$ and $U_{0,0}$ (instead of one)
and performs a matrix-matrix multiply with $A_{0,1}$ and $A_{1,0}$
instead of $L_{1,0}$ and $U_{0,1}$.
In situations where the numbers of entries in $L_{1,0}$ and
$U_{0,1}$ are much larger than those in $A_{1,0}$ and $A_{0,1}$,
and the numbers of entries in $L_{0,0}$ and $U_{0,0}$ are not too
large, the semi-implicit factorization can be more efficient.
\par
This program reads in three objects:
a {\tt Graph} object,
an {\tt ETree} object to specify the ordering,
and an {\tt IV} map object that tells which vertices are in the
which blocks of the matrix.
The map from vertices to blocks follows the same convention as the
{\it component map} from the {\tt GPart} object.
If {\tt map[v] = 0}, then vertex {\tt v} belongs to the Schur
complement $(1,1)$ block.
Otherwise, {\tt v} belongs to a domain (the domain number is {\tt
map[v]}) and so belongs to the $(0,0)$ block.
The output of the program gives statistics for storage and
operation count for the two types of solves.
For example,
\begin{verbatim}
 storage: explicit = 1404, semi-implicit = 1063, ratio = 1.321
 opcount: explicit = 2808, semi-implicit = 2742, ratio = 1.024
\end{verbatim}
is the output using the {\tt do\_testSemi} driver program for
the {\tt R2D100} matrix.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output.
\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 GraphFile} 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 ETreeFile} parameter is the input file for the {\tt ETree}
object. It must be of the form {\tt *.etreef} or {\tt *.etreeb}.
The {\tt ETree} object is read from the file via the
{\tt ETree\_readFromFile()} method.
\item
The {\tt mapFile} parameter is the input file for the map {\tt IV}
object. 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.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
allInOne msglvl msgFile type symmetryflag pivotingflag
         matrixFileName rhsFileName seed
\end{verbatim}
This {\it all-in-one} driver program is an example that tests the
serial $U^TDU$, $U^HDU$ or $LU$ factorization and solve.
Matrix entries are read in from a file, and then the matrix 
is assembled and factored.
The right hand side entries are read in from a file, and the system
is solved.
Three input parameters specify the type of system (real or
complex),
the type of factorization (symmetric, Hermitian or nonsymmetric)
and whether pivoting is to be used for numerical stability.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt Perm} object is written
to the output 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
{\tt type} is the type of entries
\begin{itemize}
\item {\tt 1} --- ({\tt SPOOLES\_REAL}) for real entries
\item {\tt 2} --- ({\tt SPOOLES\_COMPLEX}) for complex entries
\end{itemize}
\item
{\tt symmetryflag} defines the factorization
\begin{itemize}
\item {\tt 0} --- ({\tt SPOOLES\_SYMMETRIC}) 
for a real or complex $U^TDU$ factorization
\item {\tt 1} --- ({\tt SPOOLES\_SYMMETRIC}) 
for a complex $U^HDU$ factorization
\item {\tt 2} --- ({\tt SPOOLES\_SYMMETRIC}) 
for a real or complex $LU$ factorization
\end{itemize}
\item
{\tt pivotingflag} defines pivoting or not for numerical stability
\begin{itemize}
\item {\tt 0} --- ({\tt SPOOLES\_NO\_PIVOTING}) for no pivoting
\item {\tt 1} --- ({\tt SPOOLES\_PIVOTING}) for pivoting
\end{itemize}
Note, the code has a pivoting threshold {\tt tau = 100} hardwired
into the code.
\item
The {\tt matrixFileName} parameter is the name of the input file
for the matrix entries.
For a real matrix, this file must have the following form.
\begin{verbatim}
nrow ncol nent
...
irow jcol value
...
\end{verbatim}
where the first line has the number of rows, columns and entries.
(Note, for this driver program {\tt nrow} must be equal to {\tt ncol}
since we are factoring a square matrix.)
Each of the {\tt nent} following lines contain one nonzero entry.
For a complex matrix, the file has this structure.
\begin{verbatim}
nrow ncol nent
...
irow jcol real_value imag_value
...
\end{verbatim}
For both real and complex entries, the entries need not be
disjoint,
i.e., entries with the same {\tt irow} and {\tt jcol} values are
{\it summed}.
\item
The {\tt rhsFileName} parameter is the name of the input file for
the right hand side matrix.
It has the following structure
\begin{verbatim}
nrow nrhs
...
irow value_0 value_1 ... value_\{nrhs-1\}
...
\end{verbatim}
Note, {\tt nrow} need not be the number of equations, here it is
the number of nonzero right hand side entries.
This allows us to input sparse right hand sides without specifying
the zeroes.
In contrast to the input for the matrix entries, the nonzero rows
{\it must} be unique.
The right hand side entries are not assembled into a dense matrix
object, but placed into the object.
\item
{\tt seed} is a random number seed used for the ordering process.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
patchAndGo msglvl msgFile type symmetryflag patchAndGoFlag fudge toosmall

           storeids storevalues matrixFileName rhsFileName seed 
\end{verbatim}
This driver program is used to test the ``patch-and-go''
functionality for a factorization without pivoting.
When small diagonal pivot elements are found, 
one of three actions are taken.
See the {\tt PatchAndGoInfo} object for more information.
\par
The program reads in a matrix $A$ and right hand side $B$,
generates the graph for $A$ and orders the matrix,
factors $A$ and solves the linear system $AX = B$ for $X$
using multithreaded factors and solves.
Use the script file {\tt do\_patchAndGo} for testing.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output.
Use {\tt msglvl = 1} for just timing output.
\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 type} parameter specifies a real or complex linear system.
\begin{itemize}
\item
{\tt type = 1 (SPOOLES\_REAL)} for real,
\item
{\tt type = 2 (SPOOLES\_COMPLEX)} for complex.
\end{itemize}
\item
The {\tt symmetryflag} parameter specifies the symmetry of the matrix.
\begin{itemize}
\item
{\tt type = 0 (SPOOLES\_SYMMETRIC)} for $A$ real or complex symmetric,
\item
{\tt type = 1 (SPOOLES\_HERMITIAN)} for $A$ complex Hermitian,
\item
{\tt type = 2 (SPOOLES\_NONSYMMETRIC)}
\end{itemize}
for $A$ real or complex nonsymmetric.
\item
The {\tt patchAndGoFlag} specifies the ``patch-and-go'' strategy.
\begin{itemize}
\item
{\tt patchAndGoFlag = 0} --- if a zero pivot is detected, stop
computing the factorization, set the error flag and return.
\item
{\tt patchAndGoFlag = 1} --- if a small or zero pivot is detected,
set the diagonal entry to 1 and the offdiagonal entries to zero.
\item
{\tt patchAndGoFlag = 2} --- if a small or zero pivot is detected,
perturb the diagonal entry.
\end{itemize}
\item
The {\tt fudge} parameter is used to perturb a diagonal entry.
\item
The {\tt toosmall} parameter is judge when a diagonal entry is small.
\item
If {\tt storeids = 1}, then the locations where action was taken is
stored in an {\tt IV} object.
\item
If {\tt storevalues = 1}, then the perturbations are
stored in an {\tt DV} object.
\item
The {\tt matrixFileName} parameter is the name of the files where
the matrix entries are read from.
The file has the following structure.
\begin{verbatim}
neqns neqns nent
irow jcol entry
...  ...  ...
\end{verbatim}
where {\tt neqns} is the global number of equations and {\tt nent}
is the number of entries in this file.
There follows {\tt nent} lines, each containing a row index, a
column index and one or two floating point numbers, one if real,
two if complex.
\item
The {\tt rhsFileName} parameter is the name of the files where
the right hand side entries are read from.
The file has the following structure.
\begin{verbatim}
nrow nrhs
irow entry ... entry
...  ...   ... ...
\end{verbatim}
where {\tt nrow} is the number of rows in this file
and {\tt nrhs} is the number of rigght and sides.
There follows {\tt nrow} lines, each containing a row index
and either {\tt nrhs} or {\tt 2*nrhs} floating point numbers,
the first if real, the second if complex.
\item
The {\tt seed} parameter is a random number seed.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
QRallInOne msglvl msgFile type matrixFileName rhsFileName seed
\end{verbatim}
This {\it all-in-one} driver program is an example that tests the
serial $QR$ factorization and solve.
Matrix entries are read in from a file, and then the matrix 
is assembled and factored.
The right hand side entries are read in from a file, and the system
is solved.
One input parameter specifies the type of system (real or
complex).  
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt Perm} object is written
to the output 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
{\tt type} is the type of entries
\begin{itemize}
\item {\tt 1} --- ({\tt SPOOLES\_REAL}) for real entries
\item {\tt 2} --- ({\tt SPOOLES\_COMPLEX}) for complex entries
\end{itemize}
\item
The {\tt matrixFileName} parameter is the name of the input file
for the matrix entries.
For a real matrix, this file must have the following form.
\begin{verbatim}
nrow ncol nent
...
irow jcol value
...
\end{verbatim}
where the first line has the number of rows, columns and entries.
Each of the {\tt nent} following lines contain one nonzero entry.
For a complex matrix, the file has this structure.
\begin{verbatim}
nrow nrhs nent
...
irow jcol real_value imag_value
...
\end{verbatim}
For both real and complex entries, the entries need not be
disjoint,
i.e., entries with the same {\tt irow} and {\tt jcol} values are
{\it summed}.
\item
The {\tt rhsFileName} parameter is the name of the input file for
the right hand side matrix.
It has the following structure
\begin{verbatim}
nrow nrhs
...
irow value_0 value_1 ... value_\{nrhs-1\}
...
\end{verbatim}
Note, {\tt nrow} need not be the number of equations, here it is
the number of nonzero right hand side entries.
This allows us to input sparse right hand sides without specifying
the zeroes.
In contrast to the input for the matrix entries, the nonzero rows
{\it must} be unique.
The right hand side entries are not assembled into a dense matrix
object, but placed into the object.
\item
{\tt seed} is a random number seed used for the ordering process.
\end{itemize}
%-----------------------------------------------------------------------
\end{enumerate}