[petsc-users] Erro in solution

2011-05-10 Thread RenZhengYong
Hi, I do not use preconditioners for the surface integral formula, because it it well-conditioned. I tested several preconditoners, the convergence rates by using precoditioners are more or less the same as the one without preconditioners. Zhengyong On Tue, May 10, 2011 at 11:48 AM, Danesh Daro

[petsc-users] Erro in solution

2011-05-10 Thread Danesh Daroui
Hi, Yes this is more or less what I am using, however in addition to surface I use volume integrals too for current distributions. Well, I know that condition number should be decreased in general to improve the convergence, but can you please let me know what preconditioner did you use? I have n

[petsc-users] Erro in solution

2011-05-10 Thread Danesh Daroui
Yes, My problem is originally dense. That's why I used LAPACK to solve the equation. After some sparsifications, when the problem becomes sparse, I use sparse solvers. As I wrote, I have successfully used direct sparse solvers using other packages and now I am moving to iterative solvers using PET

[petsc-users] Erro in solution

2011-05-10 Thread Renzhengyong
HI? I was working on solving Maxwell equations by surface integral approaches. If you are working on this, try to decrease the condition numbers of your integral operators so that it is reasonable to use GMRES solver in a limited number of iterations, which is a need for applying fast multipole

[petsc-users] Erro in solution

2011-05-09 Thread Jed Brown
On Mon, May 9, 2011 at 19:06, Danesh Daroui wrote: > Thanks for the tip, but I already have two different version of my > solver with PARDISO and MUMPS. Sparse Direct Solvers gave us a great > contribution but I need to move to O(n^2) time complexity, So I really > need to employ iterative solver

[petsc-users] Erro in solution

2011-05-09 Thread Danesh Daroui
Hi, Thanks for the tip, but I already have two different version of my solver with PARDISO and MUMPS. Sparse Direct Solvers gave us a great contribution but I need to move to O(n^2) time complexity, So I really need to employ iterative solvers! :) Regards, D. On Mon, 2011-05-09 at 19:01 +0200

[petsc-users] Erro in solution

2011-05-09 Thread Jed Brown
On Mon, May 9, 2011 at 18:50, Danesh Daroui wrote: > A direct solver? Never! :) I am escaping from time complexity of direct > solvers, otherwise I already have a LAPACK based code that works well. > Sparse direct solvers are quite different. Scalability is still not optimal, but it's not like f

[petsc-users] Erro in solution

2011-05-09 Thread Danesh Daroui
On Mon, 2011-05-09 at 11:35 -0500, Barry Smith wrote: > The code is very slow for one of two reasons > > 1) the matrix preallocation is not correct and it is spending a great deal of > time in the MatSetValues() calls. To check this run the code with -info and > grep the output for malloc. My gu

[petsc-users] Erro in solution

2011-05-09 Thread Jed Brown
On Mon, May 9, 2011 at 18:29, Danesh Daroui wrote: > No I didn't put "no-debugging" when I compiled. I will re-compile it. I > am solving a set of Maxwell equations in integral form. I know that my > coefficient matrix has a large condition number too. Would you please > explain more about "-ksp_

[petsc-users] Erro in solution

2011-05-09 Thread Danesh Daroui
Hi, No I didn't put "no-debugging" when I compiled. I will re-compile it. I am solving a set of Maxwell equations in integral form. I know that my coefficient matrix has a large condition number too. Would you please explain more about "-ksp_view" and "-log_summary"? How can I use these options?

[petsc-users] Erro in solution

2011-05-09 Thread Jed Brown
On Mon, May 9, 2011 at 18:02, Danesh Daroui wrote: > it > shouldn't be that slow! Am I right or I am missing something? > What equations are you solving? Did you build PETSc --with-debugging=0? Run with -ksp_view -log_summary and send the output. -- next part -- An HTML a

[petsc-users] Erro in solution

2011-05-09 Thread Danesh Daroui
Hi again, The issue is solved and it was due to a bug in my code. But now the problem is that PETSc is extremely slow when I try to solve even a small equation. I fill the matrix and right-hand-side and call the solver as below: ierr=KSPCreate(PETSC_COMM_WORLD, &ksp); ierr=KSPSetOperators(ksp, M

[petsc-users] Erro in solution

2011-05-09 Thread Barry Smith
The code is very slow for one of two reasons 1) the matrix preallocation is not correct and it is spending a great deal of time in the MatSetValues() calls. To check this run the code with -info and grep the output for malloc. My guess is that you are not preallocating for the diagonal and

[petsc-users] Erro in solution

2011-05-08 Thread d...@ltu.se
Hi, I checked my code and there is no zero on the diagonal. I also modified the code so if there is any zero on the diagonal it will be stored anyway. After this change the problem still exists! I am not sure if I have called PETSc functions correctly or in correct sequence. But anyway, it return

[petsc-users] Erro in solution

2011-05-06 Thread Danesh Daroui
Dear PETSc users, I have recently started to use PETSc in our code. As the first try, I assemble the matrix row by row and then put each non-zero element in each row into PETSc matrix. Then I start to solve the equation. I use PETSc on a multi-core machine, so I will not use MPI in my program. I

[petsc-users] Erro in solution

2011-05-06 Thread Barry Smith
Danesh, Some of the PETSc solvers (like the default ILU) require that you put entries on all the diagonal locations of the matrix, even if they are zero. So you should explicitly put a 0 on the diagonal locations that have 0 and the issue will go away. Barry On May 6, 2011, at 1:1