[petsc-users] MatGetLocalSubMatrix Trouble
Jared Crean
jcrean01 at gmail.com
Mon Feb 15 22:31:04 CST 2016
Hello,
When I try to use MatGetLocalSubMatrix (line 55 of the attached
code), I get the following error:
[0]PETSC ERROR: --------------------- Error Message
--------------------------------------------------------------
[0]PETSC ERROR: Null argument, when expecting valid pointer
[0]PETSC ERROR: Null Object: Parameter # 2
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.6.0, Jun, 09, 2015
[0]PETSC ERROR: ./jc3 on a arch-linux2-cxx-debug named k475 by jared Mon
Feb 15 23:19:29 2016
[0]PETSC ERROR: Configure options --with-clanguage=C++
[0]PETSC ERROR: #1 ISL2GCompose() line 117 in
/home/jared/build/petsc-3.6.0/src/mat/impls/localref/mlocalref.c
[0]PETSC ERROR: #2 MatCreateLocalRef() line 259 in
/home/jared/build/petsc-3.6.0/src/mat/impls/localref/mlocalref.c
[0]PETSC ERROR: #3 MatGetLocalSubMatrix() line 9686 in
/home/jared/build/petsc-3.6.0/src/mat/interface/matrix.c
[0]PETSC ERROR: --------------------- Error Message
--------------------------------------------------------------
[0]PETSC ERROR: Null argument, when expecting valid pointer
[0]PETSC ERROR: Null Object: Parameter # 2
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.6.0, Jun, 09, 2015
[0]PETSC ERROR: ./jc3 on a arch-linux2-cxx-debug named k475 by jared Mon
Feb 15 23:19:29 2016
[0]PETSC ERROR: Configure options --with-clanguage=C++
[0]PETSC ERROR: #4 ISL2GCompose() line 117 in
/home/jared/build/petsc-3.6.0/src/mat/impls/localref/mlocalref.c
[0]PETSC ERROR: #5 MatCreateLocalRef() line 259 in
/home/jared/build/petsc-3.6.0/src/mat/impls/localref/mlocalref.c
[0]PETSC ERROR: #6 MatGetLocalSubMatrix() line 9686 in
/home/jared/build/petsc-3.6.0/src/mat/interface/matrix.c
[0]PETSC ERROR: #7 main() line 55 in
/home/jared/build/petsc-3.6.0/src/ksp/ksp/examples/tutorials/jc3.c
[0]PETSC ERROR: No PETSc Option Table entries
[0]PETSC ERROR: ----------------End of Error Message -------send entire
error message to petsc-maint at mcs.anl.gov----------
application called MPI_Abort(MPI_COMM_WORLD, 85) - process 0
A did a little digging and found:
Line 117-118 of mlocalref.c are:
PetscValidHeaderSpecific(ltog,IS_LTOGM_CLASSID,2);
PetscValidPointer(cltog,3);
where ltog is the ISLocalToGlobalMapping from (line 259):
A->rmap->mapping
where A is the original matrix, cltog is a reference to the local
to global mapping to be created .
The code prints out A, so it appears to be a valid matrix. Is
there something wrong with the way I am using MatGetLocalSubMatrix?
Jared Crean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jc3.c
Type: text/x-csrc
Size: 1705 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160215/96b9ac4c/attachment.c>
More information about the petsc-users
mailing list