<div dir="ltr"><div dir="ltr">On Mon, Mar 22, 2021 at 10:04 AM Sepideh Kavousi <<a href="mailto:skavou1@lsu.edu">skavou1@lsu.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hello,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I want to solve PF solidification+Navier stokes using Finite different method, and I have a strange problem. My code runs fine for some system sizes and fails for some of the system sizes. When I run with the following options:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="background-color:rgb(0,255,0)">mpirun -np 2 ./one.out -ts_monitor -snes_fd_color -ts_max_snes_failures -1  -ts_type bdf -ts_bdf_adapt -pc_type bjacobi  -snes_linesearch_type l2 -snes_type ksponly -ksp_type gmres -ksp_gmres_restart 1001 -sub_pc_type
 ilu -sub_ksp_type preonly -snes_monitor -ksp_monitor -snes_linesearch_monitor -ksp_monitor_true_residual -ksp_converged_reason -log_view</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="background-color:rgb(255,255,128)"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="background-color:rgb(255,255,255);color:rgb(12,136,42)">    0 SNES Function norm 1.465357113711e+01
</span><span style="background-color:rgb(255,255,128)">
<div><span style="color:rgb(12,136,42)">    0 SNES Function norm 1.465357113711e+01
</span></div>
<div><span style="color:rgb(12,136,42)">    Linear solve did not converge due to DIVERGED_PC_FAILED iterations 0</span></div>
<div><span style="color:rgb(12,136,42)">                   PC_FAILED due to SUBPC_ERROR
</span></div>
<div><span style="color:rgb(12,136,42)">    Linear solve did not converge due to DIVERGED_PC_FAILED iterations 0</span></div>
<div><span style="color:rgb(12,136,42)">                   PC_FAILED due to SUBPC_ERROR
</span></div>
<div><span style="color:rgb(12,136,42)">    0 SNES Function norm 1.465357113711e+01
</span></div>
<div><span style="color:rgb(12,136,42)">    0 SNES Function norm 1.465357113711e+01
</span></div>
<div><span style="color:rgb(12,136,42)">    Linear solve did not converge due to DIVERGED_PC_FAILED iterations 0</span></div>
<div><span style="color:rgb(12,136,42)">                   PC_FAILED due to SUBPC_ERROR
</span></div>
<div><span style="color:rgb(12,136,42)">    Linear solve did not converge due to DIVERGED_PC_FAILED iterations 0</span></div>
<div><span style="color:rgb(12,136,42)">                   PC_FAILED due to SUBPC_ERROR
</span></div>
<div><span style="color:rgb(12,136,42)">    0 SNES Function norm 1.465357113711e+01
</span></div>
<div><span style="color:rgb(12,136,42)">    0 SNES Function norm 1.465357113711e+01
</span></div>
<div><span style="color:rgb(12,136,42)">^C    Linear solve did not converge due to DIVERGED_PC_FAILED iterations 0</span></div>
<div><span style="color:rgb(12,136,42)">                   PC_FAILED due to SUBPC_ERROR
</span></div>
<div><span style="color:rgb(12,136,42)">    0 SNES Function norm 1.465357113711e+01
</span></div>
<div><span style="color:rgb(12,136,42)">    Linear solve did not converge due to DIVERGED_PC_FAILED iterations 0</span></div>
<div><span style="color:rgb(12,136,42)">                   PC_FAILED due to SUBPC_ERROR
</span></div>
<div><span style="color:rgb(12,136,42)">    0 SNES Function norm 1.465357113711e+01</span>
</div>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="background-color:rgb(255,128,255)">Even setting pc_type to LU does not solve the problem.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="color:rgb(237,92,87)">0 TS dt 0.0001 time 0.</span>
<div><span style="color:rgb(237,92,87)">copy!</span></div>
<div><span style="color:rgb(237,92,87)">copy!</span></div>
<div><span style="color:rgb(237,92,87)">Write output at step= 0!</span></div>
<div><span style="color:rgb(237,92,87)">Write output at step= 0!</span></div>
<div><span style="color:rgb(237,92,87)">    0 SNES Function norm 1.465357113711e+01
</span></div>
<div><span style="color:rgb(237,92,87)">    0 SNES Function norm 1.465357113711e+01
</span></div>
<div><span style="color:rgb(237,92,87)">    Linear solve did not converge due to DIVERGED_PC_FAILED iterations 0</span></div>
<div><span style="color:rgb(237,92,87)">                   PC_FAILED due to FACTOR_NUMERIC_ZEROPIVOT
</span></div>
<div><span style="color:rgb(237,92,87)">    Linear solve did not converge due to DIVERGED_PC_FAILED iterations 0</span></div>
<span style="color:rgb(237,92,87)">                   PC_FAILED due to FACTOR_NUMERIC_ZEROPIVOT</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I guess the problem is that in mass conservation I used forward discretization for u (velocity in x) and for the moment in x , I used forward discretization for p (pressure) to ensure non-zero terms on the diagonal of matrix. I tried to run it with valgrind
 but it did not output anything.  <br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Does anyone have suggestions on how to solve this issue?</div></div></blockquote><div><br></div><div>Your subproblems in Block_jacobi are singular. With multiphysics problems like this, definition of blocks can be</div><div>tricky. I would first try to find a good preconditioner for this system in the literature, and then we can help you</div><div>try it out.</div><div><br></div><div>  Thanks,</div><div><br></div><div>      Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"> <br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Best,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Sepideh<br>
</div>
</div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>