Author Topic: Best values for rpacor and ricore when calculating spectra?  (Read 9171 times)

slackenerny

  • Jr. Member
  • **
  • Posts: 12
  • Karma: +0/-0
Best values for rpacor and ricore when calculating spectra?
« on: April 08, 2008, 11:19:23 AM »
The manual sais, that rpacor should be high, and ricore should be low, or the other way around. Depending if the number of states is "large" or not. Don't get me wrong, but I think that could take some clarification...  ;)

Is there any way to give a (rough) estimation of a good ricore/rpacor ratio, or way to calculate one? How many states are a "large" number?

best wishes!
« Last Edit: April 08, 2008, 03:14:40 PM by slackenerny »

uwe

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 558
  • Karma: +0/-0
Re: Best values for rpacor and ricore when calculating spectra?
« Reply #1 on: April 08, 2008, 04:01:31 PM »
Hi,

$rpacor is the amount of memory that is used to store excited state vectors while $ricore is used to store RI-J integrals during SCF or CPKS iterations (comparable to saving integral files to disk in Hartree-Fock, just that RI-J integrals can be recomputed much faster than any current I/O can deliver data, so they can be kept in RAM instead).

Using less $ricore will affect the speed of the calculation not dramatically, say 10-50%. But I have no hard numbers for that since it depends on the size of the input (but you can check it yourself by setting $ricore to 0 and to as much as your computer has minus 20%). So if your machine has 1GB, $ricore of 700 to 800 should be o.k. The problem is that $ricore gives just the amount of memory used for RI, all other matrices like Fock-matrix, density, DIIS matrices, etc. need additional memory! The larger your input, the larger the amount of memory that is needed for the non-RI part. Set $ricore to about 70-80% of your total memory, run ridft or escf or whatever and check the memory used with 'top'.

$rpacor (like $maxcor for MP2/CC2) on the other hand has much more influence on the speed of your TDDFT calculations. If you have enough memory, all excited states can be computed in one sweep. If you give less than needed, escf/egrad will loop over the excited states, doing as many of them in one loop as fit in the memory. So increasing $rpacor for a calculation with a couple of excited states can give a speed up of more than 2, 3, etc. - depends on your input and memory settings.

To be brief:

If you do TDDFT, $rpacor is much more important than $ricore !

Best,

Uwe

Matteo Guglielmi

  • Jr. Member
  • **
  • Posts: 20
  • Karma: +0/-0
Re: Best values for rpacor and ricore when calculating spectra?
« Reply #2 on: May 21, 2008, 12:52:03 PM »
To be brief:

If you do TDDFT, $rpacor is much more important than $ricore !

Best,

Uwe

In our lab we have workstations with 32GB of memory each
but the maximum value to which I can set $rpacor is only 15GB
i.e. "$rpacor  15000"

If I set it to 16000 MB or above the escf module complains telling
me to increase the value of $rpacor  :o

Is there any explanation for that?
How can I fix the problem?

Thanks,
Matteo.

uwe

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 558
  • Karma: +0/-0
Re: Best values for rpacor and ricore when calculating spectra?
« Reply #3 on: May 21, 2008, 02:52:24 PM »
Hi,

16383 might be the upper limit since the index of the internal array is a 32 bit Integer (also on 64 bit systems). So it looks like it is not possible to assign more than 16 GB to $rpacor.

But please note that $rpacor just has to be large enough to include all excitation vectors. If this is not the case, you will get a warning in the output:

Recommendation for optimum performance: Increase the maximum amount of
 allocatable core memory (e.g. $rpacor, $maxcor) to    100 MB or to the
 maximum amount of core memory available on your machine.


Setting $rpacor to a higher value than necessary will not speed up the calculation any more.

Regards,

Uwe