The most likely cause is you are passing a non-sparse Matlab matrix  
to the writer; it is then saving it as a dense array (vector) so PETSc  
cannot read it.
Run the array through the Matlab sparse() function and make sure it is  
sparse before you pass it to the save problem.

    Also make sure you have the latest patched PETSc.

    If this does not resolve the problem then email to petsc-maint at 
mcs.anl.gov 
  the Matlab code that produces the "bad" binary file.

    Barry

On Oct 9, 2009, at 5:24 PM, Umut Tabak wrote:

> Dear developers/users,
>
> As a follow up for my previous question, if I use the matlab  
> functions that come with the distribution, namely, PetscBinaryWrite  
> m file, and try to read this matrix, I end up with
>
> [0]PETSC ERROR: Unexpected data in file!
> [0]PETSC ERROR: not matrix object in file!
>
> I am also checking further what is going wrong in the m file.  
> Someone perhaps could answer faster.
>
> BR,
> Umut
>

Reply via email to