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 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747
|
\par
\section{Driver programs for the {\tt InpMtx} object}
\label{section:InpMtx:drivers}
\par
This section contains brief descriptions of the driver programs.
\par
%=======================================================================
\begin{enumerate}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testIO msglvl msgFile inFile outFile
\end{verbatim}
This driver program reads and write {\tt InpMtx} files, useful for
converting formatted files to binary files and vice versa.
One can also read in a {\tt InpMtx} file and print out just the
header information (see the {\tt InpMtx\_writeStats()} method).
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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 InpMtx}
object. It must be of the form {\tt *.inpmtxf} or {\tt *.inpmtxb}.
The {\tt InpMtx} object is read from the file via the
{\tt InpMtx\_readFromFile()} method.
\item
The {\tt outFile} parameter is the output file for the {\tt InpMtx}
object.
If {\tt outFile} is {\tt none} then the {\tt InpMtx} object is not
written to a file.
Otherwise, the {\tt InpMtx\_writeToFile()} method is called to write
the object to
a formatted file (if {\tt outFile} is of the form {\tt *.inpmtxf}),
or
a binary file (if {\tt outFile} is of the form {\tt *.inpmtxb}).
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testFullAdj msglvl msgFile nvtx nent seed
\end{verbatim}
This driver program tests the {\tt InpMtx\_fullAdjacency()} method.
If first generates a {\tt InpMtx} object filled with
random entries of a matrix $A$ and then constructs an {\tt IVL}
object that contains the full adjacency structure of $A + A^T$,
diagonal edges included.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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 nvtx} parameter is the number of rows and columns in $A$.
\item
The {\tt nent} parameter is an upper bound on the number of entries
in $A$. (Since the locations of the entries are generated via
random numbers, there may be duplicate entries.)
\item
The {\tt seed} parameter is random number seed.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testFullAdj2 msglvl msgFile nvtx nentA nentB seed
\end{verbatim}
This driver program tests the {\tt InpMtx\_fullAdjacency2()} method.
If first generates two {\tt InpMtx} object filled with
random entries --- one for a matrix $A$ and one for a matrix $B$.
It then constructs an {\tt IVL}
object that contains the full adjacency structure of $(A+B) + (A+B)^T$,
diagonal edges included.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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 nvtx} parameter is the number of rows and columns in $A$.
\item
The {\tt nentA} parameter is an upper bound on the number of entries
in $A$. (Since the locations of the entries are generated via
random numbers, there may be duplicate entries.)
\item
The {\tt nentB} parameter is an upper bound on the number of entries
in $B$. (Since the locations of the entries are generated via
random numbers, there may be duplicate entries.)
\item
The {\tt seed} parameter is random number seed.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
createGraph msglvl msgFile inFile outFile
\end{verbatim}
This driver program reads in {\tt InpMtx} object from the file
{\tt inFile} that holds a matrix $A$.
It then creates a {\tt Graph} object for $B = A + A^T$
and writes it to the file {\tt outFile}.
Recall, a {\tt Graph} object must be symmetric, so if the {\tt
InpMtx} object only holds the lower or upper triangular part
of the matrix, the other portion will be added.
Also, a {\tt Graph} object has edges of the form {\tt (v,v)},
and if these entries are missing from the {\tt InpMtx} object,
they will be added.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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 InpMtx}
object. It must be of the form {\tt *.inpmtxf} or {\tt *.inpmtxb}.
The {\tt InpMtx} object is read from the file via the
{\tt InpMtx\_readFromFile()} method.
\item
The {\tt outFile} parameter is the output file for the {\tt InpMtx}
object.
If {\tt outFile} is {\tt none} then the {\tt InpMtx} object is not
written to a file.
Otherwise, the {\tt InpMtx\_writeToFile()} method is called to write
the object to
a formatted file (if {\tt outFile} is of the form {\tt *.inpmtxf}),
or
a binary file (if {\tt outFile} is of the form {\tt *.inpmtxb}).
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
createGraphForATA msglvl msgFile inFile outFile
\end{verbatim}
This driver program reads in {\tt InpMtx} object from the file
{\tt inFile} that holds a matrix $A$.
It then creates a {\tt Graph} object for $B = A^TA$
and writes it to the file {\tt outFile}.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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 InpMtx}
object. It must be of the form {\tt *.inpmtxf} or {\tt *.inpmtxb}.
The {\tt InpMtx} object is read from the file via the
{\tt InpMtx\_readFromFile()} method.
\item
The {\tt outFile} parameter is the output file for the {\tt InpMtx}
object.
If {\tt outFile} is {\tt none} then the {\tt InpMtx} object is not
written to a file.
Otherwise, the {\tt InpMtx\_writeToFile()} method is called to write
the object to
a formatted file (if {\tt outFile} is of the form {\tt *.inpmtxf}),
or
a binary file (if {\tt outFile} is of the form {\tt *.inpmtxb}).
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
adjToGraph msglvl msgFile inAdjacencyFile outGraphFile flag
\end{verbatim}
This driver program was used to generate a {\tt type 0} {\tt Graph}
object (unit weight vertices and edges) from
a file that contained the adjacency structure of a matrix in the
following form.
\begin{verbatim}
nvtx nadj
offsets[nvtx+1]
indices[nadj]
\end{verbatim}
There are {\tt nvtx} vertices in the graph and the adjacency vector
has {\tt nadj} entries.
It was not known whether the adjacency structure contained
{\tt (v,v)} entries or if it was only the upper or lower triangle.
Our {\tt Graph} object is symmetric with loops, i.e.,
{\tt (u,v)} is present if and only if {\tt (v,u)} is present,
and {\tt (v,v)} is present.
\par
This program reads in the adjacency structure, decrements the
offsets and indices by one if specified by the flag parameter
(our application came from a Fortran code with 1-indexing),
then loads the entries into a {\tt InpMtx} object where they are
assembled and sorted by rows.
The $(v,v)$ entries are loaded, and each vector of the adjacency
structure is loaded as both a column and as a row, so in effect we
are constructing the graph of $(A+A^T)$.
Recall, multiple entries are collapsed during the sort and merge
step.
\par
A {\tt Graph} object is then created using the {\tt
Graph\_fillFromOffsets()} method using the vectors in the {\tt
InpMtx} object.
The {\tt Graph} object is then optionally written to a file.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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 inAdjacencyFile} parameter is the input file for the
adjacency structure as defined above.
It must be a formatted file.
\item
The {\tt outGraphFile} parameter is the output file for the
{\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 object 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}).
\item
The {\tt flag} parameter is used to specify whether the offsets
and indices are 0-indexed (as in C) or 1-indexed (as in Fortran).
If they are 1-indexed, the offsets and indices are decremented
prior to loading into the {\tt InpMtx} object.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
weightedAdjToGraph msglvl msgFile inAdjacencyFile outGraphFile flag
\end{verbatim}
This driver program was used to generate a {\tt type 1} {\tt Graph}
object (weighted vertices, unit weight edges) from
a file that contained the adjacency structure of a matrix in the
following form.
\begin{verbatim}
nvtx nadj
vwghts[nvtx]
offsets[nvtx+1]
indices[nadj]
\end{verbatim}
There are {\tt nvtx} vertices in the graph and the adjacency vector
has {\tt nadj} entries.
It was not known whether the adjacency structure contained
{\tt (v,v)} entries or if it was only the upper or lower triangle.
Our {\tt Graph} object is symmetric with loops, i.e.,
{\tt (u,v)} is present if and only if {\tt (v,u)} is present,
and {\tt (v,v)} is present.
\par
This program reads in the adjacency structure, decrements the
offsets and indices by one if specified by the flag parameter
(our application came from a Fortran code with 1-indexing),
then loads the entries into a {\tt InpMtx} object where they are
assembled and sorted by rows.
The $(v,v)$ entries are loaded, and each vector of the adjacency
structure is loaded as both a column and as a row, so in effect we
are constructing the graph of $(A+A^T)$.
Recall, multiple entries are collapsed during the sort and merge
step.
\par
A {\tt Graph} object is then created using the {\tt
Graph\_fillFromOffsets()} method using the vectors in the {\tt
InpMtx} object.
The {\tt Graph} object is then optionally written to a file.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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 inAdjacencyFile} parameter is the input file for the
adjacency structure as defined above.
It must be a formatted file.
\item
The {\tt outGraphFile} parameter is the output file for the
{\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 object 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}).
\item
The {\tt flag} parameter is used to specify whether the offsets
and indices are 0-indexed (as in C) or 1-indexed (as in Fortran).
If they are 1-indexed, the offsets and indices are decremented
prior to loading into the {\tt InpMtx} object.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testR2D msglvl msgFile EGraphFile CoordsFile coordType seed outInpMtxFile
\end{verbatim}
This driver program reads in an {\tt EGraph} element graph and a
{\tt Coords} grid point coordinate object for one of the {\tt R2D*}
randomly triangulated 2-D grids.
It then generates the finite element matrices for each of the
triangular elements and assembles the matrices into a {\tt InpMtx}
object, which is then optionally written out to a file.
A matrix-vector product is computed using the unassembled matrix
and the assembled matrix and compared to detect errors.
The {\tt InpMtx} object is then permuted and a matrix-vector
multiply again computed and checked for errors.
\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
message data.
\item
The {\tt EGraphFile} is the file that holds the {\tt EGraph}
object --- must be of the form {\tt *.egraphf} or {\tt *.egraphb}.
\item
The {\tt CoordsFile} is the file that holds the {\tt Coords}
object --- must be of the form {\tt *.coordsf} or {\tt *.coordsb}.
\item
The {\tt coordType} determines the coordinate type for the {\tt
InpMtx} object.
\begin{itemize}
\item {\tt 1} --- storage of entries by rows
\item {\tt 2} --- storage of entries by columns
\item {\tt 3} --- storage of entries by chevrons
\end{itemize}
\item
The {\tt seed} parameter is used as a random number seed to
determine the row and column permutations for the matrix-vector
multiply.
\item
The {\tt outInpMtxFile} parameter is the output file for the
{\tt InpMtx} object.
If {\tt outInpMtxFile} is {\tt none} then the {\tt InpMtx} object
is not written to a file.
Otherwise, the {\tt InpMtx\_writeToFile()} method is called to write
the object to
a formatted file (if {\tt outInpMtxFile}
is of the form {\tt *.inpmtxf}), or
a binary file (if {\tt outInpMtxFile} is of the form {\tt *.inpmtxb}).
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
readAIJ msglvl msgFile inputFile outInpMtxFile flag
\end{verbatim}
This driver program reads $(i,j,a_{i,j})$ triples from a file,
loads them into a {\tt InpMtx} object,
and optionally writes the object out to a file.
The input file has the form:
\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
message data.
\item
The {\tt inputFile} is the file that holds the triples.
It has the following form.
\begin{verbatim}
nrow ncol nentries
irow jcol value
...
irow jcol value
\end{verbatim}
Note, {\tt nrow} and {\tt ncol} are not used by the {\tt InpMtx}
object --- each (irow, jcol, value) triple is loaded.
\item
The {\tt outInpMtxFile} parameter is the output file for the
{\tt InpMtx} object.
If {\tt outInpMtxFile} is {\tt none} then the {\tt InpMtx} object
is not written to a file.
Otherwise, the {\tt InpMtx\_writeToFile()} method is called to write
the object to
a formatted file (if {\tt outInpMtxFile}
is of the form {\tt *.inpmtxf}), or
a binary file (if {\tt outInpMtxFile} is of the form {\tt *.inpmtxb}).
\item
The {\tt flag} parameter is used to specify whether the
indices are 0-indexed (as in C) or 1-indexed (as in Fortran).
If they are 1-indexed, the indices are decremented
prior to loading into the {\tt InpMtx} object.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
getProfile msglvl msgFile inInpMtxFile npts tausmall taubig
\end{verbatim}
This driver program produces a profile of the magnitudes
of the matrix entries in a format that is suitable for plotting
by Matlab.
The {\tt npts} parameter specifies how many points to be used
in the profile plot.
The message file will contain line of the form.
\begin{verbatim}
data = [ ...
x1 y1
...
xnpts ynpts ] ;
\end{verbatim}
which can be used to generate the following matlab plot.
An example is given below for the {\sc bcsstk23} matrix, where
{\tt npts = 200}, {\tt tausmall = 1.e-10} and
{\tt taubig = 1.e100}.
\begin{center}
\makebox{
% \psfig{file=BCSSTK23.eps,width=3.0in,height=2.40in}
\psfig{file=../../InpMtx/doc/BCSSTK23.eps,width=3.0in,height=2.40in}
}
\end{center}
The number of entries that are zero,
the number whose magnitude is less than {\tt tausmall},
and the number whose magnitude is larger than {\tt taubig}
are printed to {\tt msgFile}.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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 inInpMtxFile} parameter is the input file for
the {\tt InpMtx} object that holds the matrix.
It must be of the form {\tt *.inpmtxf} or {\tt *.inpmtxb}.
The {\tt InpMtx} object is read from the file via the
{\tt InpMtx\_readFromFile()} method.
\item
The {\tt npts} parameter determines the number of points to use in
the plot.
\item
The {\tt tausmall} parameter is a lower cutoff for putting entries
in the profile plot.
\item
The {\tt taubig} parameter is an upper cutoff for putting entries
in the profile plot.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
mkNaturalFactorMtx msglvl msgFile n1 n2 n3 seed outFile
\end{verbatim}
This driver program generates rectangular matrix that would arise
from a natural factor representation of the Laplacian operator on a
regular grid.
If {\tt n3 = 1}, we have a ${\tt n1} \times {\tt n2}$ grid.
There are {\tt (n1-1)*(n2-1)} elements and each element gives rise
to four equations, so the resulting matrix has
{\tt 4(n1-1)*(n2-1)} rows and {\tt n1*n2} columns.
If {\tt n3 > 1},
we have a ${\tt n1} \times {\tt n2} \times {\tt n3}$ grid.
There are {\tt (n1-1)*(n2-1)*(n3-1)} elements
and each element gives rise
to eight equations, so the resulting matrix has
{\tt 8(n1-1)*(n2-1)*(n3-1)} rows and {\tt n1*n2*n3} columns.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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
{\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 seed} parameter is a random number seed used to fill the
matrix entries with random numbers.
\item
The {\tt outFile} parameter is the output file for
the {\tt InpMtx} object that holds the matrix.
It must be of the form {\tt *.inpmtxf} or {\tt *.inpmtxb}.
The {\tt InpMtx} object is written to the file via the
{\tt InpMtx\_writeToFile()} method.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testMMM msglvl msgFile dataType symflag coordType transpose
nrow ncol nitem nrhs seed alphaReal alphaImag
\end{verbatim}
This driver program tests the matrix-matrix multiply methods.
This driver program generates $A$, a
${\tt nrow} \times {\tt ncol}$
matrix using {\tt nitem} input entries, $X$ and $Y$,
${\tt nrow} \times {\tt nrhs}$ matrices,
and all are filled with random numbers.
It then computes
$Y := Y + \alpha A X$,
$Y := Y + \alpha A^T X$ or
$Y := Y + \alpha A^H X$.
The program's output is a file which when sent into Matlab,
outputs the error in the computation.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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
{\tt dataType} is the type of entries,
{\tt 0} for real, {\tt 1} for complex.
\item
{\tt symflag} is the symmetry flag, {\tt 0} for symmetric,
{\tt 1} for Hermitian, {\tt 2} for nonsymmetric.
\item
{\tt coordType} is the storage mode for the entries,
{\tt 1} for by rows, {\tt 2} for by columns,
{\tt 3} for by chevrons.
\item
{\tt transpose} determines the equation,
{\tt 0} for $Y := Y + \alpha A X$,
{\tt 1} for $Y := Y + \alpha A^H X$ or
{\tt 2} for $Y := Y + \alpha A^T X$.
\item
{\tt nrowA} is the number of rows in $A$
\item
{\tt ncolA} is the number of columns in $A$
\item
{\tt nitem} is the number of matrix entries that are
assembled into the matrix.
\item
{\tt nrhs} is the number of columns in $X$ and $Y$.
\item
The {\tt seed} parameter is a random number seed used to fill the
matrix entries with random numbers.
\item
{\tt alphaReal} and {\tt alphaImag} form the scalar in the multiply.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testGMMM msglvl msgFile dataType symflag coordType transpose
nrow ncol nitem nrhs seed alphaReal alphaImag betaReal betaImag
\end{verbatim}
This driver program
tests the generalized matrix-matrix multiply methods.
It generates $A$, a
${\tt nrow} \times {\tt ncol}$
matrix using {\tt nitem} input entries, $X$ and $Y$,
${\tt nrow} \times {\tt nrhs}$ matrices,
and all are filled with random numbers.
It then computes
$Y := \beta Y + \alpha A X$,
$Y := \beta Y + \alpha A^T X$ or
$Y := \beta Y + \alpha A^H X$.
The program's output is a file which when sent into Matlab,
outputs the error in the computation.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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
{\tt dataType} is the type of entries,
{\tt 0} for real, {\tt 1} for complex.
\item
{\tt symflag} is the symmetry flag, {\tt 0} for symmetric,
{\tt 1} for Hermitian, {\tt 2} for nonsymmetric.
\item
{\tt coordType} is the storage mode for the entries,
{\tt 1} for by rows, {\tt 2} for by columns,
{\tt 3} for by chevrons.
\item
{\tt transpose} determines the equation,
{\tt 0} for $Y := \beta Y + \alpha A X$,
{\tt 1} for $Y := \beta Y + \alpha A^H X$ or
{\tt 2} for $Y := \beta Y + \alpha A^T X$.
\item
{\tt nrowA} is the number of rows in $A$
\item
{\tt ncolA} is the number of columns in $A$
\item
{\tt nitem} is the number of matrix entries that are
assembled into the matrix.
\item
{\tt nrhs} is the number of columns in $X$ and $Y$.
\item
The {\tt seed} parameter is a random number seed used to fill the
matrix entries with random numbers.
\item
{\tt alphaReal} and {\tt alphaImag}
form the $\alpha$ scalar in the multiply.
\item
{\tt betaReal} and {\tt betaImag}
form the $\beta$ scalar in the multiply.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testGMVM msglvl msgFile dataType symflag coordType transpose
nrow ncol nitem seed alphaReal alphaImag betaReal betaImag
\end{verbatim}
This driver program
tests the generalized matrix-vector multiply methods.
It generates $A$, a
${\tt nrow} \times {\tt ncol}$
matrix using {\tt nitem} input entries,
$x$ and $y$,
and fills the matrices with random numbers.
It then computes
$y := \beta y + \alpha A x$,
$y := \beta y + \alpha A^T x$ or
$y := \beta y + \alpha A^H x$.
The program's output is a file which when sent into Matlab,
outputs the error in the computation.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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
{\tt dataType} is the type of entries,
{\tt 0} for real, {\tt 1} for complex.
\item
{\tt symflag} is the symmetry flag, {\tt 0} for symmetric,
{\tt 1} for Hermitian, {\tt 2} for nonsymmetric.
\item
{\tt coordType} is the storage mode for the entries,
{\tt 1} for by rows, {\tt 2} for by columns,
{\tt 3} for by chevrons.
\item
{\tt transpose} determines the equation,
{\tt 0} for $y := \beta y + \alpha A x$,
{\tt 1} for $y := \beta y + \alpha A^T x$ or
{\tt 2} for $y := \beta y + \alpha A^H x$.
\item
{\tt nrowA} is the number of rows in $A$
\item
{\tt ncolA} is the number of columns in $A$
\item
{\tt nitem} is the number of matrix entries that are
assembled into the matrix.
\item
The {\tt seed} parameter is a random number seed used to fill the
matrix entries with random numbers.
\item
{\tt alphaReal} and {\tt alphaImag}
form the $\alpha$ scalar in the multiply.
\item
{\tt betaReal} and {\tt betaImag}
form the $\beta$ scalar in the multiply.
\end{itemize}
%-----------------------------------------------------------------------
\item
\begin{verbatim}
testHBIO msglvl msgFile inFile outFile
\end{verbatim}
This driver program read in a matrix from a Harwell-Boeing file,
and optionally writes it to a formatted or binary {\tt InpMtx} file.
\par
\begin{itemize}
\item
The {\tt msglvl} parameter determines the amount of output ---
taking {\tt msglvl >= 3} means the {\tt InpMtx} 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 Harwell-Boeing file.
\item
The {\tt outFile} parameter is the output file for the {\tt InpMtx}
object.
If {\tt outFile} is {\tt none} then the {\tt InpMtx} object is not
written to a file.
Otherwise, the {\tt InpMtx\_writeToFile()} method is called to write
the object to
a formatted file (if {\tt outFile} is of the form {\tt *.inpmtxf}),
or
a binary file (if {\tt outFile} is of the form {\tt *.inpmtxb}).
\end{itemize}
%-----------------------------------------------------------------------
\end{enumerate}
|