recompute of integrals in SCF/DFT

48 views
Skip to first unread message

Zhiyong Zhang

unread,
Apr 30, 2022, 2:03:53 AM4/30/22
to NWChem Forum
Greetings, 

From the output of the NWChem SCF/DFT calculations, is there a way to tell how many of the integrals are stored or recomputed. 

Also, are there any empirical ways to determine when to use recompute of the integrals and when to caches the integrals in memory or on disk? 

Thanks!

Zhiyong

Edoardo Aprà

unread,
May 2, 2022, 1:50:23 PM5/2/22
to NWChem Forum
What SCF algorithm are you referring to? Is it the semi-direct or the direct algorithm?

Zhiyong Zhang

unread,
May 2, 2022, 4:13:35 PM5/2/22
to NWChem Forum
Hi Edo, 

I've been using the default and looks like that with the default, the direct option is assumed and integrals are recomputed. I added semidirect to it and with that the integrals are written to disk and reused in subsequent iterations. This is nwchem 7.0.2. 

Is there a way to force it to cache the integrals in memory? If there are enough memory available, it is going to be cached in memory by default? Are the integrals replicated for each process or are they shared? 

Best, 

Zhiyong



From: nwchem...@googlegroups.com <nwchem...@googlegroups.com> on behalf of Edoardo Aprà <edoard...@gmail.com>
Sent: Monday, May 2, 2022 10:50 AM
To: NWChem Forum <nwchem...@googlegroups.com>
Subject: [nwchem-forum] Re: recompute of integrals in SCF/DFT
 
--
You received this message because you are subscribed to a topic in the Google Groups "NWChem Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nwchem-forum/prWMRAk60Rw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nwchem-forum...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nwchem-forum/92f6dd18-22b8-4df5-8928-196af1d01d9dn%40googlegroups.com.

Edoardo Aprà

unread,
May 3, 2022, 1:30:39 PM5/3/22
to NWChem Forum
Did you have a look at the documentation at
If you wish to keep all the integrals in memory, you could you use, for example, the following SCF input line
semidirect memsize 100000000 filesize 0

Zhiyong Zhang

unread,
May 3, 2022, 3:49:04 PM5/3/22
to NWChem Forum
Thanks Edo. I was looking at that part of the documentation. Looks like the integrals are replicated when cached in files. Are the integrals also replicated when cached in memory? 

Zhiyong

Sent: Tuesday, May 3, 2022 10:30 AM
To: NWChem Forum <nwchem...@googlegroups.com>
Subject: Re: [nwchem-forum] Re: recompute of integrals in SCF/DFT
 

Edoardo Aprà

unread,
May 3, 2022, 3:52:02 PM5/3/22
to NWChem Forum
Not sure what you mean by "replicated" as far as the integrals are concerned. Each process stores only the integrals it needs and each process acts on different/unique set of integrals.
What part of the documentation mentions that the integrals are replicated?

Zhiyong Zhang

unread,
May 4, 2022, 2:50:02 PM5/4/22
to nwchem...@googlegroups.com
Hi Edo, 

I was looking the output file, with this information, #integrals = 2.518D+09 #direct =  0.0% #cached =100.0%. That is the ca. the total number of integrals. It looked like to me that is the number for the anoint files nwchem/nwchem.aoints.00. 

Zhiyong



Sent: Tuesday, May 3, 2022 12:52:02 PM

Edoardo Aprà

unread,
May 4, 2022, 7:33:21 PM5/4/22
to NWChem Forum
Could you report the input options you have used for this run?

Zhiyong Zhang

unread,
May 5, 2022, 5:57:40 PM5/5/22
to NWChem Forum
Hi Edo, 

I have attached the nwchem input file and the mobecs file that could be used to run the calculation. I used the semidirect option for the integrals without further parameters and all the integrals are cached in files. I could explore caching these integrals in memory later but looks like with files, the performace are acceptable. 

I have trouble getting rid of the neg frequencies though.  Could you please help me taking a look at it and see which parameters may make a difference? 

Thanks!
Zhiyong

Sent: Wednesday, May 4, 2022 4:33 PM
nwchem.nw
nd-s8-o-ano-H-la-C301.movecs

Zhiyong Zhang

unread,
May 7, 2022, 5:33:47 PM5/7/22
to NWChem Forum
Hi Edo, 

I am testing the caching of the integrals. I used  semidirect memsize 60000000, that is 60MW per process and 64 processes, for a total of 3.84D=+09 MW. The number of integrals, according to the output, is ca.  #quartets = 1.486D+08 #integrals = 3.189D+09 #direct =  0.0% #cached =100.0%. 

However, only the 1-e integrals are cached in memory and the rest of the integrals seem to be cached in files instead. I have used the default memory key word in the input in this case and allocated 8GB of memory pr process. I thought there is enough memory for caching the integrals in memory but looks like that it is not the case. 

What am I missing here? 

Thanks!

Zhiyong

From: nwchem...@googlegroups.com <nwchem...@googlegroups.com> on behalf of Zhiyong Zhang <zyz...@stanford.edu>
Sent: Thursday, May 5, 2022 1:31 PM

Edoardo Aprà

unread,
May 9, 2022, 2:40:35 PM5/9/22
to NWChem Forum
The following input lines will get all your 2-electron integrals cached in memory when using 64 processes (or more).
Please notice that you need to use the keyword filesize 0 to skip I/O altogether. See posting https://groups.google.com/g/nwchem-forum/c/prWMRAk60Rw/m/nqpp6OJPAgAJ
memory stack 2300 mb heap 100 mb global 600 mb noverify
...
dft
 ...
  semidirect memsize 200000000 filesize 0
end

Zhiyong Zhang

unread,
May 24, 2022, 2:25:20 AM5/24/22
to nwchem...@googlegroups.com
Thanks Edo. That worked. 

Sent: Monday, May 9, 2022 11:40 AM
Reply all
Reply to author
Forward
0 new messages