<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 15, 2015 at 9:05 PM, Adrian Croucher <span dir="ltr"><<a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">hi<br>
<br>
I have a test code (attached) that sets up a finite volume mesh using DMPlex, with 2 degrees of freedom per cell.<br>
<br>
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.<br>
<br>
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:<br></blockquote><div><br></div><div>Plex should automatically discover the block size from the Section. If not, it uses block size 1. I have to look</div><div>at the example to see why the discovery is not working. Do you have any constraints?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br>
[0]PETSC ERROR: Petsc has generated inconsistent data<br>
[0]PETSC ERROR: Blocksize of layout 2 must match that of mapping 1<br>
[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br>
[0]PETSC ERROR: Petsc Development GIT revision: v3.6.1-811-gaf4f2ea GIT Date: 2015-08-18 17:44:25 -0500<br>
[0]PETSC ERROR: ./testmat on a linux-gnu-c-opt named des108 by acro018 Wed Sep 16 13:51:27 2015<br>
[0]PETSC ERROR: Configure options --download-netcdf --download-exodusii --with-hdf5-dir=/usr --download-triangle --download-ptscotch -<br>
-download-chaco<br>
[0]PETSC ERROR: #1 PetscLayoutSetISLocalToGlobalMapping() line 248 in /home/acro018/software/PETSc/code/src/vec/is/utils/pmap.c<br>
[0]PETSC ERROR: #2 MatSetLocalToGlobalMapping() line 1876 in /home/acro018/software/PETSc/code/src/mat/interface/matrix.c<br>
[0]PETSC ERROR: #3 DMCreateMatrix_Plex() line 853 in /home/acro018/software/PETSc/code/src/dm/impls/plex/plex.c<br>
[0]PETSC ERROR: #4 DMCreateMatrix() line 961 in /home/acro018/software/PETSc/code/src/dm/interface/dm.c<br>
--------------------------------------------------------------------------<br>
<br>
It only works in serial if I use MATAIJ.<br>
<br>
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.)<span class="HOEnZb"><font color="#888888"><br>
<br>
- Adrian<br>
<br>
-- <br>
Dr Adrian Croucher<br>
Senior Research Fellow<br>
Department of Engineering Science<br>
University of Auckland, New Zealand<br>
email: <a href="mailto:a.croucher@auckland.ac.nz" target="_blank">a.croucher@auckland.ac.nz</a><br>
tel: +64 (0)9 923 84611<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>