Sure. --Junchao Zhang
On Tue, Feb 12, 2019 at 9:47 AM Matthew Knepley <knep...@gmail.com<mailto:knep...@gmail.com>> wrote: Hi Junchao, Could you fix the MM example in PETSc to have this full support? That way we will always have it. Thanks, Matt On Tue, Feb 12, 2019 at 10:27 AM Zhang, Junchao via petsc-users <petsc-users@mcs.anl.gov<mailto:petsc-users@mcs.anl.gov>> wrote: Eda, I have a code that can read in Matrix Market and write out PETSc binary files. Usage: mpirun -n 1 ./mm2petsc -fin <infile> -fout <outfile>. You can have a try. --Junchao Zhang On Tue, Feb 12, 2019 at 1:50 AM Eda Oktay via petsc-users <petsc-users@mcs.anl.gov<mailto:petsc-users@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-ma...@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 -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/<http://www.cse.buffalo.edu/~knepley/>