[petsc-users] access to matnest block (0,1) ?
Jed Brown
jedbrown at mcs.anl.gov
Wed Feb 1 08:39:42 CST 2012
How did you create the MatNest? Did you use the same index sets?
On Wed, Feb 1, 2012 at 01:42, Klaij, Christiaan <C.Klaij at marin.nl> wrote:
> >> Then what would be the best way to create the IS in this case?
> >> Can it somehow be deduced from the separate blocks?
> >>
> >
> >The ISs define the row space of the blocks inside the global matrix.
>
> Following ex28 I made two stride ISs to define the row space
> but I'm still having trouble, this is for 2 procs:
>
> Matrix object:
> type=nest, rows=2, cols=2
> MatNest structure:
> (0,0) : prefix="a00_", type=mpiaij, rows=24, cols=24
> (0,1) : prefix="a01_", type=mpiaij, rows=24, cols=12
> (1,0) : prefix="a10_", type=mpiaij, rows=12, cols=24
> (1,1) : prefix="a11_", type=mpiaij, rows=12, cols=12
>
> [0] Index set is permutation
> [0] Number of indices in (stride) set 12
> [0] 0 0
> [0] 1 1
> [0] 2 2
> [0] 3 3
> [0] 4 4
> [0] 5 5
> [0] 6 6
> [0] 7 7
> [0] 8 8
> [0] 9 9
> [0] 10 10
> [0] 11 11
> [1] Number of indices in (stride) set 12
> [1] 0 12
> [1] 1 13
> [1] 2 14
> [1] 3 15
> [1] 4 16
> [1] 5 17
> [1] 6 18
> [1] 7 19
> [1] 8 20
> [1] 9 21
> [1] 10 22
> [1] 11 23
>
This really can't be right. Modify ex28 to have it print out the index
sets. If distributed evenly over two procs, we might expect the first index
set to hold [0..11; 18..29] and the second to hold [12..17; 30..35]. The
way you are addressing would force a non-contiguous row partition.
> [0] Number of indices in (stride) set 6
> [0] 0 24
> [0] 1 25
> [0] 2 26
> [0] 3 27
> [0] 4 28
> [0] 5 29
> [1] Number of indices in (stride) set 6
> [1] 0 30
> [1] 1 31
> [1] 2 32
> [1] 3 33
> [1] 4 34
> [1] 5 35
>
> [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> [0]PETSC ERROR: Arguments are incompatible!
> [0]PETSC ERROR: Could not find index set!
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: Petsc Release Version 3.2.0, Patch 5, Sat Oct 29 13:45:54
> CDT 2011
> [0]PETSC ERROR: See docs/changes/index.html for recent updates.
> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.
> [0]PETSC ERROR: See docs/index.html for manual pages.
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: ./matnest-trycpp on a linux_64b named lin0133 by cklaij
> Wed Feb 1 08:33:40 2012
> [0]PETSC ERROR: Libraries linked from
> /opt/refresco/64bit_intelv11.1_openmpi/petsc-3.2-p5/lib
> [0]PETSC ERROR: Configure run at Thu Jan 26 13:44:12 2012
> [0]PETSC ERROR: Configure options
> --prefix=/opt/refresco/64bit_intelv11.1_openmpi/petsc-3.2-p5
> --with-mpi-dir=/opt/refresco/64bit_intelv11.1_openmpi/openmpi-1.4.4
> --with-x=1 --with-mpe=0 --with-debugging=1 --with-clanguage=c++
> --with-hypre-include=/opt/refresco/64bit_intelv11.1_openmpi/hypre-2.7.0b/include
> --with-hypre-lib=/opt/refresco/64bit_intelv11.1_openmpi/hypre-2.7.0b/lib/libHYPRE.a
> --with-ml-include=/opt/refresco/64bit_intelv11.1_openmpi/ml-6.2/include
> --with-ml-lib=/opt/refresco/64bit_intelv11.1_openmpi/ml-6.2/lib/libml.a
> --with-blas-lapack-dir=/opt/intel/mkl
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
> [0]PETSC ERROR: MatNestFindIS() line 292 in
> /home/CKlaij/ReFRESCO/Libraries/build/petsc-3.2-p5/src/mat/impls/nest/matnest.c
> [0]PETSC ERROR: MatNestFindSubMat() line 350 in
> /home/CKlaij/ReFRESCO/Libraries/build/petsc-3.2-p5/src/mat/impls/nest/matnest.c
> [0]PETSC ERROR: MatGetSubMatrix_Nest() line 366 in
> /home/CKlaij/ReFRESCO/Libraries/build/petsc-3.2-p5/src/mat/impls/nest/matnest.c
> [0]PETSC ERROR: MatGetSubMatrix() line 7135 in
> /home/CKlaij/ReFRESCO/Libraries/build/petsc-3.2-p5/src/mat/interface/matrix.c
> [0]PETSC ERROR: PCSetUp_FieldSplit() line 377 in
> /home/CKlaij/ReFRESCO/Libraries/build/petsc-3.2-p5/src/ksp/pc/impls/fieldsplit/fieldsplit.c
> [0]PETSC ERROR: PCSetUp() line 819 in
> /home/CKlaij/ReFRESCO/Libraries/build/petsc-3.2-p5/src/ksp/pc/interface/precon.c
> [0]PETSC ERROR: KSPSetUp() line 260 in
> /home/CKlaij/ReFRESCO/Libraries/build/petsc-3.2-p5/src/ksp/ksp/interface/itfunc.c
> [0]PETSC ERROR: KSPSolve() line 379 in
> /home/CKlaij/ReFRESCO/Libraries/build/petsc-3.2-p5/src/ksp/ksp/interface/itfunc.c
>
>
> dr. ir. Christiaan Klaij
> CFD Researcher
> Research & Development
> E mailto:C.Klaij at marin.nl
> T +31 317 49 33 44
>
> MARIN
> 2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands
> T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120201/f31a26e6/attachment.htm>
More information about the petsc-users
mailing list