[petsc-users] Problem in loading Matrix Market format
Jose E. Roman
jroman at dsic.upv.es
Thu Feb 28 02:38:46 CST 2019
Don't know why it should cause problems. I'd rather try before asking.
> El 28 feb 2019, a las 9:21, Eda Oktay <eda.oktay at metu.edu.tr> escribió:
>
> Dear Professor Roman,
>
> Thank you for your answer. I used PetscBinaryWrite.m file and converted matrices into binary format but I have a question:
>
> When I look at Properties of the binary files Petsc have, their type is stated as "Program (application/octet-stream)", however when I checked the binary files I created their type is stated as "Binary (application/octet-stream)". Can this cause a problem, why they are different?
>
> Eda
>
> Jose E. Roman <jroman at dsic.upv.es>, 12 Şub 2019 Sal, 12:05 tarihinde şunu yazdı:
> It is better to convert the matrices to PETSc binary format first. One easy way is to read them into Matlab with mmread.m and write with PETSc's PetscBinaryWrite.m. This can be done similarly in python.
> Jose
>
>
> > El 12 feb 2019, a las 8:50, Eda Oktay via petsc-users <petsc-users at mcs.anl.gov> escribió:
> >
> > 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 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
>
More information about the petsc-users
mailing list