[petsc-users] VecLoadIntoVector

Barry Smith bsmith at mcs.anl.gov
Fri Mar 12 12:48:19 CST 2010


    You can use  -viewer_binary_skip_info and/or - 
viewer_binary_skip_options and/or PetscViewerBinarySkipInfo() and/or   
PetscViewerBinarySetSkipOptions().

    Barry

On Mar 12, 2010, at 11:49 AM, Dave May wrote:

> Hello,
>  When I use VecLoadIntoVector(), I noticed that the contents of the
> *.info file is inserted into the options list.
> In practice, I only ever see the variable -vecload_block_size added to
> the .info file if the vector has a block size which is not one.
>
> If I use VecLoadIntoVector() to load two vectors when one has a block
> size set (and thus -vecload_block_size appears in the info file)
> and the other doesn't (-vecload_block_size is not present in the info
> file), an error will occur during VecLoad_Binary().
>
> I got around this problem by calling
> 	ierr = PetscOptionsClearValue("-vecload_block_size"); CHKERRQ(ierr);
> after my call to VecLoadIntoVector(), but I'm not super happy with
> this as I am potentially clobbering a command line option.
>
> Is there a cleaner way to deal with this problem?
>
> Maybe .info should always contain -vecload_block_size (even it is 1)
> so that different vectors with different block sizes can be loaded.
>
> Cheers,
>  Dave



More information about the petsc-users mailing list