Here I use MPI with multi-threads.

On Friday, October 5, 2018 at 4:40:55 PM UTC-4, Ki-Tae Kim wrote:
>
> When I solve a very large system (positive definite and symmetric), dofs 
> over 10,000,000, PETScWrappers::SolverCG solver termintates with an error 
> of convergence failure in step 10000 even though the maximum number of 
> iteration is set over 10000.
>
> I have tested using different maximum numbers of iteration setting as 
> follows (just for test, the tolerence is set as a very small number):
>
>
> =====================================================================================================
> For example:
>
> If the maximum number of iteration is set by 100,
>
> In code:
> ...
>     SolverControl solver_control (100,
>                                                   
>  1e-100*pdata.system_rhs.l2_norm());
>     PETScWrappers::SolverCG solver(solver_control,
>                                                             
> mpi_communicator);
> ...
>
> Result:
> Solve the system by CG method:
> DEAL::Starting value 1.07201
> ERROR: Uncaught exception in MPI_InitFinalize on proc 0. Skipping 
> MPI_Finalize() to avoid a deadlock.
>
>
> ----------------------------------------------------
> Exception on processing: 
>
> --------------------------------------------------------
> An error occurred in line <138> of file 
> </tigress/CHIARAMONTE/ktk/src/dealii-9.0.0/source/lac/petsc_solver.cc> 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 62. The residual in 
> the last step was 4.09564e-83.
>
> 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.
> --------------------------------------------------------
>
> If the maximum number of iteration is set by 1000,
>
> In code:
> ...
>     SolverControl solver_control (1000,
>                                                   
>  1e-100*pdata.system_rhs.l2_norm());
>     PETScWrappers::SolverCG solver(solver_control,
>                                                             
> mpi_communicator);
> ...
>
> Result:
> Solve the system by CG method:
> DEAL::Starting value 1.07201
> ERROR: Uncaught exception in MPI_InitFinalize on proc 0. Skipping 
> MPI_Finalize() to avoid a deadlock.
>
>
> ----------------------------------------------------
> Exception on processing: 
>
> --------------------------------------------------------
> An error occurred in line <138> of file 
> </tigress/CHIARAMONTE/ktk/src/dealii-9.0.0/source/lac/petsc_solver.cc> 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 62. The residual in 
> the last step was 4.09564e-83.
>
> 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.
> --------------------------------------------------------
>
> =====================================================================================================
>
> As you can see above, it fails in step 62 in both cases even though they 
> are set by 100 and 1000.
>
> Could anyone know the problem and how to set the maximum number of 
> iteration for PETScWrappers::SolverCG?
>
> I appreciate your help!
>
> Thanks.
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to