Re: [petsc-dev] Weird interaction between VecDuplicate and VecSetBlockSize
On Mar 30, 2012, at 12:44 PM, Lisandro Dalcin wrote:
On 30 March 2012 19:34, Barry Smith <[email protected]> wrote:
On Mar 30, 2012, at 11:07 AM, Lisandro Dalcin wrote:
On 30 March 2012 19:00, Lisandro Dalcin <[email protected]> wrote:
On 30 March 2012 18:20, Blaise Bourdin <[email protected]> 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 I complained about this long, long ago:
$ grep VecSetBlockSize -nR src/ksp/pc/ src/ksp/pc/impls/fieldsplit/fieldsplit.c:637: ierr = VecSetBlockSize(x,jac->bs);CHKERRQ(ierr); src/ksp/pc/impls/fieldsplit/fieldsplit.c:638: ierr = VecSetBlockSize(y,jac->bs);CHKERRQ(ierr); src/ksp/pc/impls/fieldsplit/fieldsplit.c:710: ierr = VecSetBlockSize(x,jac->bs);CHKERRQ(ierr); src/ksp/pc/impls/fieldsplit/fieldsplit.c:711: ierr = VecSetBlockSize(y,jac->bs);CHKERRQ(ierr);
committed changeset 22837:cc05aac4b5fb Why does hg still print that meaningless number? Removed setting of vector block sizes in PCFIELDSPLIT, if specific block sizes are needed and do not match the PC will \ error out with appropriate message 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
participants (1)
-
Barry Smith