<div dir="ltr">Hi Frank,<div class="gmail_extra"><br><div class="gmail_quote">On 6 July 2016 at 00:23, frank <span dir="ltr"><<a href="mailto:hengjiew@uci.edu" target="_blank">hengjiew@uci.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I am using the CG ksp solver and Multigrid preconditioner to solve a linear system in parallel.<br>
I chose to use the 'Telescope' as the preconditioner on the coarse mesh for its good performance.<br>
The petsc options file is attached.<br>
<br>
The domain is a 3d box.<br>
It works well when the grid is 1536*128*384 and the process mesh is 96*8*24. When I double the size of grid and keep the same process mesh and petsc options, I get an "out of memory" error from the super-cluster I am using.<br></blockquote><div><br></div><div>When you increase the mesh resolution, did you also increasing the number of effective MG levels? </div><div>If the number of levels was held constant, then your coarse grid is increasing in size.</div><div>I notice that you coarsest grid solver is PCSVD. </div><div>This can be become expensive as PCSVD will convert your coarse level operator into a dense matrix and could be the cause of your OOM error.</div><div><br></div><div><div>Telescope does have to store a couple of temporary matrices, but generally when used in the context of multigrid coarse level solves these operators represent a very small fraction of the fine level operator. </div><div><br></div><div>We need to isolate if it's these temporary matrices from telescope causing the OOM error, or if they are caused by something else (e.g. PCSVD).</div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
Each process has access to at least 8G memory, which should be more than enough for my application. I am sure that all the other parts of my code( except the linear solver ) do not use much memory. So I doubt if there is something wrong with the linear solver.<br>
The error occurs before the linear system is completely solved so I don't have the info from ksp view. I am not able to re-produce the error with a smaller problem either.<br>
In addition, I tried to use the block jacobi as the preconditioner with the same grid and same decomposition. The linear solver runs extremely slow but there is no memory error.<br>
<br>
How can I diagnose what exactly cause the error?<br></blockquote><div><br></div><div>This going to be kinda hard as I notice your configuration uses nested calls to telescope.</div><div>You need to debug the solver configuration. </div><div><br></div><div>The only way I know to do this is by invoking telescope one step at a time.<br></div><div>By this I mean, use telescope once, check the configuration is what you want.</div><div> Then add the next instance of telescope.</div><div>For solver debugging purposes, get rid of PCSVD. </div><div>The constant null space is propagated with telescope so you can just use an iterative method. </div><div>Furthermore, for debugging purposes, you don't care about the solve time or even convergence, so set -ksp_max_it 1 everywhere in your solver stack (e.g. outer most KSP and on the coarsest level).</div><div><br></div><div>If one instance of telescope works, e.g. no OOM error occurs, add the next instance of telescope. </div><div>If two instance of telescope also works (no OOM), revert back to PCSVD. </div><div>If now you have an OOM error, you should consider adding more levels, or getting rid of PCSVD as your coarse grid solver.</div><div><br></div><div>Lastly, the option</div><div><pre class="">-repart_da_processors_x 24</pre></div><div>has been depreciated. </div><div>It now inherits the prefix from the solver running on the sub-communicator. </div><div>For your use case, it should this be something like</div><div> -mg_coarse_telescope_repart_da_processors_x 24</div><div>Use -options_left 1 to verify the option is getting picked up (another useful tool for solver config debugging).</div><div><br></div><div><br></div><div>Cheers</div><div> Dave</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
Thank you so much.<span class=""><font color="#888888"><br>
<br>
Frank<br>
</font></span></blockquote></div><br></div></div>