Memory FAQ



What does this error message mean?


There are 3 main memory related error messages that appear in Spartan. They are:

Setting Spartan's memory limits

Spartan checks the machine to see how much Memory is available. You can set the amount of memory a job can use from within Spartan. The place you do this is different on each platform.

The default memory value is also unique for each type machine:

This memory limit can be overridden on a per job basis with the MEM_TOTAL=x keyword in the option line. (x is in units of MB) The maximum memory must be less than total physical RAM divided by the number of concurrent job.

Suggested Memory Settings for Parallel Spartan Versions

In older versions of Spartan, a parallel job using 2 threads would require twice as much memory. With the newer parallel algorithms included in Spartan'16 Parallel Suite, this is no longer true, and a parallel job uses (essentially) the same amount of memory as a serial job.


Memory Requirements for Frequency Calculations

Frequency calculations use significantly more RAM than a geometry optimization. The more RAM, the better and quicker the calculation of second derivatives.

Memory Requirements for Semi-Empirical Calculations

Semi-Empirical calculations take much less memory than ab initio calculations, however, requirements can add up for very large systems. As a rough approximation (only good to 1 digit)

memory usage in kB = 950*8*(N2)/1024

where N is the number of atoms.

If using the SM54 Cramer-Truhlar solvation method one can expect another 9*8*(N3)/1024 kB of memory allocated for the Semi-Empirical modification.



Return to Top

Common Questions

  1. Will increasing swap improve performance?

  2. Probably not. The most likely effect will be to slow down Spartan calculations dramatically. But if you know what you are doing, and are careful it can help.

    In the worst case scenario, you will increase your swap, and Spartan will think your machine has more RAM than it really does. Spartan will then use this "virtual" RAM. Spartan will run, but often the RAM required by Spartan will reside on the disk. Accessing the disk is many order of magnitudes slower than running in RAM, and the speed of Spartan will plummet. A similar problem can occur even if Spartan is using less than the total RAM in your system. If a Spartan job and another program such as a web browser, a java applet, or even another Spartan job are both trying to use the real RAM a thrashing of memory will occur.

    There is a case where increasing swap space may help, but be careful as it is easy to create additional issues when changing swap space values. If there are some bloated applications on your machine which are running, but you are not using them, yet you choose not to exit them, they will take up valuable space in memory; Memory which Spartan wants to use. The best thing to do is to quit these applications. But you can also increase swap in the hope that the OS will swap the applications you aren't using out of memory and let Spartan use the real RAM.

    When increasing swap it is very important to set the memory limits of Spartan to be less than real Memory in your system. Typical modern operating systems require a bare minimum of 500 MB of RAM to run. So the maximum memory should be:

    "Total RAM"/"Number of jobs running at the same time"/"Number of threads per job"


    Return to Top

  3. My job failed with an error about MEM_STATIC. What does this mean?

  4. "MEM_STATIC" refers to an algorithm used partition memory into two different regions for HF and DFT calculations. For discussion purposes let's call them 'STATIC' and 'HEAP' memory. There are times when the algorithm incorrectly predicts the amount of 'STATIC' memory. When this occurs you may get an error message in the verbose output asking for more memory. This can usually be fixed by adding the MEM_STATIC=xx keyword to the output where xx is in megabytes (MB). The default is usually on the order of 32 MB. It is important that this number is significantly less than the total memory allocated in the machine. See the discussion on setting Spartan's memory limits.

    Note: This replaces the deprecated keyword MEMORY=yy where yy was in units of "double-words" (64-bits)
    Return to Top


Wavefunction Support
Author: Phil Klunzinger