[petsc-dev] Weird interaction between VecDuplicate and VecSetBlockSize

Barry Smith bsmith at mcs.anl.gov
Fri Mar 30 11:34:34 CDT 2012


On Mar 30, 2012, at 11:07 AM, Lisandro Dalcin wrote:

> On 30 March 2012 19:00, Lisandro Dalcin <dalcinl at gmail.com> wrote:
>> 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.
>>> 
> 
> Actually, reading my previous reply, I did not expressed it well. I DO
> AGREE with you that blocksizes should not be allowed to change once
> set for first time. However, I think PETSc do have some code around
> (in PC?) relying on this and unashamedly changing the bs of an INPUT
> vector! If that was fixed, then we can disable changing bs for Vec.
> But as long as we need to support this misfeature, at least let's try
> to do better around the lines of my patch (BTW, I'm not sure how to
> handle the blocked local to global mapping.... perhaps we can
> reconstruct another one?)


   Let's locate all the code that changes the block size (after it is set) and eradicate it, then we won't need this bad patch.  I think this can be done by having VecSetBlockSize() simple error out it if the map->bs != -1 and new block size not equals current block size.


   Barry

> 
> 
> -- 
> 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




More information about the petsc-dev mailing list