[petsc-users] VecView() and binary output

Alexander Grayver agrayver at gfz-potsdam.de
Thu Jan 19 03:23:09 CST 2012


There is a header in the beginning of the file. The info in the header 
defines which object type is stored and its dimensions.
The size of the header can vary depending on the stored object 
(Vec,Mat,etc) and type you use for indices (int32,int64).

For Vec object and int32 you have one integer defining the code of the 
Vec object and another vector size. That sums up to 8 extra bytes.

On 19.01.2012 09:20, Mohamad M. Nasr-Azadani wrote:
> Hi guys,
>
> I use VecView() in conjunction with
>
>
>   PetscViewerBinaryOpen()
>
>
>   to write the binary data associated with a 3D data obtained from DA
>   structured arrays.
>
>
>   I noticed that on my machine, the size of the file is 8 bytes bigger
>   than the size of the data.
>
>
>   Could someone tell me where that extra 8 byte is stored and how it
>   is going help?
>
>
>
>   best
>
>
>   Mohamad
>
> *
> *


-- 
Regards,
Alexander

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120119/8907db0d/attachment.htm>


More information about the petsc-users mailing list