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/ 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.

<<attachment: files.zip>>


On Jul 28, 2022, at 2:49 PM, Barry Smith <[email protected]> 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 <[email protected]> wrote:

Dear PETSc users:

Can one use a MatPreallocator and then call MatPreAlloctorPreallocate if using MatStencil routines (which seem to call MatSetValuesLocal).


Thanks, Randy


Reply via email to