[petsc-users] Problem in loading Matrix Market format

Zhang, Junchao jczhang at mcs.anl.gov
Thu Feb 28 09:18:30 CST 2019


Eda,
  An update to ex72 is merged to PETSc master branch just now. It now can read matrices either symmetric or non-symmetric in Matrix Market format, and output a petsc binary matrix in MATSBAIJ format (for symmetric) or MATAIJ format (for non-symmetric). See help in source code for usage.
--Junchao Zhang


On Tue, Feb 12, 2019 at 1:50 AM Eda Oktay via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:
Hello,

I am trying to load matrix in Matrix Market format. I found an example on mat file  (ex78) whih can be tested by using .dat file. Since .dat file and .mtx file are similar  in structure (specially afiro_A.dat file is similar to amesos2_test_mat0.mtx since they both have 3 columns and the columns represent the same properties), I tried to run ex78 by using amesos2_test_mat0.mtx instead of afiro_A.dat. However, I got the error "Badly formatted input file". Here is the full error message:

[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Badly formatted input file

[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.10.3, Dec, 18, 2018
[0]PETSC ERROR: ./ex78 on a arch-linux2-c-debug named 7330.wls.metu.edu.tr<http://7330.wls.metu.edu.tr> by edaoktay Tue Feb 12 10:47:58 2019
[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --with-cxx-dialect=C++11 --download-openblas --download-metis --download-parmetis --download-superlu_dist --download-slepc --download-mpich
[0]PETSC ERROR: #1 main() line 73 in /home/edaoktay/petsc-3.10.3/src/mat/examples/tests/ex78.c
[0]PETSC ERROR: PETSc Option Table entries:
[0]PETSC ERROR: -Ain /home/edaoktay/petsc-3.10.3/share/petsc/datafiles/matrices/amesos2_test_mat0.mtx
[0]PETSC ERROR: ----------------End of Error Message -------send entire error message to petsc-maint at mcs.anl.gov----------
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=1
:
system msg for write_line failure : Bad file descriptor

I know there is also an example (ex72) for Matrix Market format but in description, it is only proper for symmmetric and lower triangle, so I decided to use ex78.

Best regards,

Eda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190228/52213f27/attachment.html>


More information about the petsc-users mailing list