|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Tool for debugging the syntax of a Matrix Market file containing a sparse matrix. More...
#include <Teuchos_MatrixMarket_Raw_Checker.hpp>
Public Member Functions | |
| Checker (const bool echo, const bool tolerant, const bool debug) | |
| Constructor that takes Boolean parameters. | |
| Checker () | |
| Constructor that sets default Boolean parameters. | |
| Checker (const RCP< ParameterList > ¶ms) | |
| Constructor that takes a ParameterList of parameters. | |
| void | setParameters (const RCP< ParameterList > ¶ms) |
| Set parameters from the given ParameterList. | |
| RCP< const ParameterList > | getValidParameters () const |
| bool | readFile (const Teuchos::Comm< int > &comm, const std::string &filename) |
| Read the sparse matrix from the given file. | |
| bool | read (const Teuchos::Comm< int > &comm, const RCP< std::istream > &in) |
| Read the sparse matrix from the given input stream. | |
Private Member Functions | |
| RCP< const Teuchos::MatrixMarket::Banner > | readBanner (std::istream &in, size_t &lineNumber) |
| Read in the Banner line from the given input stream. | |
| std::pair< bool, std::string > | readOnRank0 (std::istream &in) |
| Read the sparse matrix on MPI Rank 0. | |
| void | reportBadness (std::ostream &out, const std::pair< bool, std::vector< size_t > > &results) |
| To be called only on MPI Rank 0. | |
Private Attributes | |
| bool | echo_ |
| Whether to echo the sparse matrix to stdout after reading it. | |
| bool | tolerant_ |
| Whether to parse the Matrix Market file tolerantly. | |
| bool | debug_ |
| Whether to print debugging output to stderr. | |
Tool for debugging the syntax of a Matrix Market file containing a sparse matrix.
| Scalar | The type of entries of the sparse matrix. |
| Ordinal | The type of indices of the sparse matrix. |
This class is useful for checking the integrity of a Matrix Market sparse matrix file and printing its contents. For reading a sparse matrix from a Matrix Market file into raw compressed sparse row (CSR) arrays on a single (MPI) process, use the Reader class. For reading in a Tpetra::CrsMatrix, use the Tpetra::MatrixMarket::Reader class.
Definition at line 68 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
| Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::Checker | ( | const bool | echo, |
| const bool | tolerant, | ||
| const bool | debug | ||
| ) | [inline] |
Constructor that takes Boolean parameters.
| echo | [in] Whether to echo the sparse matrix to stdout on MPI Process 0, after reading the sparse matrix. |
| tolerant | [in] Whether to parse the Matrix Market files tolerantly. |
| debug | [in] Whether to print debugging output to stderr. This will happen on all MPI processes, so it could be a lot of output. |
Definition at line 79 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
| Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::Checker | ( | ) | [inline] |
Constructor that sets default Boolean parameters.
Definition at line 84 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
| Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::Checker | ( | const RCP< ParameterList > & | params | ) | [inline] |
Constructor that takes a ParameterList of parameters.
Parameters (all of them have type bool, all default to false):
Definition at line 98 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
| void Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::setParameters | ( | const RCP< ParameterList > & | params | ) | [inline] |
Set parameters from the given ParameterList.
See constructor documentation for the accepted parameters.
Definition at line 108 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
| RCP<const ParameterList> Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::getValidParameters | ( | ) | const [inline] |
Definition at line 128 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
| bool Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::readFile | ( | const Teuchos::Comm< int > & | comm, |
| const std::string & | filename | ||
| ) | [inline] |
Read the sparse matrix from the given file.
This is a collective operation. Only MPI Process 0 opens the file and reads data from it, but all ranks participate and wait for the final result.
Definition at line 158 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
| bool Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::read | ( | const Teuchos::Comm< int > & | comm, |
| const RCP< std::istream > & | in | ||
| ) | [inline] |
Read the sparse matrix from the given input stream.
This is a collective operation. Only MPI Process 0 reads from the given input stream, but all MPI processes participate and wait for the final result.
Definition at line 208 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
| RCP<const Teuchos::MatrixMarket::Banner> Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::readBanner | ( | std::istream & | in, |
| size_t & | lineNumber | ||
| ) | [inline, private] |
Read in the Banner line from the given input stream.
| in | [in/out] Input stream from which to read the Banner line. This must be valid on the calling process. |
| lineNumber | [in/out] On input: Current line number of the input stream. On output: if any line(s) were successfully read from the input stream, this is incremented by the number of line(s) read. (This includes comment lines.) |
Definition at line 302 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
| std::pair<bool, std::string> Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::readOnRank0 | ( | std::istream & | in | ) | [inline, private] |
Read the sparse matrix on MPI Rank 0.
| in | [in/out] The input stream from which to read. This must be valid on the calling process. |
Definition at line 365 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
| void Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::reportBadness | ( | std::ostream & | out, |
| const std::pair< bool, std::vector< size_t > > & | results | ||
| ) | [inline, private] |
To be called only on MPI Rank 0.
Definition at line 509 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
bool Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::echo_ [private] |
Whether to echo the sparse matrix to stdout after reading it.
Definition at line 281 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
bool Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::tolerant_ [private] |
Whether to parse the Matrix Market file tolerantly.
Definition at line 283 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
bool Teuchos::MatrixMarket::Raw::Checker< Scalar, Ordinal >::debug_ [private] |
Whether to print debugging output to stderr.
Definition at line 285 of file Teuchos_MatrixMarket_Raw_Checker.hpp.
1.7.6.1