[petsc-users] Add a matrix to MatNest twice

Thomas Witkowski thomas.witkowski at tu-dresden.de
Tue Feb 21 07:43:36 CST 2012


Am 21.02.2012 13:52, schrieb Jed Brown:
> On Tue, Feb 21, 2012 at 01:25, Thomas Witkowski 
> <thomas.witkowski at tu-dresden.de 
> <mailto:thomas.witkowski at tu-dresden.de>> wrote:
>
>     Is it possible to have the same matrix of type MatMPIAIJ twice in
>     a MatNest?
>
>
> That should be fine, let us know if something doesn't work.
Seems not to work correctly. I made some small changes in 
src/ksp/ksp/examples/tests/ex22.c:

21c21
<   np = 2;
---
 >   np = 3;
62c62
<   tmp[0][0] = A11;
---
 >   tmp[0][0] = A12;

When running with 2 threads, it ends with a segmentation violation. The 
stack is as follows:

[0]PETSC ERROR: [0] MatStashScatterEnd_Private line 109 
src/mat/utils/matstash.c
[0]PETSC ERROR: [0] MatAssemblyEnd_MPIAIJ line 641 
src/mat/impls/aij/mpi/mpiaij.c
[0]PETSC ERROR: [0] MatAssemblyEnd line 4934 src/mat/interface/matrix.c
[0]PETSC ERROR: [0] MatAssemblyEnd_Nest line 228 
src/mat/impls/nest/matnest.c
[0]PETSC ERROR: [0] MatAssemblyEnd line 4934 src/mat/interface/matrix.c
[0]PETSC ERROR: [0] test_solve line 17 src/ksp/ksp/examples/tests/ex22.c

Can you also reproduce this problem?

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120221/f4628770/attachment.htm>


More information about the petsc-users mailing list