NexGenAnalytics / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
0 stars 2 forks source link

Belos: replace Belos Tpetra HarwellBoeing reader usage by Tpetra::Utils::readHBMatrix #210

Open tlamonthezie opened 1 year ago

tlamonthezie commented 1 year ago

Prerequities:

It is better if all Belos Tpetra examples an tests worked on this fork are merged first. Because we have to update multiple examples and tests in the Belos package using the Belos Tpetra HarwellBoeing reader

Detail

As mentioned in https://github.com/NexGenAnalytics/Trilinos/pull/183 comments:

  1. In all Tpetra tests and examples from Belos: remove usage of Belos::Tpetra::HarwellBoeingReader (using internally TriUtil to read matrix)
    Belos::Tpetra::HarwellBoeingReader<Tpetra::CrsMatrix<ST> > reader( comm );
    RCP<Tpetra::CrsMatrix<ST> > A = reader.readFromFile( filename );
    RCP<const Tpetra::Map<> > map = A->getRowMap();

and replace by the Tpetra version

RCP<MAT> A;
Tpetra::Utils::readHBMatrix(filename, comm, A);
RCP<const MAP> map = A->getRowMap();`

Important: Use the updated version of osrirr1.hb if needed as already provided in TFQMR example directory from https://github.com/NexGenAnalytics/Trilinos/pull/183 (old version used by epetra tests/examples fails to be read by the Tpetra readHBMatrix method)

  1. Finally remove the Belos HarwellBoeingReader class (remove file belos/tpetra/src/BelosTpetraTestFramework.hpp) and TriUtil requirements for the Tpetra tests and examples as it should not be used anymore