<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Many thanks for your replies! I have three follow-up questions. I use the AIJ format for the matrix, BCGS for KSP and ILU for PC. The matrix changes with time.<br><br>Now I put PC and KSP definition in initialization. In each timestep, I redefine the matrix and rhs vector, use the KSPSetOperators and KSPSolve. When I run the program, I get the following error info, which seems to occur right before KSPSetOperators <br> [0]PETSC ERROR: --------------------- Error Message ------------------------------------<br>[0]PETSC ERROR: Arguments are incompatible!<br>[0]PETSC ERROR: Incompatible vector global lengths!<br>[0]PETSC ERROR: ------------------------------------------------------------------------<br>[0]PETSC ERROR: Petsc Release Version 3.0.0, Patch 5, Mon Apr 13 09:15:37 CDT 2009<br>[0]PETSC ERROR: See docs/changes/index.html for recent updates.<br>[0]PETSC ERROR: See docs/faq.html for hints about trouble shooting.<br>[0]PETSC ERROR: See docs/index.html for manual pages.<br>[0]PETSC ERROR: ------------------------------------------------------------------------<br>[0]PETSC ERROR: ../src_o_petsc/min3pp on a linux-gnu named pardiff by jinbei Fri Sep 11 08:49:22 2009<br>[0]PETSC ERROR: Libraries linked from /home/jinbei/Soft/petsc-3.0.0-p5/linux-gnu-c-debug/lib<br>[0]PETSC ERROR: Configure run at Thu Aug 20 11:36:14 2009<br>[0]PETSC ERROR: Configure options --with-cc=gcc --with-fc=ifort --download-f-blas-lapack=1 --download-mpich=1 --with-shared=0<br>[0]PETSC ERROR: ------------------------------------------------------------------------<br>[0]PETSC ERROR: VecCopy() line 1685 in src/vec/vec/interface/vector.c<br>[0]PETSC ERROR: KSPInitialResidual() line 60 in src/ksp/ksp/interface/itres.c<br>[0]PETSC ERROR: KSPSolve_BCGS() line 44 in src/ksp/ksp/impls/bcgs/bcgs.c<br>[0]PETSC ERROR: KSPSolve() line 385 in src/ksp/ksp/interface/itfunc.c<br><br><br>What might cause the problem? <br><br>Another question is, the BCGS+ILU combination is kind of slow. Would you please give me some suggestions on how to optimize the solver performance? I've tried setting PC level to 1 and reducing maximum iterations, but doesn't really work well.<br><br>The last question is, if I want to use the true residual norm (based on original A*x=y) and the norm of solution updates as the criteria of convergence, what functions would do? Any example in the package I can refer to?<br><br>Many thanks again and have a nice day!<br><br><br /><hr />与任何您希望的人分享您的回忆。 <a href='http://www.microsoft.com/china/windows/windowslive/products/photos-share.aspx?tab=1' target='_new'>任何您希望的人。</a></body>
</html>