psi4.driver.set_memory

psi4.driver.set_memory(inputval, execute=True)[source]

Function to reset the total memory allocation. Takes memory value inputval as type int, float, or str; int and float are taken literally as bytes to be set, string taken as a unit-containing value (e.g., 30 mb) which is case-insensitive. Set execute to False to interpret inputval without setting in Psi4 core.

Returns:memory_amount (float) Number of bytes of memory set
Raises:ValidationError when <500MiB or disallowed type or misformatted
Examples:
1
2
3
4
>>> # [1] Passing absolute number of bytes
>>> psi4.set_memory(600000000)
>>> psi4.get_memory()
Out[1]: 600000000L
1
2
3
4
>>> # [2] Passing memory value as string with units
>>> psi4.set_memory('30 GB')
>>> psi4.get_memory()
Out[2]: 30000000000L
Good examples:

800000000 # 800000000 2004088624.9 # 2004088624 1.0e9 # 1000000000 ‘600 mb’ # 600000000 ‘600.0 MiB’ # 629145600 ‘.6 Gb’ # 600000000 ‘ 100000000kB ‘ # 100000000000 ‘2 eb’ # 2000000000000000000

Bad examples:

{} # odd type ‘’ # no info “8 dimms” # unacceptable units “1e5 gb” # string w/ exponent “5e5” # string w/o units 2000 # mem too small -5e5 # negative (and too small)