Hi, I want to use hypre preconditioners coupled with PETSc, but so far I have not succeeded. Here&#39;s what I&#39;ve done:<br><br>Firstly I create the preconditioner:<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mat A_Par(NSubSteps)<br>&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; Vec Unk_Par(NSubSteps)<br>
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Vec B_Load_Par(NSubSteps)<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; KSP KspSolv<br>---&gt; &nbsp;&nbsp;&nbsp;&nbsp; PC&nbsp; precond<br><br>******************************<br><br>Later in the code I set the preconditioner type and create the Krylov solver:<br><br>
----&gt;&nbsp;&nbsp;&nbsp; call PCSetType(precond,&#39;hypre&#39;,iError)<br>----&gt;&nbsp;&nbsp;&nbsp; call PCHYPRESetType(precond,&#39;boomeramg&#39;,iError)<br>----&gt;&nbsp;&nbsp;&nbsp; call KSPCreate (PETSC_COMM_WORLD, KspSolv, iError)<br>----&gt;&nbsp;&nbsp;&nbsp; call KSPSetFromOptions (KspSolv, iError)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call KSPSetOperators (KspSolv, A_Par(nstp), A_Par(nstp), SAME_NONZERO_PATTERN, iError)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call KSPSolve (KspSolv, B_Load_Par(nstp), Unk_Par(nstp), iError)<br><br><br>***************************<br><br>
Then, when I run the program I put the following options in the command line:<br><br>mpirun -np 2 /home/mpivello/bin/SolverGP.x -pc_type hypre -pc_hypre_type boomeramg -pc_hypre_boomeramg_sweep_all true -pc_hypre_boomeramg_grid_sweeps 1 -pc_hypre_boomeramg_strong_threshold 0.9 -pc_hypre_boomeramg_max_iter 5 -pc_hypre_boomeramg_coarsen_type modifiedRuge-Stueben -f0 dummy.tmp 2&gt;&amp;1 -ksp_gmres_restart 200 -ksp_max_it 3000 -ksp_rtol 1.0e-10 -ksp_atol 1.0e-15 -ksp_monitor -log_summary &lt; /dev/null &gt; run.parallel.log &amp;<br>
<br>But this proceeding is not working. What am I doing wrong?<br><br>Thanks in advance<br><br>Márcio Ricardo<br><br><br><br><br>