[petsc-dev] Weird interaction between VecDuplicate and VecSetBlockSize

Blaise Bourdin bourdin at lsu.edu
Fri Mar 30 10:20:23 CDT 2012


On Mar 30, 2012, at 10:13 AM, Jed Brown wrote:

> The PetscLayout is shared. It should probably not be allowed to change block size after duplicating.
> 
I see... I had always been under the impression that VecDuplicate was just a convenient shortcut.  The documentation for VecDuplicate does not mention that the Vecs share anything. Perhaps it should.

On a different topic, is there a way to generate the xdmf description with the hdf5 viewer?

Blaise 

> On Mar 30, 2012 9:02 AM, "Blaise Bourdin" <bourdin at lsu.edu> wrote:
> Hi,
> 
> I am trying to make use of the more advanced features of the hdf5 viewer.
> 
> I get the following error when running src/vec/vec/examples/tutorials/ex19.c:
> [0]PETSC ERROR: VecLoad_HDF5() line 251 in /opt/HPC/petsc-dev/src/vec/vec/utils/vecio.c Block size 1 specified for vector does not match blocksize in file 2
> 
> Upon further investigating, I noticed that if  Vec x2 is obtained by duplicating x1, then setting the block size for x2 also sets it for x1. Is this really the desired behavior?
> 
> I am attaching an trivial example.
> 
> Blaise
> 
> 
> 
> 
> --
> Department of Mathematics and Center for Computation & Technology
> Louisiana State University, Baton Rouge, LA 70803, USA
> Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin
> 
> 
> 
> 
> 
> 
> 
> 

-- 
Department of Mathematics and Center for Computation & Technology
Louisiana State University, Baton Rouge, LA 70803, USA
Tel. +1 (225) 578 1612, Fax  +1 (225) 578 4276 http://www.math.lsu.edu/~bourdin







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120330/18b03ada/attachment.html>


More information about the petsc-dev mailing list