trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.18k stars 559 forks source link

Tpetra: Harwell-Boeing read fails to read some files #12337

Open tlamonthezie opened 9 months ago

tlamonthezie commented 9 months ago

Bug Report

The function readHBMatrix from core/inout/Tpetra_MatrixIO throws error when reading some files present the Trilinos repository _Note: there seems that no unit test exist for TpetraMatrixIO.

Description

When reading the following files the reader throws an exception:

The exception is:

/home/user/repositories/Trilinos-NGA/packages/tpetra/core/inout/Tpetra_MatrixIO.cpp:204:

 Throw number = 1

 Throw test that evaluated to true: Tpetra::Utils::parseIfmt(Ptrfmt,ptrsPerLine,ptrWidth) == true

 Tpetra::Utils::readHBMatDouble(): error parsing. Invalid/unsupported file format.

Steps to Reproduce

  1. Build Trilinos with Belos
  2. We will use an example using the reader sogo to Belos Tpetra examples build directory.
  3. Run the Belos RCG example (or another using filename parameter) using the command [YOUR_BUILD_DIR]/packages/belos/tpetra/example/RCG/Belos_RCG_Tpetra_Ex_File.exe --filename=[YOUR_TRILINOS_SOURCE_DIR]/packages/belos/epetra/example/BlockGmres/orsirr1.hb
cgcgcg commented 9 months ago

@trilinos/tpetra

jhux2 commented 9 months ago

The Tpetra MatrixMarket reader is more up-to-date and much better tested. Would it be feasible for Belos to use the MM format instead of HB?

jhux2 commented 9 months ago

@trilinos/belos

hkthorn commented 9 months ago

@jhux2 The HB format is a common format for examples/tests to be provided by users to our solvers, so that reader should be fixed.