<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body 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>
</body>
</html>