[petsc-dev] MetSetBlockSize issue

Mark F. Adams mark.adams at columbia.edu
Tue Apr 24 13:39:16 CDT 2012


Now I'm getting this error with code like this:

      ierr = MatGetSubMatrix( Cmat, new_eq_indices, new_eq_indices, MAT_INITIAL_MATRIX, &mat );
      CHKERRQ(ierr);
      ierr = MatSetBlockSize( mat, cbs );      CHKERRQ(ierr);

and like this:

  ierr = MatPtAP( Amat_fine, Pold, MAT_INITIAL_MATRIX, 2.0, &Cmat ); CHKERRQ(ierr);
  ierr = MatSetBlockSize( Cmat, cbs );      CHKERRQ(ierr);

Mark

On Apr 23, 2012, at 9:09 PM, Barry Smith wrote:

> 
>  Yes, look, for example how ex32 is handled at the bottom of the makefile.
> 
>  Thanks
> 
>   Barry
> 
> On Apr 23, 2012, at 5:50 PM, Mark F. Adams wrote:
> 
>> 
>> On Apr 23, 2012, at 5:59 PM, Barry Smith wrote:
>> 
>>> 
>>> It was changed a while ago that MatSetBlockSize() couldn't be set after the matrix was full instantiated. I guess that example did not get fixed because it is not listed in the makefile to run in the makeall.
>> 
>> May I add it?
>> 
>>> 
>>> I have fixed the example to call MatSetBlockSize() at a safe point.
>>> 
>>> Barry
>>> 
>>> On Apr 23, 2012, at 4:29 PM, Mark F. Adams wrote:
>>> 
>>>> ex55.c in ksp is failing with:
>>>> 
>>>> [0]PETSC ERROR: --------------------- Error Message ------------------------------------
>>>> [0]PETSC ERROR: Arguments are incompatible!
>>>> [0]PETSC ERROR: Cannot change block size 1 to 2!
>>>> [0]PETSC ERROR: ------------------------------------------------------------------------
>>>> 
>>>> on this line 57 of ex55.c:
>>>> 
>>>> ierr = MatSetBlockSize(Amat,2);      CHKERRQ(ierr);
>>>> 
>>>> Any idea what happened here?  
>>>> 
>>>> Mark
>>> 
>>> 
>> 
> 
> 




More information about the petsc-dev mailing list