<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I'm solving a topology optimization problem with Stokes flow discretized by a stabilized Q1-Q0 finite element method
<o:p></o:p></p>
<p class="MsoNormal">and using BiCGStab with the fieldsplit preconditioner to solve the linear systems. The implementation<o:p></o:p></p>
<p class="MsoNormal">is based on DMStag, runs on Ubuntu via WSL2, and works fine with PETSc-3.18.1 on multiple CPU cores and the following<o:p></o:p></p>
<p class="MsoNormal">options for the preconditioner:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-fieldsplit_0_ksp_type preonly \<o:p></o:p></p>
<p class="MsoNormal">-fieldsplit_0_pc_type gamg \<o:p></o:p></p>
<p class="MsoNormal">-fieldsplit_0_pc_gamg_reuse_interpolation 0 \<o:p></o:p></p>
<p class="MsoNormal">-fieldsplit_1_ksp_type preonly \<o:p></o:p></p>
<p class="MsoNormal">-fieldsplit_1_pc_type jacobi <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However, when I enable GPU computations by adding two options -
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">...<o:p></o:p></p>
<p class="MsoNormal">-dm_vec_type cuda \<o:p></o:p></p>
<p class="MsoNormal">-dm_mat_type aijcusparse \<o:p></o:p></p>
<p class="MsoNormal">-fieldsplit_0_ksp_type preonly \<o:p></o:p></p>
<p class="MsoNormal">-fieldsplit_0_pc_type gamg \<o:p></o:p></p>
<p class="MsoNormal">-fieldsplit_0_pc_gamg_reuse_interpolation 0 \<o:p></o:p></p>
<p class="MsoNormal">-fieldsplit_1_ksp_type preonly \<o:p></o:p></p>
<p class="MsoNormal">-fieldsplit_1_pc_type jacobi <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">- KSP still works fine the first couple of topology optimization iterations but then<o:p></o:p></p>
<p class="MsoNormal">stops with "Linear solve did not converge due to DIVERGED_DTOL ..".
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My question is whether I should expect the GPU versions of the linear solvers and pre-conditioners<o:p></o:p></p>
<p class="MsoNormal">to function exactly as their CPU counterparts (I got this impression from the documentation),
<o:p></o:p></p>
<p class="MsoNormal">in which case I've probably made some mistake in my own code, or whether there are other/additional
<o:p></o:p></p>
<p class="MsoNormal">settings or modifications I should use to run on the GPU (an NVIDIA Quadro T2000)?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="SV">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="SV"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="SV">Carl-Johan<o:p></o:p></span></p>
</div>
</body>
</html>