<div>Dear Tiziano,</div><div>Thanks for your reply. </div><div>I applied the patch to the CP2K code (v8.1), and now it can print a reasonable number for the RAM (below).</div><div>May I take the advantage to ask two additional questions regarding the RAM in HFX? Thank you very much in advance.</div><div>1) The line "  HFX_MEM_INFO| Total memory consumption ERI's RAM [MiB]:                 540840" prints the total (including all MPI processors ) used memory, am I right?</div><div>2) Is there a way to estimate the required memory for the HFX module before running the CP2k program? I thought no because the memory is allocated dynamically according to the occupation matrix, but I would like to have a double-check.</div><div>Thanks again.</div><div>Best Regards,</div><div>Geng</div><div><br></div><div><br></div><div>  HFX_MEM_INFO| Number of cart. primitive ERI's calculated:       32799680679415</div><div>  HFX_MEM_INFO| Number of sph. ERI's calculated:                   1498990881919</div><div>  HFX_MEM_INFO| Number of sph. ERI's stored in-core:                683885389270</div><div>  HFX_MEM_INFO| Number of sph. ERI's stored on disk:                           0</div><div>  HFX_MEM_INFO| Number of sph. ERI's calculated on the fly:                    0</div><div>  HFX_MEM_INFO| Total memory consumption ERI's RAM [MiB]:                 540840</div><div>  HFX_MEM_INFO| Whereof max-vals [MiB]:                                    10475</div><div>  HFX_MEM_INFO| Total compression factor ERI's RAM:                         9.65</div><div>  HFX_MEM_INFO| Total memory consumption ERI's disk [MiB]:                     0</div><div>  HFX_MEM_INFO| Total compression factor ERI's disk:                        0.00</div><div>  HFX_MEM_INFO| Size of density/Fock matrix [MiB]:                           408</div><div>  HFX_MEM_INFO| Size of buffers [MiB]:                                        25</div><div>  HFX_MEM_INFO| Number of periodic image cells considered:                    33</div><div>  HFX_MEM_INFO| Est. max. program size after HFX  [MiB]:                    7536</div><div><br></div><br><div class="gmail_quote"><div dir="auto" class="gmail_attr">在2021年1月28日星期四 UTC-8 上午8:09:03&l...@chem.uzh.ch> 写道:<br/></div><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Geng,
<br>
<br>can you please tell us which version of CP2K you are using and possibly 
<br>also submit an input file with which you can reproduce the issue?
<br>
<br>But since that's quiet a number of ERIs (which seems a bit weird since 
<br>you're using ADMM), my first guess is an integer overflow here:
<br>
<br><a href="https://github.com/cp2k/cp2k/blob/5b641945b68ab1861fea87544a697b03403b4443/src/hfx_energy_potential.F#L1776-L1777" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=zh-CN&q=https://github.com/cp2k/cp2k/blob/5b641945b68ab1861fea87544a697b03403b4443/src/hfx_energy_potential.F%23L1776-L1777&source=gmail&ust=1611975365550000&usg=AFQjCNFBXoDmRZIzUxArNuix11bnxD6IXw">https://github.com/cp2k/cp2k/blob/5b641945b68ab1861fea87544a697b03403b4443/src/hfx_energy_potential.F#L1776-L1777</a>
<br>
<br>... while the target variable is an int8, the variables multiplied are 
<br>int4, and get multiplied first as such before converted to int8:
<br><a href="https://gcc.godbolt.org/z/x4hYsb" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=zh-CN&q=https://gcc.godbolt.org/z/x4hYsb&source=gmail&ust=1611975365550000&usg=AFQjCNGNxvOwrslJ2G_8WWg5NFbWbGrNpA">https://gcc.godbolt.org/z/x4hYsb</a>
<br>If you have CP2K v8.1 you can try the attached patch and see whether it 
<br>fixes the issue (only compile-tested so far).
<br>
<br>Best,
<br>Tiziano
<br>
<br>On 1/28/21 4:01 PM, Sun Geng wrote:
<br>> Dear CP2K users,
<br>> I am running jobs with CP2K/ADMM method, in which the CP2k prints the 
<br>> following lines:
<br>> 
<br>>    HFX_MEM_INFO| Number of cart. primitive ERI's calculated:      
<br>>   52451602395221
<br>>    HFX_MEM_INFO| Number of sph. ERI's calculated:                  
<br>>   2343013195064
<br>>    HFX_MEM_INFO| Number of sph. ERI's stored in-core:              
<br>>   2247108266900
<br>>    HFX_MEM_INFO| Number of sph. ERI's stored on disk:                    
<br>>         0
<br>>    HFX_MEM_INFO| Number of sph. ERI's calculated on the fly:            
<br>>          0
<br>>    HFX_MEM_INFO| Total memory consumption ERI's RAM [MiB]:              
<br>>    -449594
<br>>    HFX_MEM_INFO| Whereof max-vals [MiB]:                                
<br>>      17729
<br>>    HFX_MEM_INFO| Total compression factor ERI's RAM:                    
<br>>     -38.13
<br>>    HFX_MEM_INFO| Total memory consumption ERI's disk [MiB]:              
<br>>         0
<br>>    HFX_MEM_INFO| Total compression factor ERI's disk:                    
<br>>      0.00
<br>>    HFX_MEM_INFO| Size of density/Fock matrix [MiB]:                      
<br>>       408
<br>>    HFX_MEM_INFO| Size of buffers [MiB]:                                  
<br>>        25
<br>>    HFX_MEM_INFO| Number of periodic image cells considered:              
<br>>        33
<br>>    HFX_MEM_INFO| Est. max. program size after HFX  [MiB]:                
<br>>     31121
<br>> 
<br>> The total memory consumption ERI's RAM is a negative number.
<br>> Why it is a negative number?
<br>> How can I know the real RAM consumption in this job?
<br>> Thank you very much in advance.
<br>> Best
<br>> Geng
<br>> 
<br>> 
<br>> -- 
<br>> You received this message because you are subscribed to the Google 
<br>> Groups "cp2k" group.
<br>> To unsubscribe from this group and stop receiving emails from it, send 
<br>> an email to <a href data-email-masked rel="nofollow">cp...@googlegroups.com</a> 
<br>> <mailto:<a href data-email-masked rel="nofollow">cp...@googlegroups.com</a>>.
<br>> To view this discussion on the web visit 
<br>> <a href="https://groups.google.com/d/msgid/cp2k/02d0eebb-898e-4536-913f-548448e11648n%40googlegroups.com" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=zh-CN&q=https://groups.google.com/d/msgid/cp2k/02d0eebb-898e-4536-913f-548448e11648n%2540googlegroups.com&source=gmail&ust=1611975365550000&usg=AFQjCNENUU_ZWDBC1JNn1sArYTPOIR0srg">https://groups.google.com/d/msgid/cp2k/02d0eebb-898e-4536-913f-548448e11648n%40googlegroups.com</a> 
<br>> <<a href="https://groups.google.com/d/msgid/cp2k/02d0eebb-898e-4536-913f-548448e11648n%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=zh-CN&q=https://groups.google.com/d/msgid/cp2k/02d0eebb-898e-4536-913f-548448e11648n%2540googlegroups.com?utm_medium%3Demail%26utm_source%3Dfooter&source=gmail&ust=1611975365550000&usg=AFQjCNEA04aHzix5fYN-fHd-7UkKAp5YIg">https://groups.google.com/d/msgid/cp2k/02d0eebb-898e-4536-913f-548448e11648n%40googlegroups.com?utm_medium=email&utm_source=footer</a>>.
<br>
<br>-- 
<br>Tiziano Müller
<br>University of Zurich
<br>Department of Chemistry
<br>Winterthurerstrasse 190
<br>CH-8057 Zürich
<br>
<br>Tel: +41 44 63 54234
<br><a href="http://www.chem.uzh.ch" target="_blank" rel="nofollow" data-saferedirecturl="https://www.google.com/url?hl=zh-CN&q=http://www.chem.uzh.ch&source=gmail&ust=1611975365551000&usg=AFQjCNEZg4ae3du4Y24NVTNPoaimHiFgKw">www.chem.uzh.ch</a>
<br><a href data-email-masked rel="nofollow">tiz...@chem.uzh.ch</a>
<br></blockquote></div>