[petsc-dev] Weird interaction between VecDuplicate and VecSetBlockSize

Lisandro Dalcin dalcinl at gmail.com
Fri Mar 30 11:00:16 CDT 2012


On 30 March 2012 18:20, Blaise Bourdin <bourdin at lsu.edu> wrote:
>
> 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.
>

I do not agree with Jed. I think we have to apply the attached patch.
The layout should be shared if it is possible, if it is not, create a
new one. BTW, my patch includes a fix for PetscLayoutCopy not
INCREFing the local to global mappings.

PS: This patch is against petsc-3.2, if possible, please apply any bit
of it to branch release-3.2 and merge in dev.


-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vecsetbs-layout.diff
Type: application/octet-stream
Size: 1668 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120330/5a739968/attachment.obj>


More information about the petsc-dev mailing list