[petsc-users] Error with KSPSetUp and MatNest

Manuel Colera Rico m.colera at upm.es
Wed Apr 10 10:29:37 CDT 2019


I am trying to solve a system whose matrix is of type MatNest. If I 
don't use KSPSetUp(), everything is fine. However, if I use that 
routine, I get the following error:

0]PETSC ERROR: --------------------- Error Message 
[0]PETSC ERROR: Invalid argument
[0]PETSC ERROR: Nest vector arguments 1 and 2 have different numbers of 
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html 
for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.11.0, unknown
on a mcr_20190405 named mancolric by Unknown Wed Apr 10 17:20:16 2019
[0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++ 
--with-fc=gfortran COPTFLAGS="-O3 -march=native -mtune=native" 
CXXOPTFLAGS="-O3 -march=native -mtune=native" FOPTFLAGS="-O3 
-march=native -mtune=native" --with-debugging=0 --download-fblaslapack 
--download--f2cblaslapack --download-mpich --download--hypre 
--download-scalapack --download-mumps --download-suitesparse 
--download-ptscotch --download-pastix --with-matlab --with-openmp
[0]PETSC ERROR: #1 VecCopy_Nest() line 68 in 
[0]PETSC ERROR: #2 VecCopy() line 1614 in 
[0]PETSC ERROR: #3 KSPInitialResidual() line 63 in 
[0]PETSC ERROR: #4 KSPSolve_GMRES() line 236 in 
[0]PETSC ERROR: #5 KSPSolve() line 782 in 
[0]PETSC ERROR: #6 mwe() line 55 in ../Tests/tests.c

Please find attached a MWE (it is a slight modification of that of the 
post opened by Ce Qin, 
whose answer I have not found).

By the way, with the newest version of PETSc, Eclipse marks as errors 
the commands PetscFree, CHKERRQ, PETSC_COMM_SELF,... although it 
compiles and executes well. Perhaps it is a problem related to Eclipse, 
but this did not happen with the older versions of PETSc.

Thanks and regards,



-------------- next part --------------
A non-text attachment was scrubbed...
Name: tests.c
Type: text/x-csrc
Size: 2751 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190410/94502cd5/attachment.bin>

More information about the petsc-users mailing list