[petsc-users] VecLoadIntoVector

Barry Smith bsmith at mcs.anl.gov
Sat Mar 13 21:09:29 CST 2010


On Mar 13, 2010, at 8:31 AM, Jed Brown wrote:

> On Fri, 12 Mar 2010 12:48:19 -0600, Barry Smith <bsmith at mcs.anl.gov>  
> wrote:
>>
>>    You can use  -viewer_binary_skip_info and/or -
>> viewer_binary_skip_options and/or PetscViewerBinarySkipInfo() and/or
>> PetscViewerBinarySetSkipOptions().
>
> This just lets one circumvent *.info, but the application would be
> obliged to learn about block sizes through some other channel.  The
> problem here is that PetscOptionsInsertFile dumps those options
> (unprefixed) into the global namespace, and that is (unless I'm
> mistaken) the only way for the block size to be delivered to the  
> vector.
> I think this is actually difficult to resolve in a completely
> satisfactory way, but perhaps I'm missing something.

    You are not missing something. You are right there is no  
"completely satisfactory way" currently.

    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. (And sadly we do, some of our test  
matrices are that old :-). We might want to think of an extensible way  
to add this additional information.

    Barry

>
> Jed



More information about the petsc-users mailing list