[petsc-users] MatPrealloctor

Randall Mackie rlmackie862 at gmail.com
Fri Jul 29 15:04:00 CDT 2022


Hi Barry,

It seems like this should be trivial to get working but so far I’ve been unsuccessful.
Most likely I’m doing something wrong but I have no idea what that is.

I’ve attached a little test program that fails with the errors:

[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Petsc has generated inconsistent data
[0]PETSC ERROR: Blocksize of layout 1 must match that of mapping 3 (or the latter must be 1)
[0]PETSC ERROR: See https://petsc.org/release/faq/ <https://petsc.org/release/faq/> for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.17.3, Jun 29, 2022
[0]PETSC ERROR: ./test on a linux-gfortran-complex-debug named rmackie-VirtualBox by rmackie Fri Jul 29 12:16:13 2022
[0]PETSC ERROR: Configure options --with-clean=1 --with-scalar-type=complex --with-debugging=1 --with-fortran=1 --download-mpich=../external/mpich-4.0.1.tar.gz
[0]PETSC ERROR: #1 PetscLayoutSetISLocalToGlobalMapping() at /home/rmackie/PETSc/petsc-3.17.3/src/vec/is/utils/pmap.c:363
[0]PETSC ERROR: #2 MatSetLocalToGlobalMapping() at /home/rmackie/PETSc/petsc-3.17.3/src/mat/interface/matrix.c:2012


Any help to point me in the right direction is appreciated.

Randy M.



> On Jul 28, 2022, at 2:49 PM, Barry Smith <bsmith at petsc.dev> wrote:
> 
> 
>   I am not sure what you are asking exactly but I think so, so long have you have called MatSetLocalToGlobalMapping() and the "stencil" idea makes sense for your discretization.
> 
>  Barry
> 
> 
>> On Jul 28, 2022, at 5:41 PM, Randall Mackie <rlmackie862 at gmail.com> wrote:
>> 
>> Dear PETSc users:
>> 
>> Can one use a MatPreallocator and then call MatPreAlloctorPreallocate if using MatStencil routines (which seem to call MatSetValuesLocal).
>> 
>> 
>> Thanks, Randy
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220729/ef1b211f/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: files.zip
Type: application/zip
Size: 2190 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220729/ef1b211f/attachment-0001.zip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20220729/ef1b211f/attachment-0003.html>


More information about the petsc-users mailing list