Dmitry,
finally, I am able to make a simple program and reproduce the error. Since I had moved to
petsc-dev (before I used petsc-3.2), the error is a little different.
Download the program attached and run the run.sh. You will see the output from PCASM.
There is a submatrix (submat[1] on rank 0) which has a row like
row 1: (0, -1) (1, 0 + 0.4 i) (4, -1) (2, -1)
Note that the column 2 is placed in the last and the column numbers are not in the normal order.
Following that, we can also see the error message like
[0]PETSC ERROR: New nonzero at (1,2) caused a malloc!
You can also try with GASM, use
mpirun -np 2 ./gasm_test -dd_type gasm -n 4 -px 1 -py 2 -sx 2 -sy 1
which partitions the domain to 1 * 2 and mapped to the two processors, and for each processor
we further partition its local domain to 2 * 1 subdomains.
Then, you will see that the row 1 of submat[1] on rank 1 becomes
row 1: (0, -1) (1, 0 + 0.4 i) (3, -1) (6, -1)
which is totally wrong because from the IS for this overlapping subdomain and the big matrix A,
row 1 should have non-zeros like the output from PCASM.
I guess the problem is due to that we set PCASMSetSortIndices to FALSE and something goes wrong
in asm.c and gasm.c.
Thanks!
Hui