[petsc-users] VecLoadIntoVector

Dave May dave.mayhem23 at gmail.com
Fri Mar 12 11:49:55 CST 2010


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