<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 10, 2012, at 9:06 AM, Jed Brown wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Can you set a different prefix for each vector? (I'm surprised that more people don't run into this problem of incompatibility, but don't know an easy generic way to fix the problem.)<div><br></div><div><div>$ cat <a href="http://vector.dat.info/">vector.dat.info</a> </div>
<div>-vecload_block_size 1</div><div>-vecload_block_size 3</div></div></blockquote><div><br></div>Very good point. That fixes the problem. and for existing files, I can always delete the .info file. I need to switch to the built-in binary vtk viewer anyway...</div><div>Blaise</div><div><br></div><div><br></div><div><br><blockquote type="cite"><div><br><div class="gmail_quote">On Sun, Jun 10, 2012 at 8:37 AM, Blaise Bourdin <span dir="ltr"><<a href="mailto:bourdin@lsu.edu" target="_blank">bourdin@lsu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I think I found another bug related to Vec blocksize...<br>
<br>
It looks like loading vectors with different block sizes from a binary fine is broken in petsc-3.3:<br>
try the attached example:<br>
<br>
iMac:Misc blaise$ ./TestVecLoad-dev -ndofU 1 -ndofV 3  -nx 2 -ny 2 -mode 0<br>
Vector Object:UVec 1 MPI processes<br>
  type: mpi<br>
Process [0]<br>
0<br>
10<br>
1<br>
11<br>
Vector Object:VVec 1 MPI processes<br>
  type: mpi<br>
Process [0]<br>
0<br>
-100<br>
-200<br>
-10<br>
-110<br>
-210<br>
-1<br>
-101<br>
-201<br>
-11<br>
-111<br>
-211<br>
Writing vectors to file<br>
iMac:Misc blaise$ ./TestVecLoad-dev -ndofU 1 -ndofV 3  -nx 2 -ny 2 -mode 1<br>
Reading vectors from file<br>
Processor [0] M 2 N 2 m 1 n 1 w 1 s 1<br>
X range of indices: 0 2, Y range of indices: 0 2<br>
Processor [0] M 2 N 2 m 1 n 1 w 3 s 1<br>
X range of indices: 0 2, Y range of indices: 0 2<br>
[0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>
[0]PETSC ERROR: Arguments are incompatible!<br>
[0]PETSC ERROR: Local size 4 not compatible with block size 3!<br>
[0]PETSC ERROR: ------------------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 0, unknown<br>
[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>
[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>
[0]PETSC ERROR: See docs/index.html for manual pages.<br>
[0]PETSC ERROR: ------------------------------------------------------------------------<br>
[0]PETSC ERROR: ./TestVecLoad-dev on a Darwin-gc named iMac.local by blaise Sun Jun 10 08:35:07 2012<br>
[0]PETSC ERROR: Libraries linked from /opt/HPC/petsc-3.3/Darwin-gcc4.2-g/lib<br>
[0]PETSC ERROR: Configure run at Fri Jun  8 22:01:00 2012<br>
[0]PETSC ERROR: Configure options CFLAGS=-Wno-unused --download-hdf5=1 --download-metis=1 --download-parmetis=1 --download-sowing=1 --download-triangle=1 --with-cmake=cmake --with-debugging=1 --with-gnu-compilers=1 --with-mpi-dir=/opt/HPC/mpich2-1.4.1p1-gcc4.2 --with-pic --with-shared-libraries=1 --with-x11=1<br>

[0]PETSC ERROR: ------------------------------------------------------------------------<br>
[0]PETSC ERROR: PetscLayoutSetBlockSize() line 459 in /opt/HPC/petsc-3.3/src/vec/vec/impls/mpi/pmap.c<br>
[0]PETSC ERROR: VecSetBlockSize() line 1526 in /opt/HPC/petsc-3.3/src/vec/vec/interface/vector.c<br>
[0]PETSC ERROR: VecLoad_Binary() line 104 in /opt/HPC/petsc-3.3/src/vec/vec/utils/vecio.c<br>
[0]PETSC ERROR: VecLoad_Default() line 348 in /opt/HPC/petsc-3.3/src/vec/vec/utils/vecio.c<br>
[0]PETSC ERROR: VecLoad() line 1111 in /opt/HPC/petsc-3.3/src/vec/vec/interface/vector.c<br>
[0]PETSC ERROR: main() line 86 in TestVecLoad-dev.c<br>
application called MPI_Abort(MPI_COMM_WORLD, 75) - process 0<br>
[unset]: aborting job:<br>
application called MPI_Abort(MPI_COMM_WORLD, 75) - process 0<br>
<br>
but if one destroys the <a href="http://vector.dat.info/" target="_blank">vector.dat.info</a> file, everything seems fine:<br>
<br>
iMac:Misc blaise$ ./TestVecLoad-dev -ndofU 1 -ndofV 3  -nx 2 -ny 2 -mode 0<br>
Vector Object:UVec 1 MPI processes<br>
  type: mpi<br>
Process [0]<br>
0<br>
10<br>
1<br>
11<br>
Vector Object:VVec 1 MPI processes<br>
  type: mpi<br>
Process [0]<br>
0<br>
-100<br>
-200<br>
-10<br>
-110<br>
-210<br>
-1<br>
-101<br>
-201<br>
-11<br>
-111<br>
-211<br>
Writing vectors to file<br>
iMac:Misc blaise$ rm <a href="http://vector.dat.info/" target="_blank">vector.dat.info</a><br>
iMac:Misc blaise$ ./TestVecLoad-dev -ndofU 1 -ndofV 3  -nx 2 -ny 2 -mode 1<br>
Reading vectors from file<br>
Processor [0] M 2 N 2 m 1 n 1 w 1 s 1<br>
X range of indices: 0 2, Y range of indices: 0 2<br>
Processor [0] M 2 N 2 m 1 n 1 w 3 s 1<br>
X range of indices: 0 2, Y range of indices: 0 2<br>
Vector Object:UVec 1 MPI processes<br>
  type: seq<br>
0<br>
10<br>
1<br>
11<br>
Vector Object:VVec 1 MPI processes<br>
  type: seq<br>
0<br>
-100<br>
-200<br>
-10<br>
-110<br>
-210<br>
-1<br>
-101<br>
-201<br>
-11<br>
-111<br>
-211<br>
<span class="HOEnZb"><font color="#888888"><br>
Blaise<br>
<br>
</font></span><br><br>
--<br>
Department of Mathematics and Center for Computation & Technology<br>
Louisiana State University, Baton Rouge, LA 70803, USA<br>
Tel. <a href="tel:%2B1%20%28225%29%20578%201612" value="+12255781612">+1 (225) 578 1612</a>, Fax  <a href="tel:%2B1%20%28225%29%20578%204276" value="+12255784276">+1 (225) 578 4276</a> <a href="http://www.math.lsu.edu/~bourdin" target="_blank">http://www.math.lsu.edu/~bourdin</a><br>

<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br></blockquote></div><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></body></html>