[petsc-users] VecLoadIntoVector

Barry Smith bsmith at mcs.anl.gov
Sun Mar 14 15:21:41 CDT 2010


On Mar 14, 2010, at 9:48 AM, Jed Brown wrote:

> On Sat, 13 Mar 2010 21:09:29 -0600, Barry Smith <bsmith at mcs.anl.gov>  
> wrote:
>>    Part of this is because I hesitate to add any additional data to
>> the binary file for fear it will break its 15 years of portability.
>> Yes, it is ironic that I never care about PETSc source code
>> portability over time, but one can literally load today any vector or
>> matrix that was saved 15 years ago.
>
> Agreed, this type of compatibility is way more important than API
> compatibility.
>
>> We might want to think of an extensible way to add this additional
>> information.
>
> As a long-term solution, I don't think extra metadata should be placed
> into the binary files.  I think we actually desire more semantic
> information than can practically be placed in these files, because a  
> lot
> of this information is actually relational.  So I think the right  
> thing
> is to point the viewer at the file with all the relational and  
> semantic
> information, and have the XLoadIntoX set itself up according to this
> metadata and then read the binary file.  This proposal is for a
> completely new viewer implementation, although it may still use
> low-level functions from current viewers.  (We had a brief discussion
> about this on -dev recently.)

    I've actually been planning this for a few months. As soon as we  
get the release out the door I'm going to have Shri completely rip-out  
the current VecLoad, VecLoadIntoVector, MatLoad (and the non-existent  
MatLoadIntoMatrix)    and replace them with only a VecLoad() and  
MatLoad() that use as much information about the passed in Vec and  
Matrix and then "complete" the information. For example, if you want  
to load a Vec with a predetermined parallel layout, then you create a  
VECMPI, set its local sizes and then call VecLoad() (so it essentially  
behaves like VecLoadIntoVector(); if you want PETSc to determine the  
parallel layout then you do not set the local sizes before calling the  
VecLoad().

    Barry

>
> Jed



More information about the petsc-users mailing list