[petsc-users] block matrix in serial
Adrian Croucher
a.croucher at auckland.ac.nz
Tue Sep 15 21:05:08 CDT 2015
hi
I have a test code (attached) that sets up a finite volume mesh using
DMPlex, with 2 degrees of freedom per cell.
I then create a matrix using DMCreateMatrix(), having used
DMSetMatType() to set the matrix type to MATBAIJ or MATMPIBAIJ, to take
advantage of the block structure.
This works OK and gives me the expected matrix structure when I run on >
1 processor, but neither MATBAIJ or MATMPIBAIJ works if I run it in serial:
[0]PETSC ERROR: --------------------- Error Message
--------------------------------------------------------------
[0]PETSC ERROR: Petsc has generated inconsistent data
[0]PETSC ERROR: Blocksize of layout 2 must match that of mapping 1
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
for trouble shooting.
[0]PETSC ERROR: Petsc Development GIT revision: v3.6.1-811-gaf4f2ea GIT
Date: 2015-08-18 17:44:25 -0500
[0]PETSC ERROR: ./testmat on a linux-gnu-c-opt named des108 by acro018
Wed Sep 16 13:51:27 2015
[0]PETSC ERROR: Configure options --download-netcdf --download-exodusii
--with-hdf5-dir=/usr --download-triangle --download-ptscotch -
-download-chaco
[0]PETSC ERROR: #1 PetscLayoutSetISLocalToGlobalMapping() line 248 in
/home/acro018/software/PETSc/code/src/vec/is/utils/pmap.c
[0]PETSC ERROR: #2 MatSetLocalToGlobalMapping() line 1876 in
/home/acro018/software/PETSc/code/src/mat/interface/matrix.c
[0]PETSC ERROR: #3 DMCreateMatrix_Plex() line 853 in
/home/acro018/software/PETSc/code/src/dm/impls/plex/plex.c
[0]PETSC ERROR: #4 DMCreateMatrix() line 961 in
/home/acro018/software/PETSc/code/src/dm/interface/dm.c
--------------------------------------------------------------------------
It only works in serial if I use MATAIJ.
Is there a reason why the block matrix types don't appear to work in
serial, at least in this case? (I'm running the PETSc 'next' branch.)
- Adrian
--
Dr Adrian Croucher
Senior Research Fellow
Department of Engineering Science
University of Auckland, New Zealand
email: a.croucher at auckland.ac.nz
tel: +64 (0)9 923 84611
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testmat.F90
Type: text/x-fortran
Size: 1352 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150916/4230723d/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: col10.exo
Type: application/octet-stream
Size: 3516 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150916/4230723d/attachment.obj>
More information about the petsc-users
mailing list