<div dir="ltr">Dear Pietro,<div>thank you so much. It was surprising to me too, but this is what I've got. Surfing on the internet, I've received some indications of similar problems with AMD architectures. In my case this problem emerges ONLY when libxc is involved, even using a very basic MPI approach (no OpenMP... that makes the situation even worse, especially for INTEL+MKL compilations). </div><div>Without libxc, everything works perfectly.</div><div>Although it seems that you have not received similar reports so far, it is a bit embarrassing that 128 MPI AMD EPYC 7713 performs worse than 32 MPI<span style="color:rgb(15,17,21);font-family:quote-cjk-patch,Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif"><span class="gmail-Apple-converted-space"> </span></span><span style="color:rgb(15,17,21);font-family:quote-cjk-patch,Inter,system-ui,-apple-system,system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif">Xeon(R) Gold 6226R when using r2SCAN that involves dense grids and massive memory handling tasks. </span></div><div><span style="color:rgb(15,17,21);font-family:quote-cjk-patch,Inter,system-ui,-apple-system,system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif">Btw, thank you for your suggestion concerning QE7.6: I'll check it as soon as the new version is released.</span></div><div><font color="#0f1115" face="quote-cjk-patch, Inter, system-ui, -apple-system, system-ui, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Open Sans, Helvetica Neue, sans-serif"><span style="caret-color: rgb(15, 17, 21);">I'll keep you informed </span></font></div><div><font color="#0f1115" face="quote-cjk-patch, Inter, system-ui, -apple-system, system-ui, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Open Sans, Helvetica Neue, sans-serif"><span style="caret-color: rgb(15, 17, 21);">Giuseppe</span></font></div><div><span style="color:rgb(15,17,21);font-family:quote-cjk-patch,Inter,system-ui,-apple-system,system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif"><br></span></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Il giorno ven 24 lug 2026 alle ore 09:34 Pietro Davide Delugas <<a href="mailto:pdelugas@sissa.it">pdelugas@sissa.it</a>> ha scritto:<br></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"><div class="msg3763000021462720173">




<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
Dear Giuseppe, this is very strange.  There is nothing tightly CPU-architecture-specific in those code parts; it's plain Fortran. Architecture-specific optimisation is expected from the Fortran compiler; in my experience, gfortran is equally not the best for
 both architectures (and whether good or bad, it would be equally good or bad for all the code, not just for one single kernel).  Intel and AOCC compilers usually do much better architecture-specific optimisation. </div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
The first thing to check is that you are actually using only the physical cores, so (number of MPI ranks) × (number of OpenMP threads per process) should be at most 128, assuming nothing else heavy is running on the machine. Use the env variable OMP_NUM_THREADS
 to set the number of OpenMP threads per process. </div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
That said, on general grounds, 7.6 will be available on the Quantum Espresso website by this weekend, and pw behaviour with SCAN and R2SCAN will be significantly improved.  Better give it a try next week. </div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:11pt;color:rgb(0,0,0)">
Pietro</div>
<hr style="display:inline-block;width:98%">
<div id="m_1398604632524689686divRplyFwdMsg">
<div style="direction:ltr;font-family:Calibri,sans-serif;font-size:11pt;color:rgb(0,0,0)">
<b>From:</b> users <<a href="mailto:users-bounces@lists.quantum-espresso.org" target="_blank">users-bounces@lists.quantum-espresso.org</a>> on behalf of Giuseppe Zollo via users <<a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a>><br>
<b>Sent:</b> Thursday, July 23, 2026 16:31<br>
<b>To:</b> <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a> <<a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a>><br>
<b>Subject:</b> [QE-users] QE+LIBXC on AMD EPYC CPUs poor performances</div>
<div style="direction:ltr"> </div>
</div>
<div style="direction:ltr">Dear all, </div>
<div style="direction:ltr">I'm experiencing very very poor behavior of QE 7.5 + LIBXC 7.0.0 on AMD EPYC 7713 CPU regardless of the compilation. I've compiled using gcc+ native AMD libraries aocl or gcc+MKL or intel+MKL. In any case, after successful compilation,
 I receive very poor behavior using r2SCAN meta-GGA. The system is not large  (less than 130 atoms) and the same calculation behaves reasonably well on two
<span style="font-family:quote-cjk-patch,Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;color:rgb(15,17,21);background-color:rgb(255,255,255)">
Intel(R) Xeon(R) Gold 6226R (16 cores each) (much older and much lower benchmark), nearly 300 secs per scf iteration step. Using two AMD EPYC 7713 cpus (64 cores each, much faster and with NUMA access) the performance is even worse than two
</span><span style="font-family:quote-cjk-patch,Inter,system-ui,-apple-system,system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;color:rgb(15,17,21)">Xeon(R) Gold 6226R.</span></div>
<div style="direction:ltr;font-family:quote-cjk-patch,Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;color:rgb(15,17,21)">
<span style="background-color:rgb(255,255,255)">I've spent days trying to fix it and it seems it could be related to the AMD EPYC architecture.</span></div>
<div style="direction:ltr;font-family:quote-cjk-patch,Inter,system-ui,-apple-system,system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;color:rgb(15,17,21)">
I wonder if anyone has experienced the same and if there are indications on how to handle this drawback.</div>
<div style="direction:ltr;font-family:quote-cjk-patch,Inter,system-ui,-apple-system,system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;color:rgb(15,17,21)">
Thanks</div>
<div style="direction:ltr;font-family:quote-cjk-patch,Inter,system-ui,-apple-system,system-ui,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;color:rgb(15,17,21)">
Giuseppe</div>
<div style="direction:ltr"><br>
</div>
<div style="direction:ltr">--</div>
<div style="direction:ltr">Giuseppe Zollo</div>
<div style="direction:ltr">Dipartimento di Scienze di base e Applicate per l'Ingegneria</div>
<div style="direction:ltr">University "La Sapienza" of Rome</div>
<div style="direction:ltr">via A. Scarpa 14-16, Rome-Italy</div>
<div style="direction:ltr">phone: +39 06 49766947</div>
<div><br>
</div>
<p style="line-height:normal;margin:0cm 0cm 0.0001pt;font-family:Calibri,sans-serif;color:rgb(34,34,34)">
<span style="font-family:Arial,sans-serif;font-size:13px;color:red"><b>Fai crescere le giovani ricercatrici e i giovani ricercatori</b></span></p>
<p style="line-height:normal;margin:0cm 0cm 0.0001pt;font-family:Calibri,sans-serif;color:rgb(34,34,34)">
<span style="font-family:Arial,sans-serif;font-size:13px;color:red"><b>con il 5 per mille alla Sapienza</b></span></p>
<p style="line-height:normal;margin:0cm 0cm 0.0001pt;font-family:Calibri,sans-serif;color:rgb(34,34,34)">
<span style="font-family:Arial,sans-serif;font-size:13px">Scrivi il codice fiscale dell'Università
<b>80209930587<br>
</b></span><span style="font-family:Arial,sans-serif;font-size:13px;color:rgb(17,85,204)"><a href="https://www.uniroma1.it/it/node/23149" id="m_1398604632524689686OWAed84efdb-5a3a-ffe6-8596-dfaf0e89fa62" style="color:rgb(17,85,204);margin-top:0px;margin-bottom:0px" target="_blank"><b>Cinque per mille</b></a></span></p>
</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">Giuseppe Zollo<div>Dipartimento di Scienze di base e Applicate per l'Ingegneria</div><div>University "La Sapienza" of Rome</div><div>via A. Scarpa 14-16, Rome-Italy</div><div>phone: +39 06 49766947</div></div></div>

<br>
<p style="margin:0cm 0cm 0.0001pt;color:rgb(34,34,34);line-height:normal;font-family:Calibri,sans-serif"><font size="2"><b><span style="font-family:Arial,sans-serif;color:red">Fai crescere le giovani ricercatrici e i giovani ricercatori</span></b><b><span style="font-family:Arial,sans-serif"></span></b></font></p><p style="margin:0cm 0cm 0.0001pt;color:rgb(34,34,34);line-height:normal;font-family:Calibri,sans-serif"><font size="2"><b><span style="font-family:Arial,sans-serif;color:red">con il 5 per mille alla Sapienza</span></b><span style="font-family:Arial,sans-serif"></span></font></p><p style="margin:0cm 0cm 0.0001pt;color:rgb(34,34,34);line-height:normal;font-family:Calibri,sans-serif"><font size="2"><span style="font-family:Arial,sans-serif">Scrivi il codice fiscale dell'Università <b>80209930587<br></b></span><b><span style="font-family:Arial,sans-serif"><a href="https://www.uniroma1.it/it/node/23149" style="color:rgb(17,85,204)" target="_blank">Cinque per mille</a></span></b></font></p>