[petsc-users] block size

Jed Brown jedbrown at mcs.anl.gov
Wed Jul 18 09:13:27 CDT 2012


The usual workaround is to give the vectors different prefixes.

On Wed, Jul 18, 2012 at 9:10 AM, Hong Zhang <hzhang at mcs.anl.gov> 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> 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/4bbf9b6b/attachment.html>


More information about the petsc-users mailing list