<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>&nbsp;&nbsp;Chun,<div><br></div><div>&nbsp;&nbsp; &nbsp; I assume you mean dense matrices written with&nbsp;PETSC_VIEWER_NATIVE option to the viewer?</div><div><br></div><div>&nbsp;&nbsp; &nbsp; Please find attached a version of PetscBinaryRead.m that handles this. Please let me know if it doesn't work for you?</div><div><br></div><div>&nbsp;&nbsp; &nbsp;Notes: the default viewing of dense matrices converts to sparse so that PetscBinaryRead() does actually work. &nbsp;The reading of native dense format doesn't matter if the matrix is rectangular or square it just was not supported (but is with my new code). Please let me know if I misunderstood your problem.</div><div><br></div><div>&nbsp;&nbsp; &nbsp;Barry</div><div><br></div><div><br><div><div>On Apr 19, 2010, at 1:44 PM, SUN Chun wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div lang="EN-US" link="blue" vlink="purple"><div class="Section1"><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Hi PETSc dev,<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">It seems that bin/matlab/PetscBinaryRead.m does not read rectangular dense matrix binary output. I had success in sparse matrix though.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Could you confirm this? Or I'm doing something wrong? Do you provide any other external binary reader than this set?<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; "><o:p>&nbsp;</o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Thanks a lot,<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; ">Chun<o:p></o:p></span></div></div><div style="font-size: 9pt; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 35.4pt; color: rgb(31, 73, 125); font-style: italic; font-family: Arial, Helvetica, sans-serif; ">This email and any attachments are intended solely for the use of the individual or entity to whom it is addressed and may be confidential and/or privileged.</div><div style="font-size: 9pt; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 35.4pt; color: rgb(31, 73, 125); font-style: italic; font-family: Arial, Helvetica, sans-serif; ">If you are not one of the named recipients or have received this email in error,</div><div style="font-size: 9pt; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 35.4pt; color: rgb(31, 73, 125); font-style: italic; font-family: Arial, Helvetica, sans-serif; ">(i) you should not read, disclose, or copy it,</div><div style="font-size: 9pt; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 35.4pt; color: rgb(31, 73, 125); font-style: italic; font-family: Arial, Helvetica, sans-serif; ">(ii) please notify sender of your receipt by reply email and delete this email and all attachments,</div><div style="font-size: 9pt; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 35.4pt; color: rgb(31, 73, 125); font-style: italic; font-family: Arial, Helvetica, sans-serif; ">(iii) Dassault Systemes does not accept or assume any liability or responsibility for any use of or reliance on this email.</div><p style="font-style: italic; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 35.4pt; font-family: Arial, Helvetica, sans-serif; color: rgb(31, 73, 125); font-size: 9pt; "></p><div style="font-size: 9pt; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 35.4pt; color: rgb(31, 73, 125); font-style: italic; font-family: Arial, Helvetica, sans-serif; ">For other languages,<span class="Apple-converted-space">&nbsp;</span><a href="http://www.3ds.com/terms/email-disclaimer" style="color: blue; text-decoration: underline; ">Click Here</a></div></div></span></blockquote></div></div></body></html>