Re: [deal.II] PETSc iteration does not converge
OK, I see. I will do it, thank you! I will let you know if I get any result. On Mon, Aug 17, 2020 at 7:06 PM Wolfgang Bangerth wrote: > On 8/17/20 6:01 PM, yuesu jin wrote: > > I did nothing to verify those properties. because the single thread > CG > > solver converged well. I used different preconditioners in parallel > version > > and single thread version. In the parallel version I used block Jacobi > and in > > the single thread version I used Jacobi. How can I check if the parallel > > blocked sparse matrix is/ isn't symmetrical and positive definite? > > Think of tests such as this: > * run on 1 processor, multiply a vector w of all 1s from the right, and > output > the resulting vector v=Aw on all processors > * run on >1 processors and repeat > Are the vectors the same for both cases? The matrix should be the same > regardless of partitioning, but is it? > > * repeat the same with Tvmult (multiplication from the left) > > You can probably come up with many similar tests that check properties of > the > matrix, comparing between the single-processor and multiple-processor > cases. > The point is that you may not know the exact answer, but you know that the > two > cases should result in the same output. > > Best > W. > > -- > > Wolfgang Bangerth email: bange...@colostate.edu > www: http://www.math.colostate.edu/~bangerth/ > > -- > The deal.II project is located at http://www.dealii.org/ > For mailing list/forum options, see > https://groups.google.com/d/forum/dealii?hl=en > --- > You received this message because you are subscribed to the Google Groups > "deal.II User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to dealii+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dealii/1c573208-1579-e2c9-672d-f6463630eead%40colostate.edu > . > -- Yuesu Jin, Ph.D student, University of Houston, College of Natural Sciences and Mathematics, Department of Earth and Atmospheric Sciences, Houston, Texas 77204-5008 346-404-2062 -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CA%2B25a%3D%2B2a%3D_bGh620BWu2__SViuzefkQYNxGMz_q4UX8JA4iDw%40mail.gmail.com.
Re: [deal.II] PETSc iteration does not converge
On 8/17/20 6:01 PM, yuesu jin wrote: I did nothing to verify those properties. because the single thread CG solver converged well. I used different preconditioners in parallel version and single thread version. In the parallel version I used block Jacobi and in the single thread version I used Jacobi. How can I check if the parallel blocked sparse matrix is/ isn't symmetrical and positive definite? Think of tests such as this: * run on 1 processor, multiply a vector w of all 1s from the right, and output the resulting vector v=Aw on all processors * run on >1 processors and repeat Are the vectors the same for both cases? The matrix should be the same regardless of partitioning, but is it? * repeat the same with Tvmult (multiplication from the left) You can probably come up with many similar tests that check properties of the matrix, comparing between the single-processor and multiple-processor cases. The point is that you may not know the exact answer, but you know that the two cases should result in the same output. Best W. -- Wolfgang Bangerth email: bange...@colostate.edu www: http://www.math.colostate.edu/~bangerth/ -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/1c573208-1579-e2c9-672d-f6463630eead%40colostate.edu.
Re: [deal.II] PETSc iteration does not converge
Dear Dr.Bangerth, I did nothing to verify those properties. because the single thread CG solver converged well. I used different preconditioners in parallel version and single thread version. In the parallel version I used block Jacobi and in the single thread version I used Jacobi. How can I check if the parallel blocked sparse matrix is/ isn't symmetrical and positive definite? Best regards, Yuesu -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CA%2B25a%3D%2BhNaz2y6p-KGhEf26qi1g7jpS_%3D1J_vjtJDTrrw-GBVA%40mail.gmail.com.
Re: [deal.II] PETSc iteration does not converge
I tried both, first I tried 1e-4*system_rhs.l2_norm(), it failed. Then either the matrix is not symmetric/positive definite/whatever other property your iterative solver requires, or your preconditioner is unsuitable. What have you don to verify that your matrix has the necessary properties? Best W. -- Wolfgang Bangerth email: bange...@colostate.edu www: http://www.math.colostate.edu/~bangerth/ -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/b87ee936-8e48-6f21-8d5c-5403e4dadb73%40colostate.edu.
Re: [deal.II] PETSc iteration does not converge
Dear Dr.Bangerth, I tried both, first I tried 1e-4*system_rhs.l2_norm(), it failed. Then I tried with exact precision limits, from 1e-3 to 1e-8, all of them cannot converge. If I set the precision level as 1e-4, with or without L2 norm it stopped at step-42 with the residue 0.0113395. Best regards, Yuesu On Sun, Aug 16, 2020 at 7:20 PM Wolfgang Bangerth wrote: > On 8/14/20 9:20 PM, yuesu jin wrote: > > I tried a few levels of the tolerance, 1e-3, 1e-4 ,1e-6 and 1e-8. 1e-3 > > converged because that is in the same level with the solution. Error > occurs > > below 1e-4. I have tried the Jacobi preconditioner instead of SSOR in > the > > single thread CG version, it converged as well. > > Is this 1e-4 * system_rhs.l2_norm(), or just 1e-4? If the latter, what is > the > size of system_rhs.l2_norm()? You should choose a tolerance that is > proportional to the norm of the right hand side. > > Best > W. > > > -- > > Wolfgang Bangerth email: bange...@colostate.edu > www: http://www.math.colostate.edu/~bangerth/ > > -- > The deal.II project is located at http://www.dealii.org/ > For mailing list/forum options, see > https://groups.google.com/d/forum/dealii?hl=en > --- > You received this message because you are subscribed to the Google Groups > "deal.II User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to dealii+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dealii/0cd8b66f-b168-c725-200f-b2bb6ff727d5%40colostate.edu > . > -- Yuesu Jin, Ph.D student, University of Houston, College of Natural Sciences and Mathematics, Department of Earth and Atmospheric Sciences, Houston, Texas 77204-5008 346-404-2062 -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CA%2B25a%3DKGEYe-3RyZEi8Kn60UbAUROHj9iiqV7mYiZQBYiDuxBQ%40mail.gmail.com.
Re: [deal.II] PETSc iteration does not converge
On 8/14/20 9:20 PM, yuesu jin wrote: I tried a few levels of the tolerance, 1e-3, 1e-4 ,1e-6 and 1e-8. 1e-3 converged because that is in the same level with the solution. Error occurs below 1e-4. I have tried the Jacobi preconditioner instead of SSOR in the single thread CG version, it converged as well. Is this 1e-4 * system_rhs.l2_norm(), or just 1e-4? If the latter, what is the size of system_rhs.l2_norm()? You should choose a tolerance that is proportional to the norm of the right hand side. Best W. -- Wolfgang Bangerth email: bange...@colostate.edu www: http://www.math.colostate.edu/~bangerth/ -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/0cd8b66f-b168-c725-200f-b2bb6ff727d5%40colostate.edu.
Re: [deal.II] PETSc iteration does not converge
Dear Dr. Bangerth, I tried a few levels of the tolerance, 1e-3, 1e-4 ,1e-6 and 1e-8. 1e-3 converged because that is in the same level with the solution. Error occurs below 1e-4. I have tried the Jacobi preconditioner instead of SSOR in the single thread CG version, it converged as well. Best regards, Yuesu On Fri, Aug 14, 2020 at 10:14 PM Wolfgang Bangerth wrote: > On 8/14/20 5:53 PM, yuesu jin wrote: > > > > I also wrote a single thread CG version, which converges well. The > > preconditioner in the parallel version is blockJacobi but the single > thread > > version I used is SSOR. Does it matter to the convergence? Thank you! > > Yes, in exactly the ways the error message shows: If you are using a > different > preconditioner, you should expect different convergence behavior. > > Whether you should expect one or the other method to work (or fail) > depends on > the properties of the matrix you are trying to solve. I'd also check > whether > the residual 0.00295038 is large or small compared to the initial > residual. > What is the tolerance you are using in the SolverControl object? > > Best > W. > > -- > > Wolfgang Bangerth email: bange...@colostate.edu > www: http://www.math.colostate.edu/~bangerth/ > > -- > The deal.II project is located at http://www.dealii.org/ > For mailing list/forum options, see > https://groups.google.com/d/forum/dealii?hl=en > --- > You received this message because you are subscribed to the Google Groups > "deal.II User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to dealii+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dealii/91ed065a-a39b-c7ba-978a-704485da3387%40colostate.edu > . > -- Yuesu Jin, Ph.D student, University of Houston, College of Natural Sciences and Mathematics, Department of Earth and Atmospheric Sciences, Houston, Texas 77204-5008 346-404-2062 -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CA%2B25a%3DKQ4PzjSQ6uUHha%2BsW%3D%2BdvZzFru4RKpHVFEvwBppxXheg%40mail.gmail.com.
Re: [deal.II] PETSc iteration does not converge
On 8/14/20 5:53 PM, yuesu jin wrote: I also wrote a single thread CG version, which converges well. The preconditioner in the parallel version is blockJacobi but the single thread version I used is SSOR. Does it matter to the convergence? Thank you! Yes, in exactly the ways the error message shows: If you are using a different preconditioner, you should expect different convergence behavior. Whether you should expect one or the other method to work (or fail) depends on the properties of the matrix you are trying to solve. I'd also check whether the residual 0.00295038 is large or small compared to the initial residual. What is the tolerance you are using in the SolverControl object? Best W. -- Wolfgang Bangerth email: bange...@colostate.edu www: http://www.math.colostate.edu/~bangerth/ -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/91ed065a-a39b-c7ba-978a-704485da3387%40colostate.edu.
[deal.II] PETSc iteration does not converge
Dear all, I am working on acoustic wave simulation through PETSc wrapper, it gives the error message: ** Mesh Info Dimensions2 No.cells:5144 Number of active cells:5144 Number of degrees of freedom:20833 * Exception on processing: An error occurred in line <148> of file in function void dealii::PETScWrappers::SolverBase::solve(const dealii::PETScWrappers::MatrixBase&, dealii::PETScWrappers::VectorBase&, const dealii::PETScWrappers::VectorBase&, const dealii::PETScWrappers::PreconditionerBase&) The violated condition was: false Additional information: Iterative method reported convergence failure in step 65. The residual in the last step was 0.00295038. This error message can indicate that you have simply not allowed a sufficiently large number of iterations for your iterative solver to converge. This often happens when you increase the size of your problem. In such cases, the last residual will likely still be very small, and you can make the error go away by increasing the allowed number of iterations when setting up the SolverControl object that determines the maximal number of iterations you allow. The other situation where this error may occur is when your matrix is not invertible (e.g., your matrix has a null-space), or if you try to apply the wrong solver to a matrix (e.g., using CG for a matrix that is not symmetric or not positive definite). In these cases, the residual in the last iteration is likely going to be large. Aborting *** I also wrote a single thread CG version, which converges well. The preconditioner in the parallel version is blockJacobi but the single thread version I used is SSOR. Does it matter to the convergence? Thank you! Best regards, -- Yuesu Jin, Ph.D student, University of Houston, College of Natural Sciences and Mathematics, Department of Earth and Atmospheric Sciences, Houston, Texas 77204-5008 346-404-2062 -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CA%2B25a%3DJ8-hN-WEQRD%3DzeiuXRkPPO6pVbUfbbBN85ypsP5i4d_A%40mail.gmail.com.