<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">search for an older thread on this list<div><br></div><div>possible fixes are to either delete / not create the .info files or to assign different prefix to each vec</div><div><br></div><div>B<br><div><div>On Jul 18, 2012, at 12:39 PM, Anton Popov wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">
<div>"Comment out one of vectors, your code works fine."<br>
I wouldn't say "fine" because I need to store both vectors.<br>
</div>
<br>
So what is the workaround?<br>
<br>
- I'm not allowed to mix vectors with different block size in the
same file?<br>
- I'm not allowed to write more then ONE vector in a file?<br>
<br>
<br>
On 7/18/12 4:10 PM, Hong Zhang wrote:<br>
</div>
<blockquote cite="mid:CAGCphBt-jmb+QpL=gbJ2FqmMrKNRqFh1TY0BQAyTLpbwRwDAiw@mail.gmail.com" type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
You use same datafile 'vec.dat' for writing two different vectors,
<div>V3 and V1:</div>
<div><br>
</div>
<div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>ierr
= VecView(V1, view_out); </div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>ierr
= VecView(V3, view_out); </div>
<div><br>
</div>
<div>// here, vec.dat holds V3</div>
<div><br>
</div>
<div>Then read it in the order</div>
<div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>ierr
= VecLoad(V1, view_in);<span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div>//crash here because reading V3 into V1</div>
<div>
<br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>ierr
= VecLoad(V3, view_in);<span class="Apple-tab-span" style="white-space:pre"> </span></div>
</div>
<div><br>
</div>
<div>Comment out one of vectors, your code works fine.</div>
<div><br>
</div>
<div>Hong</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<br>
<div class="gmail_quote">On Wed, Jul 18, 2012 at 7:54 AM, Anton
Popov <span dir="ltr"><<a moz-do-not-send="true" href="mailto:popov@uni-mainz.de" target="_blank">popov@uni-mainz.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Dear petsc team,<br>
<br>
could you please tell me what's wrong with the attached
example file?<br>
I run it on 4 processors with petsc-3.3-p1.<br>
<br>
What could error message "Local size 1000 not compatible
with block size 3!" mean?<br>
<br>
I've another question related to this issue. What is the
real purpose of PetscViewerBinarySkipInfo function?<br>
I see no reason to skip creating "info" file, because the
file produced by the attached example seems to be correct.<br>
<br>
Moreover, similar block size error occurs in our code
while reading file with multiple vectors, irrespective
whether "info" file exists or not.<br>
<br>
Thank you,<br>
<br>
Anton<br>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<br>
</div>
</blockquote></div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; 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; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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 style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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 style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">-- </div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Department of Mathematics and Center for Computation & Technology</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Louisiana State University, Baton Rouge, LA 70803, USA</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Tel. +1 (225) 578 1612, Fax +1 (225) 578 4276 <a href="http://www.math.lsu.edu/~bourdin">http://www.math.lsu.edu/~bourdin</a></div><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></div></span></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>