[petsc-users] block size

Anton Popov popov at uni-mainz.de
Wed Jul 18 12:39:44 CDT 2012


"Comment out one of vectors, your code works fine."
I wouldn't say "fine" because I need to store both vectors.

  So what is the workaround?

- I'm not allowed to mix vectors with different block size in the same file?
- I'm not allowed to write more then ONE vector in a file?


On 7/18/12 4:10 PM, Hong Zhang wrote:
> You use same datafile 'vec.dat' for writing two different vectors,
> V3 and V1:
>
> ierr = VecView(V1, view_out);
> ierr = VecView(V3, view_out);
>
> // here, vec.dat holds V3
>
> Then read it in the order
> ierr = VecLoad(V1, view_in);
> //crash here because reading V3 into V1
>
> ierr = VecLoad(V3, view_in);
>
> Comment out one of vectors, your code works fine.
>
> Hong
>
>
>
>
> On Wed, Jul 18, 2012 at 7:54 AM, Anton Popov <popov at uni-mainz.de 
> <mailto:popov at uni-mainz.de>> wrote:
>
>     Dear petsc team,
>
>     could you please tell me what's wrong with the attached example file?
>     I run it on 4 processors with petsc-3.3-p1.
>
>     What could error message "Local size 1000 not compatible with
>     block size 3!" mean?
>
>     I've another question related to this issue. What is the real
>     purpose of PetscViewerBinarySkipInfo function?
>     I see no reason to skip creating "info" file, because the file
>     produced by the attached example seems to be correct.
>
>     Moreover, similar block size error occurs in our code while
>     reading file with multiple vectors, irrespective whether "info"
>     file exists or not.
>
>     Thank you,
>
>     Anton
>
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120718/5a9af5df/attachment.html>


More information about the petsc-users mailing list