<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regarding #1, the contributions from ionode to the energy and to deexx are properly broadcasted,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
the problem comes with pool and band parallelization in exx. In this case, ionode only operates</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
on a subset of the (xkq,xkp) kpoint pairs and on a subset of the (ibnd,jbnd) band pairs.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Contributions not assigned to ionode are not included. This can be easily seen by accumulating</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
the result from <font size="2"><span style="font-size:11pt">PAW_xx_energy</span></font> on a separate variable and looking at its value as a function of npools.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Results clearly vary with the number of kpoint pools. These contributions are typically so small, that at</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
the end it probably doesn't matter.<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);">
Regarding #2, it is correct that the problem is in the charge augmentation, common to both PAW and USPP.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
There are clear differences in runs with nkpts>1 with and without tqr. The augmentation functions in real space</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
(e.g. <code><span>tabxx</span><span>(</span><span>ia</span><span>)</span><span>%</span><span>qr</span><span></span></code>(...)) do not depend on the specific k-points of the orbital pair densities being augmented.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
This, I believe, is incorrect. The phase factor coming from (xkp-xkq) is added in addusxx_g, but not in addusxx_r.</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);">
best, <br>
</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<div style="font-family:Tahoma; font-size:13px">*************************************<br>
Miguel A. Morales<br>
Quantum Simulations Group, Physics Division<br>
Lawrence Livermore National Laboratory<br>
phone: 925-423-4956<br>
*************************************<br>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> developers <developers-bounces@lists.quantum-espresso.org> on behalf of Lorenzo Paulatto <paulatz@gmail.com><br>
<b>Sent:</b> Saturday, March 28, 2020 10:00 AM<br>
<b>To:</b> developers@lists.quantum-espresso.org <developers@lists.quantum-espresso.org><br>
<b>Subject:</b> Re: [QE-developers] questions and possible bug on exx calculations</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">I add to what already said by Paolo<br>
<br>
> 1. On routines PAW_newdxx and PAW_xx_energy, the code is only executed<br>
> on ionode which I believe is a bug when k-point and/or band<br>
> parallelization is used.<br>
<br>
The code is only executed in ionode, and the result added into <br>
deexx,later on in exx.f90 there is<br>
<br>
IF (okvan) THEN<br>
CALL mp_sum( deexx(:,ii), intra_egrp_comm )<br>
ENDIF<br>
<br>
Which means that if we compute that part on all CPUs, the contribution <br>
would be multiplied by the number of CPUs. It would be better to majke <br>
PAW_newdxx parallel, but as it is inexpensive I did not bother. Bugs are <br>
always possible. Same story of PAW_xx_energy, which is added to energy, <br>
which is then summed over all CPUs<br>
CALL mp_sum( energy, inter_egrp_comm )<br>
CALL mp_sum( energy, intra_egrp_comm )<br>
CALL mp_sum( energy, inter_pool_comm )<br>
<br>
<br>
<br>
> 2. From what I see, tqr=.true. is not implemented for exx routines<br>
> when k-points are used.<br>
<br>
It is implemented. To clarify: there is a part of code that is common to <br>
PAW and Ultrasoft, this part depends on the value tqr and is computed by <br>
either newdxx_r or newdxx_g. Than there is a part which is paw-only, <br>
which does not depends on the value of tqr; this is computed by <br>
PAW_newdxx. Also note that when okpaw=.true. also okvan is true.<br>
<br>
<br>
> The phases of the pair densities need be<br>
> added, probably inside addusxx_r for this to be correct. In a<br>
> handful of cases I've tested, I get significantly different results<br>
> with/without tqr with hybrid functionals and kpoints. Gamma point or<br>
> single kpoint runs, of course, is fine. It would probably be better<br>
> to perform a runtime check and abort if necessary.<br>
<br>
There are probably some bugs in that part, but not what you think. <br>
Actually as the PAW specific part is identical with and without tqr, I <br>
would suspect the bug is in the Ultrasoft code.<br>
<br>
<br>
cheers#<br>
-- <br>
Lorenzo Paulatto - Paris<br>
_______________________________________________<br>
developers mailing list<br>
developers@lists.quantum-espresso.org<br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/developers">https://lists.quantum-espresso.org/mailman/listinfo/developers</a><br>
</div>
</span></font></div>
</body>
</html>