[petsc-users] KSP with Nested Matrix and Vector

Ce Qin qince168 at gmail.com
Sat Feb 7 08:06:54 CST 2015


Dear all,

I'm trying to use the KSP solver with nested matrix and vector. If I do not
call KSPSetup it goes just fine. When I call the KSPSetUp I am getting the
following error

[0]PETSC ERROR: Invalid argument
[0]PETSC ERROR: Nest vector arguments 1 and 2 have different numbers of
blocks.
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for
trouble shooting.
[0]PETSC ERROR: Petsc Development GIT revision: unknown  GIT Date: unknown
[0]PETSC ERROR: ./test on a linux-gnu-cxx-real-opt named eden by adam Sat
Feb  7 21:48:02 2015
[0]PETSC ERROR: Configure options PETSC_DIR=/home/adam/libs/petsc
PETSC_ARCH=linux-gnu-cxx-real-opt --with-x=0 --with-mpi=1 --with-debu
gging=0 --with-clanguage=cxx --with-c-support=0 --with-scalar-type=real
--download-sowing=linux/packages/sowing-1.1.16g.tar.gz
--download-c2html=linux/packages/c2html.tar.gz
--with-blas-lapack-lib="-L/home/adam/libs/lapack/lib -lopenblas"
--download-scalapack=linux/packages/scalapack-2.0.2.tgz
--download-metis=linux/packages/metis-5.0.2-p3.tar.gz
--download-ptscotch=linux/packages/scotch_6.0.0_esmumps.tar.gz
--download-parmetis=linux/packages/parmetis-4.0.2-p5.tar.gz
--download-mumps=linux/packages/MUMPS_4.10.0-p3.tar.gz
--download-pastix=linux/packages/pastix_5.2.2.20.tar.bz2
--download-superlu_dist=linux/packages/superlu_dist_3.3.tar.gz
--download-hypre=linux/packages/hypre-2.10.0b.tar.gz

            [0]PETSC ERROR: #1 VecCopy_Nest() line 76 in
/home/adam/libs/petsc/src/vec/vec/impls/nest/vecnest.c
[0]PETSC ERROR: #2 VecCopy() line 1675 in
/home/adam/libs/petsc/src/vec/vec/interface/vector.c
[0]PETSC ERROR: #3 KSPInitialResidual() line 59 in
/home/adam/libs/petsc/src/ksp/ksp/interface/itres.c
[0]PETSC ERROR: #4 KSPSolve_GMRES() line 234 in
/home/adam/libs/petsc/src/ksp/ksp/impls/gmres/gmres.c
[0]PETSC ERROR: #5 KSPSolve() line 547 in
/home/adam/libs/petsc/src/ksp/ksp/interface/itfunc.c
[0]PETSC ERROR: #6 main() line 36 in /home/adam/develop/test/src/test.cc
[0]PETSC ERROR: PETSc Option Table entries:
[0]PETSC ERROR: -ksp_monitor
[0]PETSC ERROR: -ksp_view
[0]PETSC ERROR: ----------------End of Error Message -------send entire
error message to petsc-maint at mcs.anl.gov----------

I have attached a simple example to show this problem.

Best regards,
Ce Qin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150207/d716b1c2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cc
Type: text/x-c++src
Size: 1440 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150207/d716b1c2/attachment.cc>


More information about the petsc-users mailing list