<div dir="ltr"><div dir="ltr">On Mon, Aug 11, 2025 at 12:32 PM Yongzhong Li <<a href="mailto:yongzhong.li@mail.utoronto.ca">yongzhong.li@mail.utoronto.ca</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-6233337528587023198">





<div lang="en-CN" style="overflow-wrap: break-word;">
<div class="m_-2228103146610721686WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Dear PETSc’s developer,<br>
<br>
Hi, I am a user of PETSc. I have some questions about how we can configure PETSc with AOCL BLAS and LAPACK.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Previously, we linked PETSc with Intel MKL BLAS. This solution provides us with much better multithreading capability for sparse matrix-vector product compared with configuring PETSc with OpenBLAS.
 Now, our compute nodes have been upgraded with AMD CPUs, we are considering switching from Intel MKL to AMD AOCL.<br>
<br>
My questions are:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt"><u></u> <u></u></span></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="m_-2228103146610721686MsoListParagraph" style="margin-left:0cm"><span lang="EN-US" style="font-size:11pt">If we configure PETSc in compile time with
<i>—with-blaslapack-dir = $AOCLROOT</i>, will we be able to use AOCL BLAS as the backend of PETSc MatMult() API?</span></li></ol></div></div></div></blockquote><div><br></div><div>Do you mean use the AMD sparse matvec? We have a HIP implementation (<a href="https://urldefense.us/v3/__https://petsc.org/main/manualpages/Mat/MATAIJHIPSPARSE/__;!!G_uCfscf7eWS!buskXbl-Io-3aDFucXGpiYbfFRVN3fRcpRosr-WXF1em8NBn5a8PHltFj0SILAhBQspywGsr9f7BuSqHFfDA$">https://petsc.org/main/manualpages/Mat/MATAIJHIPSPARSE/</a>), but nothing for AOCL comparable to the AIJMKL class. If you think we need it, we would certainly help implement it.</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 class="msg-6233337528587023198"><div lang="en-CN" style="overflow-wrap: break-word;"><div class="m_-2228103146610721686WordSection1"><ol style="margin-top:0cm" start="1" type="1"><li class="m_-2228103146610721686MsoListParagraph" style="margin-left:0cm"><span lang="EN-US" style="font-size:11pt"><u></u><u></u></span></li><li class="m_-2228103146610721686MsoListParagraph" style="margin-left:0cm"><span lang="EN-US" style="font-size:11pt">What if AOCL BLAS and AOCL LAPACK are installed in two different directories, not under AOCLROOT?</span></li></ol></div></div></div></blockquote><div><br></div><div>You would use -with-blaslapack-lib=[liblist]</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 class="msg-6233337528587023198"><div lang="en-CN" style="overflow-wrap: break-word;"><div class="m_-2228103146610721686WordSection1"><ol style="margin-top:0cm" start="1" type="1"><li class="m_-2228103146610721686MsoListParagraph" style="margin-left:0cm"><span lang="EN-US" style="font-size:11pt"><u></u><u></u></span></li><li class="m_-2228103146610721686MsoListParagraph" style="margin-left:0cm"><span lang="EN-US" style="font-size:11pt">PETSc has MatAIJMKL type for sparse matrix stored in Intel MKL format. Does PETSc also have another type for AMD AOCL?</span></li></ol></div></div></div></blockquote><div><br></div><div>No, but it would be straightforward to add.</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 class="msg-6233337528587023198"><div lang="en-CN" style="overflow-wrap: break-word;"><div class="m_-2228103146610721686WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Thanks!<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Yongzhong<u></u><u></u></span></p>
</div>
</div>

</div></blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><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="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!buskXbl-Io-3aDFucXGpiYbfFRVN3fRcpRosr-WXF1em8NBn5a8PHltFj0SILAhBQspywGsr9f7BuYXAMWM-$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>