[petsc-users] result of ex2f.F in petsc-3.1-p5\src\ksp\ksp\examples\tutorials
Peter Wang
pengxwang at hotmail.com
Sun Jan 2 21:32:27 CST 2011
I added VecView() in the ex2f.F to check the three vectors (u,b, and x) in the code.
-----The vectors of u and b are same. BUt, the value of vector x is different with different processes. For example,
with only 1 process, the vector x is:
Process [0]
2.72322e-07
3.81437e-07
1.58922e-07
3.81437e-07
2.38878e-07
-6.65645e-07
1.58922e-07
-6.65645e-07
-2.51219e-07
with 2 processes, the vector is:
Process [0]
-1.11022e-16
0
2.22045e-16
2.22045e-16
0
Process [1]
2.22045e-16
2.22045e-16
0
2.22045e-16
The example is supposed to get a vector x similar to u. Why the result is different with differnt number of processes used?
----Also, if the runtime option -my_ksp_monitor is used, there is a error showing:
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
It seems there is something wrong with calling 'call KSPBuildSolution(ksp,PETSC_NULL_OBJECT,x,ierr)' in user defined function MyKSPMonitor().
Any hints for this error? Thanks a lots.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110102/ad82d770/attachment.htm>
More information about the petsc-users
mailing list