<div dir="ltr"><div>Dear S Ling, dear Augustin,</div><div><br></div><div>Thanks for your quite instructive advices.</div><div>Best</div><div><br></div><div>Martin.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">po 17. 7. 2023 o 10:24 Augustin Bussy <<a href="mailto:augustin.bussy@chem.uzh.ch">augustin.bussy@chem.uzh.ch</a>> napísal(a):<br></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="msg5213615729058531562">




<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Dear Martin,</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)">
in dense systems where calculating the integrals on the fly is a major bottleneck, the RI-HFX method can be more performant. I suggest you run some tests with</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)">
&RI</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
   RI_METRIC IDENTITY<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
&END RI  </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)">
added to your input &HF section, and</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)">
SORT_BASIS EXP</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)">
added to the &DFT section. Since you also run on a small number of processors, you might want to reduce memory usage by setting the MEMORY_CUT keyword in the &RI section to 4 or 5.<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)">
For more information on the method, see the manual: <a href="https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/XC/HF/RI.html" id="m_5213615729058531562LPlnk736490" target="_blank">
https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/XC/HF/RI.html</a>, or the paper discussing the implementation:
<a href="https://pubs.aip.org/aip/jcp/article/158/16/164109/2886896" id="m_5213615729058531562LPNoLPOWALinkPreview" target="_blank">
https://pubs.aip.org/aip/jcp/article/158/16/164109/2886896</a>.</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,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Augustin<br>
</div>
<div></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="m_5213615729058531562appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_5213615729058531562divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> <a href="mailto:cp2k@googlegroups.com" target="_blank">cp2k@googlegroups.com</a> <<a href="mailto:cp2k@googlegroups.com" target="_blank">cp2k@googlegroups.com</a>> on behalf of S Ling <<a href="mailto:lingsanliang@gmail.com" target="_blank">lingsanliang@gmail.com</a>><br>
<b>Sent:</b> Sunday, July 16, 2023 12:23 AM<br>
<b>To:</b> cp2k <<a href="mailto:cp2k@googlegroups.com" target="_blank">cp2k@googlegroups.com</a>><br>
<b>Subject:</b> Re: [CP2K:19115] Re: diamond with TC-LRC + ADMM very slow</font>
<div> </div>
</div>
<div>Hi Martin,
<div><br>
</div>
<div>It is known that for diamond, the condition number of the overlap matrix with the FIT3 basis is unfavorable, see Section 3.6 of the original paper on ADMM, <a href="https://pubs.acs.org/doi/full/10.1021/ct1002225" target="_blank">https://pubs.acs.org/doi/full/10.1021/ct1002225</a>. For this, the authors of the ADMM paper developed
 an optimised ADMM basis, i.e. optFIT3, for C, but this basis was not supplied in the SI of the paper or uploaded into the CP2K basis library. Prof Hutter mentioned he cannot find that basis in a previous post, see <a href="https://lists.cp2k.org/archives/cp2k-user/2020-May/013397.html" target="_blank">https://lists.cp2k.org/archives/cp2k-user/2020-May/013397.html</a>.</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>SL<br>
<br>
</div>
<div>
<div dir="auto">On Friday, July 14, 2023 at 8:35:39 PM UTC+1 Martin Konôpka wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">Dear Matthias,</div>
<div dir="ltr"><br>
</div>
<div>Thanks, I tried to use some of the basis you suggested. Namely the <span style="font-size:11pt" lang="EN-US">
DZVP-MOLOPT-PBE0-GTH-q4 one. I found it file </span>BASIS_MOLOPT_UZH. (You likely meant this one, not
<span style="font-size:11pt" lang="EN-US">BASIS_SET_UZH, as there is no such a one in
</span>/usr/share/cp2k/ .) For simplicity, I used it for both PBE and PBE0 calculation. (The PBE one served just to produce an intial guess and I wanted to use the same basis set for both PBE and PBE0 calculations.) Unfortunately, the number of integrals to
 do on the fly even increased.  You can look my files in attachment. It looks that diamond is tough not only mechanically, but also to calculate with standard basis sets. I have not tried yet a carbon basis with the "SR" string. I think I will try such a one.<br>
</div>
<div><br>
</div>
<div>Best wishes</div>
<div>Martin.</div>
<div><br>
</div>
<div><br>
</div>
</div>
<br>
<div>
<div dir="ltr">pi 14. 7. 2023 o 9:49 Krack Matthias <<a rel="nofollow">matthia...@psi.ch</a>> napísal(a):<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div></div>
</blockquote>
</div>
<div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div lang="en-CH">
<div>
<p><span style="font-size:11pt" lang="DE-CH">Dear Martin<u></u><u></u></span></p>
<p><span style="font-size:11pt" lang="DE-CH"><u></u> <u></u></span></p>
<p><span style="font-size:11pt" lang="EN-US">You are using a TZV2P basis set for C with a very small exponent of 0.03 causing large interaction ranges which lets the number of integrals in a (dense) periodic system like diamond explode.
 I suggest to try the DZVP-MOLOPT-PBE0-GTH-q4  or TZV2P-MOLOPT-PBE0-GTH-q4 basis set from the file BASIS_SET_UZH with PBE0 instead. For PBE I suggest to try the (default) DZVP-MOLOPT-SR-GTH-q4 basis set from BASIS_MOLOPT.<u></u><u></u></span></p>
<p><span style="font-size:11pt" lang="EN-US"><u></u> <u></u></span></p>
<p><span style="font-size:11pt" lang="EN-US">HTH<u></u><u></u></span></p>
<p><span style="font-size:11pt" lang="EN-US"><u></u> <u></u></span></p>
<p><span style="font-size:11pt" lang="EN-US">Matthias<u></u><u></u></span></p>
<p><span style="font-size:11pt" lang="EN-US"><u></u> <u></u></span></p>
<div>
<div>
<div style="border-color:rgb(181,196,223) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p style="margin-right:0cm;margin-bottom:12pt;margin-left:36pt">
<b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black"><a rel="nofollow">cp...@googlegroups.com</a> <<a rel="nofollow">cp...@googlegroups.com</a>> on
 behalf of Martin Konôpka <<a rel="nofollow">konop...@gmail.com</a>><br>
<b>Date: </b>Thursday, 13 July 2023 at 18:29<br>
<b>To: </b><a rel="nofollow">cp...@googlegroups.com</a> <<a rel="nofollow">cp...@googlegroups.com</a>><br>
<b>Subject: </b>Re: [CP2K:19108] Re: diamond with TC-LRC + ADMM very slow<u></u><u></u></span></p>
</div>
<div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Dear Frederick,<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Thanks. You are right, there were too many integrals to do on the fly. I checked some of my previous calculations with the PBE0 TC-RLC + ADMM techniques (a TiO2 rutile system) and
 I see there were zero integrals to do on the fly in those jobs (on the same machine). That's a pretty difference. Unfortunatelly, with diamond even switching to cpFIT3 and releasing EPS_DEFAULT to 10^{-11} (by three orders of magnitude) did not help. After
 almost three hours even the 1st electronic iteration was not over (or at least no writing produced) and I stopped the job. A much more radical truncation and/or optimisation of the basis sets would be needed. At least for now, I am going to abandon PBE0 and
 use just PBE for this diamond system. And it looks that for PBE, plane waves with ultrasoft pseudopotentials are a much faster approach for this (rather dense) material. (I did a quick test today with the CPMD code using a 35 Ry PW cutoff.)<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Best wishes<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Martin.<u></u><u></u></span></p>
</div>
</div>
<p style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
<div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">št 13. 7. 2023 o 13:17 'Frederick Stein' via cp2k <<a rel="nofollow">cp...@googlegroups.com</a>> napísal(a):<u></u><u></u></span></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Dear Martin,<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">From your PBE0 output file, I see that most integrals are calculated on the fly indicating that your machine does not have enough memory to store all integrals. This increases the
 compute time significantly. What you could try is to<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">1) replace the pFIT3 with the cpFIT3 basis set to reduce the number of contracted basis functions<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">2) increase the EPS_DEFAULT parameter to reduce the number of matrix elements and number of integrals to calculate (only if your accuracy demands are still met)<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">HTH,<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Frederick<u></u><u></u></span></p>
</div>
<div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Martin Konôpka schrieb am Donnerstag, 13. Juli 2023 um 11:49:05 UTC+2:<u></u><u></u></span></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Dear CP2K experts,<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">I tried to use PBE0 functional with the TC-LRC + ADMM technique to calculate bulk diamond in a (110)-oriented cell. First however I used PBE (with the same grids etc) to produce a
 good initial guess for wavefunctions. The PBE calculation on 14 cores took about 249 sec per electronic iteration. Then I started PBE0 on 18 cores. It took 9909 sec (the 2nd iteration), which is unexpectedly long time. You can see attached my I/O files. BTW,
 concurrently with the PBE calculation, another calculation was running on the remaining 4 cores of the machine. Without that additional load and using all 18 cores, the time would drop to 194 sec only (PBE).<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">I have a some experience with using the TC-LRC + ADMM technique for TiO2 systems and also for some organic molecules. In those cases PBE0 was always just about 2-3 times slower than
 PBE. Now I see the enormous ratio and do not understand the reason.<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Also, I was surprised by huge memory consumption by the PBE0 calculation: Over 200 GB in total. Still, it fit in the available memory (256 GB DDR4)  and the machine remained perfectly
 responsive. Isn't there some problem with the basis sets that I used for carbon?<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">The cp2k version that I used was 9.1, the "factory" one provided by the package manager on ubuntu 22.04. I am using also Intel MKL installed through the package manager. I launched
 the calculation in a screen session by the command<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">     mpirun -np 18 cp2k.popt -i cp2k.inp -o cp2k.out<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">The machine is a single-socket one with hyperthreading off.<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Thanks for your opinions and for your work on bulding the CP2K code.<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt"><u></u> <u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Sincerely<u></u><u></u></span></p>
</div>
<div>
<p style="margin-left:36pt"><span style="font-size:11pt">Martin Konôpka.<u></u><u></u></span></p>
</div>
</blockquote>
</div>
<p style="margin-left:36pt"><span style="font-size:11pt">-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to
<a rel="nofollow">cp2k+uns...@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/769754fc-99e7-4489-8836-9d3b500de62bn%40googlegroups.com?utm_medium=email&utm_source=footer" rel="nofollow" target="_blank">
https://groups.google.com/d/msgid/cp2k/769754fc-99e7-4489-8836-9d3b500de62bn%40googlegroups.com</a>.<u></u><u></u></span></p>
</blockquote>
</div>
<p style="margin-left:36pt"><span style="font-size:11pt">-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to
<a rel="nofollow">cp2k+uns...@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/CAE0%3D32bVbf9%3Dui1seDiFs8Rsuvbn6zmdfdDVUJR9BW%3DrSQgjUA%40mail.gmail.com?utm_medium=email&utm_source=footer" rel="nofollow" target="_blank">
https://groups.google.com/d/msgid/cp2k/CAE0%3D32bVbf9%3Dui1seDiFs8Rsuvbn6zmdfdDVUJR9BW%3DrSQgjUA%40mail.gmail.com</a>.<u></u><u></u></span></p>
</div>
</div>
</div>
</div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to
<a rel="nofollow">cp2k+uns...@googlegroups.com</a>.<br>
</div>
</blockquote>
</div>
<div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/ZRAP278MB08273AAA4AAC402EE579BB16F434A%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer" rel="nofollow" target="_blank">
https://groups.google.com/d/msgid/cp2k/ZRAP278MB08273AAA4AAC402EE579BB16F434A%40ZRAP278MB0827.CHEP278.PROD.OUTLOOK.COM</a>.<br>
</div>
</blockquote>
</div>
</blockquote>
</div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to
<a href="mailto:cp2k+unsubscribe@googlegroups.com" target="_blank">cp2k+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/38543586-6f57-4a09-ad8e-a9436a2b3f7an%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank">
https://groups.google.com/d/msgid/cp2k/38543586-6f57-4a09-ad8e-a9436a2b3f7an%40googlegroups.com</a>.<br>
</div>
</div>


<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "cp2k" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com" target="_blank">cp2k+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/GV0P278MB037087BD686FE8C351180385D33BA%40GV0P278MB0370.CHEP278.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer" target="_blank">https://groups.google.com/d/msgid/cp2k/GV0P278MB037087BD686FE8C351180385D33BA%40GV0P278MB0370.CHEP278.PROD.OUTLOOK.COM</a>.<br>
</div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "cp2k" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:cp2k+unsubscribe@googlegroups.com">cp2k+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/cp2k/CAE0%3D32ZZ6aGd7iVgUYu3m_iRjWmF%3DpqN%2BG7mcztQKvKneaCiSg%40mail.gmail.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/cp2k/CAE0%3D32ZZ6aGd7iVgUYu3m_iRjWmF%3DpqN%2BG7mcztQKvKneaCiSg%40mail.gmail.com</a>.<br />