File: quickstart.tex

package info (click to toggle)
spooles 2.2-16
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,760 kB
  • sloc: ansic: 146,836; sh: 7,571; csh: 3,615; makefile: 1,970; perl: 74
file content (146 lines) | stat: -rw-r--r-- 5,870 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
\par
\chapter{A Quick Start}
\label{chapter:quickstart}
\par
The {\bf SPOOLES} software package is large and complex ---
there are seven objects, roughly 32000 lines of source code 
and another 4000 lines of driver programs.
Furthermore, it is built on the {\bf SMOOTH} software package 
for ordering sparse matrices which contains twenty objects,
55000 lines of source code and another 12000 lines
of driver programs.
We like to think of the software in these two packages
as boxes of Legos (plastic
building blocks for children) --- by pulling out the right objects
and fitting them together we can easily build code with complex
functionality.
\par
Each object has its directory, a {\tt src} subdirectory that
contains source code, a {\tt doc} subdirectory that holds \LaTeX\ 
files for documentation, and possibly a {\tt drivers} subdirectory
that contains driver programs for this object.
\par
There are twenty objects in the {\bf SMOOTH} library.
\begin{center}
\begin{tabular}{|l|l|} \hline
{\tt BKL } & block Kernighan-Lin algorithm \\
{\tt BPG } & bipartite graph object \\
{\tt Coords } & coordinates object \\
{\tt CV } & {\tt char} vector object \\
{\tt DInpMtx } & input matrix object \\
{\tt Drand } & random number generator \\
{\tt DSTree } & domain/separator tree object \\
{\tt DV } & {\tt double} vector object \\
{\tt EGraph } & element graph object \\
{\tt ETree } & elimination and front tree object \\
{\tt GPart } & graph partitioning object \\
{\tt Graph } & graph object \\
{\tt IIheap } & heap object \\
{\tt IV } & {\tt int} vector object \\
{\tt IVL } & {\tt int} vector list object \\
{\tt Ideq } & {\tt int} dequeue object \\
{\tt MSMD } & multi-stage minimum degree object \\
{\tt Network } & max flow/ min-cut network object \\
{\tt Perm } & permutation object \\
{\tt Tree } & tree object \\ \hline
\end{tabular}
\end{center}
Nine of these are used in the {\bf SPOOLES} library:
the
{\tt CV},
{\tt DInpMtx},
{\tt Drand},
{\tt DV},
{\tt ETree},
{\tt IV},
{\tt IVL},
{\tt Ideq} and
{\tt Tree} objects.
The {\tt DInpMtx} and {\tt ETree} objects are the most important.
The {\tt DInpMtx} object is used to assemble, store and make
available to the factorization object the entries in the original
matrix.
The {\tt ETree} object stores the {\it front tree}, which is
basically the blueprint or DNA that defines the data structures 
and the computations for the factorization and solves.
The {\tt ETree} object is the end product of a matrix ordering
that can be obtained from the {\bf SMOOTH} library.\footnote{
One can also use a permutation vector obtained from some outside
source. There are {\tt ETree} methods that will generate an {\tt
ETree} object from a permutation vector and a graph.
One is not restricted to the ordering methods in the {\bf SMOOTH}
library.
}
\par
There are seven objects in the {\bf SPOOLES} library.
\begin{center}
\begin{tabular}{|l|l|} \hline
{\tt CA2 } & character two-dimensional array object \\
{\tt DA2 } & double precision two-dimensional array object \\
{\tt DChv } & double precision chevron object \\
{\tt DChvL } & {\tt DChv} list object \\
{\tt DFrontMtx } & front matrix object, factors and solves \\
{\tt DVL } & double precision vector list object \\
{\tt PivotFinder } & object that finds pivot elements \\ 
\hline
\end{tabular}
\end{center}
\par
The {\it user} need know about very few of these objects --- 
\begin{itemize}
\item
{\tt DInpMtx} to assemble a sparse matrix, permute the matrix
elements, and map the elements into the factorization,
\item
{\tt ETree} to hold a front tree 
that drives the factorization and solves,
\item
{\tt PivotFinder} that finds pivots for the factorization, and
\item
{\tt DFrontMtx} that computes and stores a factorization and
solves linear systems.
\end{itemize}
We refer the reader to the {\bf SMOOTH} documentation for
information on the {\tt DInpMtx} and {\tt ETree} objects.
\par
The {\tt PivotFinder} is a simple object that looks for suitable
pivots in a front.
If the user does not want pivoting enabled, (for example, if the
matrix is diagonally dominant or one just wants to live
dangerously), just set the {\tt PivotFinder} input parameter to
{\tt NULL} in the calling sequence for the factorization method.
The {\tt PivotFinder} object has several options and a user defined 
tolerance to give a range of behaviors.
Furthermore, the {\tt DFrontMtx} factor matrix object knows nothing
about pivot selection, so the {\tt PivotFinder} object can be
extended or even replaced without touching any of the {\tt
DFrontMtx} code.\footnote{
Were we working in a language that supported inheritance and/or
protocols, (e.g., C++ or Objective-C), replacing the PivotFinder
object would be a simple process.
Since we work in C, we find it easiest to duplicate the 
{\tt PivotFinder} directory, change the functionality,
and then link the new object into the {\tt DFrontMtx} code.
}
\par
The {\tt DFrontMtx} object is the workhorse of the library.
It handles symmetric or nonsymmetric factorizations,
exact or approximate (the latter is not yet implemented though
the hooks are in place), pivoting or no pivoting.
Furthermore, there are three modes in which it operates:
serial mode, multi-threaded, and MPI.
The present release of the library uses the Solaris thread package 
to implement the multithreaded factor and solves.
However, since we only use thread create and join operations
along with mutex's (mutual exclusion locks), the port to a POSIX
thread package, or just about any other thread package, will
be straightforward.
The MPI version of the factor and solves is still in the
development stages.
\par
To get started with solving a linear system, 
read the {\tt DFrontMtx} documentation in
Section~\ref{section:DFrontMtx} and
see the {\tt testFactor.c}
and {\tt testPFactor.c} driver programs in the
{\tt spooles/DFrontmtx/drivers} directory.