[petsc-users] KSPBuildResidual

2009-12-23 Thread jaru...@ascomp.ch
Dear Petsc-Team I am using KSPBuildResidual() to calculate true residual and use it as convergence criteria. It means the program will call KSPBuildResidual every iteration. I choose GMRES as a solver but I read in manual, it is written that this command is expensive for GMRES and some

[petsc-users] KSPBuildResidual

2009-12-23 Thread Barry Smith
If you want to use the true residual norm then use GMRES with right preconditioning. KSPSetPreconditionerSide() Barry On Dec 23, 2009, at 5:01 AM, jarunan at ascomp.ch wrote: Dear Petsc-Team I am using KSPBuildResidual() to calculate true residual and use it as convergence

[petsc-users] KSPBuildResidual

2009-12-23 Thread jaru...@ascomp.ch
Thanks for the suggestion. Can I change residual norm from Norm 2 to infinity norm? Regards, Jarunan Quoting Barry Smith bsmith at mcs.anl.gov: If you want to use the true residual norm then use GMRES with right preconditioning. KSPSetPreconditionerSide() Barry On Dec 23,

[petsc-users] matrix visualization problem

2009-12-23 Thread h...@umn.edu
Hi, I installed all the packages in a mac machine. When I run mpirun -np 4 ~/bin/cats3d.1 -mat_view_draw -draw_pause -1 under X11, I get some errors: -- [0]PETSC ERROR: - Error Message [0]PETSC ERROR: Argument out of range! [0]PETSC

[petsc-users] matrix visualization problem

2009-12-23 Thread Satish Balay
well if you need -mat_view_draw - then suggest editing src/mat/impls/aij/mpi/mpiaij.c and increate this cut-off size. [there is now a command-line option to over-ride this limit in petsc-dev] For binary viewer - check mat/examples/tests/ex31.c Satish On Wed, 23 Dec 2009, hxie at umn.edu wrote:

[petsc-users] matrix visualization problem

2009-12-23 Thread h...@umn.edu
Hi, Thanks. When I try to run with the option -ksp_xmonitor, no window pops up. Do I need to reinstall the petsc with the option --with-x=1? BTW, if I want to use some external packages, do I have to reinstall the petsc? Happy holiday, Hui - well if you need -mat_view_draw -

[petsc-users] matrix visualization problem

2009-12-23 Thread Satish Balay
On Wed, 23 Dec 2009, hxie at umn.edu wrote: Hi, Thanks. When I try to run with the option -ksp_xmonitor, no window pops up. Do I need to reinstall the petsc with the option --with-x=1? use -ksp_monitor_draw BTW, if I want to use some external packages, do I have to reinstall the petsc?

[petsc-users] matrix visualization problem

2009-12-23 Thread h...@umn.edu
Hi, I put the following in my code: -- PetscViewer viewer ... call PetscViewerBinaryOpen(PETSC_COMM_WORLD,matrix.dat,FILE_MODE_WRITE,viewer,pterr); call MatView(ptMat,viewer,pterr) call PetscViewerDestroy(viewer,pterr) -- Still no window

[petsc-users] matrix visualization problem

2009-12-23 Thread Satish Balay
Binary viewer is to dump the matrix into a file - not a mat_view_draw wrt -mat_view_draw - I've already indicated what to do.. satish On Wed, 23 Dec 2009, hxie at umn.edu wrote: Hi, I put the following in my code: -- PetscViewer viewer ... call