[petsc-dev] A few remaining issues with Mat block sizes

Lisandro Dalcin dalcinl at gmail.com
Tue Apr 10 12:43:39 CDT 2012


On 10 April 2012 17:58, Barry Smith <bsmith at mcs.anl.gov> wrote:
>
>   Lisandro,
>
>    Thanks, I have incorporated these and a few other blocksize fixes.
>

Many thanks, Barry! However, I still think you are missing this one (I
found the issue after running petsc4py testsuite). Pasted below and
also attached. Please review and push.


diff -r 2d1c2b03ef3a src/mat/impls/aij/seq/aij.c
--- a/src/mat/impls/aij/seq/aij.c	Tue Apr 10 09:57:31 2012 -0500
+++ b/src/mat/impls/aij/seq/aij.c	Tue Apr 10 20:36:48 2012 +0300
@@ -3477,9 +3477,12 @@
   PetscErrorCode ierr;

   PetscFunctionBegin;
+  if (Ii[0]) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,
"Ii[0] must be 0 it is %D", Ii[0]);
+
+  ierr = PetscLayoutSetUp(B->rmap);CHKERRQ(ierr);
+  ierr = PetscLayoutSetUp(B->cmap);CHKERRQ(ierr);
+
   ierr = MatGetSize(B, &m, &n);CHKERRQ(ierr);
-
-  if (Ii[0]) SETERRQ1(PETSC_COMM_SELF,PETSC_ERR_ARG_OUTOFRANGE,
"Ii[0] must be 0 it is %D", Ii[0]);
   ierr = PetscMalloc((m+1) * sizeof(PetscInt), &nnz);CHKERRQ(ierr);
   for(i = 0; i < m; i++) {
     nz     = Ii[i+1]- Ii[i];


-- 
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: matblocksize-seqaij-csr.diff
Type: application/octet-stream
Size: 734 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120410/dc32eaaa/attachment.obj>


More information about the petsc-dev mailing list