Jed, <br><br>Thanks.<br>One more thing, the function doesn&#39;t close file properly. I guess one should use fclose for that.<br><br>Regards,<br>Alexander<br><br><div id="htc_header" style="">----- Reply message -----<br>From: &quot;Jed Brown&quot; &lt;jedbrown@mcs.anl.gov&gt;<br>To: &quot;PETSc users list&quot; &lt;petsc-users@mcs.anl.gov&gt;<br>Subject: [petsc-users] PetscBinaryRead in matlab<br>Date: Thu, Apr 19, 2012 17:12<br><br></div><br><div class="gmail_quote">On Thu, Apr 19, 2012 at 06:41, Alexander Grayver <span dir="ltr">&lt;<a href="mailto:agrayver@gfz-potsdam.de">agrayver@gfz-potsdam.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You&#39;re right, it is undefined. Your variant works.</blockquote></div><br><div><a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/71a0e13876ec">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/71a0e13876ec</a></div>