Closed XiaoboLinlin closed 2 years ago
The second error tells you that you are running out of disk space. Specify a correct scratch directory or give Psi4 enough memory to run in core. The example cases are very small, so I am surprised that you see this error.
The second error tells you that you are running out of disk space. Specify a correct scratch directory or give Psi4 enough memory to run in core. The example cases are very small, so I am surprised that you see this error.
Thank you for your answer! The examples are now working. But for my own case, it still produced errors:
RuntimeError:
Fatal Error: SCF::DF: Disk based algorithm requires 2 (A|B) fitting metrics and an (A|mn) chunk on core.
This is 2Q^2 + QNP doubles, where Q is the auxiliary basis size, N is the
primary basis size, and P is the maximum number of functions in a primary shell.
For this problem, that is 579894560 bytes before taxes,828420800 bytes after taxes.
Error occurred in file: /scratch/psilocaluser/conda-builds/psi4-multiout_1638121835567/work/psi4/src/psi4/libfock/DiskDFJK.cc on line: 727
The most recent 5 function calls were:
psi::DiskDFJK::preiterations()
My input file is shown below:
import resp
import numpy as np
import psi4
mol = psi4.geometry("""
Ti2 5.894640000000001 4.6752 4.88655
Ti2 4.273479000000001 1.8975999765561422 4.88655
Ti2 2.6523220000000003 4.6752 4.88655
Ti2 1.0311610000000009 1.8975999765561422 4.88655
C 5.894640000000001 0.9717333177040944 6.09059592
C 4.273479000000002 3.7493332942602366 6.09059592
C 2.6523220000000003 0.9717333177040944 6.09059592
C 1.0311610000000009 3.7493332942602366 6.09059592
C 1.0311610000000004 0.04586665885204755 3.6825040800000024
C 5.894640000000002 2.8234666354081903 3.6825040800000024
C 4.2734830000000015 0.04586665885204755 3.6825040800000024
C 2.6523220000000007 2.8234666354081903 3.6825040800000024
Ti1 1.031161 0.04586665885204755 7.37478126
Ti1 5.894640000000002 2.823466635408189 7.37478126
Ti1 4.273483000000001 0.04586665885204755 7.37478126
Ti1 2.6523220000000003 2.823466635408189 7.37478126
Ti1 5.894640000000001 0.9717333177040951 2.3983187400000006
Ti1 4.273479000000001 3.7493332942602375 2.3983187400000006
Ti1 2.6523220000000007 0.9717333177040951 2.3983187400000006
Ti1 1.0311610000000018 3.7493332942602375 2.3983187400000006
O 5.894640000000001 4.6752 8.368592162039999
O 4.273479000000001 1.8975999765561422 8.368592162039999
O 2.6523220000000003 4.6752 8.368592162039999
O 1.0311610000000009 1.8975999765561422 8.368592162039999
O 5.894640000000001 4.6752 1.4045078379599998
O 4.273479000000001 1.8975999765561422 1.4045078379599998
O 2.6523220000000003 4.6752 1.4045078379599998
O 1.0311610000000009 1.8975999765561422 1.4045078379599998
H 5.894640000000001 4.6752 9.36859216204
H 2.6523220000000003 4.6752 0.40450783796000034
H 4.273479000000001 1.8975999765561422 0.40450783796000006
H 4.273479000000001 1.8975999765561422 9.36859216204
H 1.0311610000000018 1.8975999765561422 9.36859216204
H 5.894640000000001 4.6752 0.4045078379599998
H 2.6523220000000007 4.6752 9.36859216204
H 1.0311610000000009 1.8975999765561422 0.40450783796000006
"""
)
mol.update_geometry()
# Call for first stage fit
options = {'VDW_SCALE_FACTORS' : [1.4, 1.6, 1.8, 2.0],
'VDW_POINT_DENSITY' : 1.0,
'RESP_A' : 0.0005,
'RESP_B' : 0.1,
}
options['VDW_RADII'] = {'Ti': 1.96}
charges1 = resp.resp([mol], options)
print('Electrostatic Potential Charges')
print(charges1[0])
print('Restrained Electrostatic Potential Charges')
print(charges1[1])
Could you help me out?
Btw, I set up the scratch folder in .bashrc and .bash_profile. If type in echo $PSI_SCRATCH
, it print /global/cscratch1/sd/linx6
, the scratch folder has at least 10 TB. (I am running the code on NERSC)
Thank you so much,
Best,
Xiaobo
The SCF procedure uses disk-based algorithm. However, the error tells you that you also need to supply enough memory to hold the (A|mn)
chunk on core. Psi4 assumes that 500 MiB of memory are available but this is not enough for your purpose (828420800 bytes). Use the psi4.set_memory("5gb")
syntax to specify the memory.
Notice that you may need to change the default method or basis set because you have a transition metal. Also, check the charges carefully to make sure they are reasonable and useful.
The SCF procedure uses disk-based algorithm. However, the error tells you that you also need to supply enough memory to hold the
(A|mn)
chunk on core. Psi4 assumes that 500 MiB of memory are available but this is not enough for your purpose (828420800 bytes). Use thepsi4.set_memory("5gb")
syntax to specify the memory.Notice that you may need to change the default method or basis set because you have a transition metal. Also, check the charges carefully to make sure they are reasonable and useful.
Thank you so much, that works for this case. But when I increase the system size, it still produced the error as shown below.
==> Integral Setup <==
DFHelper Memory: AOs need 718.406 GiB; user supplied 3492.460 GiB. Using in-core AOs.
Traceback (most recent call last):
File "/raid6/homes/linx6/install_software/resp/examples/try.py", line 105, in <module>
charges1 = resp.resp([mol], options)
File "/raid6/homes/linx6/install_software/resp/resp/driver.py", line 148, in resp
psi4.prop(options['METHOD_ESP'], properties=['GRID_ESP'])
File "/raid6/homes/linx6/.conda/envs/resp/lib/python3.9/site-packages/psi4/driver/driver.py", line 907, in properties
wfn = procedures['properties'][lowername](lowername, **kwargs)
File "/raid6/homes/linx6/.conda/envs/resp/lib/python3.9/site-packages/psi4/driver/procrouting/proc.py", line 2993, in run_scf_property
scf_wfn = run_scf(name, scf_do_properties=False, do_timer=False, **kwargs)
File "/raid6/homes/linx6/.conda/envs/resp/lib/python3.9/site-packages/psi4/driver/procrouting/proc.py", line 2390, in run_scf
scf_wfn = scf_helper(name, post_scf=False, **kwargs)
File "/raid6/homes/linx6/.conda/envs/resp/lib/python3.9/site-packages/psi4/driver/procrouting/proc.py", line 1607, in scf_helper
e_scf = scf_wfn.compute_energy()
File "/raid6/homes/linx6/.conda/envs/resp/lib/python3.9/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py", line 83, in scf_compute_energy
self.initialize()
File "/raid6/homes/linx6/.conda/envs/resp/lib/python3.9/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py", line 193, in scf_initialize
self.initialize_jk(self.memory_jk_, jk=jk)
File "/raid6/homes/linx6/.conda/envs/resp/lib/python3.9/site-packages/psi4/driver/procrouting/scf_proc/scf_iterator.py", line 128, in initialize_jk
jk.initialize()
MemoryError: std::bad_alloc
Do you know what happens? As shown above, I supplied 3492.460 GiB which is greater than AOs need (718 GB). The geometry info is shown below:
```
Geometry (in Angstrom),
charge = 0, multiplicity = 1:
Center X Y Z Mass
------------ ----------------- ----------------- ----------------- -----------------
TI 5.674064824248 4.991329330058 -0.000000000000 47.947941980000
TI 4.052903824248 -3.341470693386 -0.000000000000 47.947941980000
TI 2.431742824248 -0.563870716830 -0.000000000000 47.947941980000
TI 0.810581824248 2.213729259726 -0.000000000000 47.947941980000
TI -4.052903175752 4.991329330058 -0.000000000000 47.947941980000
TI -5.674064175752 -3.341470693386 -0.000000000000 47.947941980000
TI 5.674064824248 -0.563870716830 -0.000000000000 47.947941980000
TI 4.052903824248 2.213729259726 -0.000000000000 47.947941980000
TI -0.810581175752 4.991329330058 -0.000000000000 47.947941980000
TI -2.431742175752 -3.341470693386 -0.000000000000 47.947941980000
TI -4.052903175752 -0.563870716830 -0.000000000000 47.947941980000
TI -5.674064175752 2.213729259726 -0.000000000000 47.947941980000
TI 2.431740824248 4.991329330058 -0.000000000000 47.947941980000
TI 0.810579824248 -3.341470693386 -0.000000000000 47.947941980000
TI -0.810581175752 -0.563870716830 -0.000000000000 47.947941980000
TI -2.431742175752 2.213729259726 -0.000000000000 47.947941980000
C 5.674064824248 -4.267337352238 1.204045920000 12.000000000000
C 4.052903824248 -1.489737375682 1.204045920000 12.000000000000
C 2.431742824248 1.287862600874 1.204045920000 12.000000000000
C 0.810581824248 4.065462577430 1.204045920000 12.000000000000
C -4.052903175752 -4.267337352238 1.204045920000 12.000000000000
C -5.674064175752 -1.489737375682 1.204045920000 12.000000000000
C 5.674064824248 1.287862600874 1.204045920000 12.000000000000
C 4.052903824248 4.065462577430 1.204045920000 12.000000000000
C -0.810581175752 -4.267337352238 1.204045920000 12.000000000000
C -2.431742175752 -1.489737375682 1.204045920000 12.000000000000
C -4.052903175752 1.287862600874 1.204045920000 12.000000000000
C -5.674064175752 4.065462577430 1.204045920000 12.000000000000
C 2.431740824248 -4.267337352238 1.204045920000 12.000000000000
C 0.810579824248 -1.489737375682 1.204045920000 12.000000000000
C -0.810581175752 1.287862600874 1.204045920000 12.000000000000
C -2.431742175752 4.065462577430 1.204045920000 12.000000000000
C -5.674064175752 -5.193204011090 -1.204045920000 12.000000000000
C 5.674064824248 -2.415604034534 -1.204045920000 12.000000000000
C 4.052903824248 0.361995942022 -1.204045920000 12.000000000000
C 2.431742824248 3.139595918578 -1.204045920000 12.000000000000
C -2.431742175752 -5.193204011090 -1.204045920000 12.000000000000
C -4.052903175752 -2.415604034534 -1.204045920000 12.000000000000
C -5.674064175752 0.361995942022 -1.204045920000 12.000000000000
C 5.674064824248 3.139595918578 -1.204045920000 12.000000000000
C 0.810579824248 -5.193204011090 -1.204045920000 12.000000000000
C -0.810581175752 -2.415604034534 -1.204045920000 12.000000000000
C -2.431742175752 0.361995942022 -1.204045920000 12.000000000000
C -4.052903175752 3.139595918578 -1.204045920000 12.000000000000
C 4.052901824248 -5.193204011090 -1.204045920000 12.000000000000
C 2.431740824248 -2.415604034534 -1.204045920000 12.000000000000
C 0.810579824248 0.361995942022 -1.204045920000 12.000000000000
C -0.810581175752 3.139595918578 -1.204045920000 12.000000000000
TI -5.674064175752 -5.193204011090 2.488231260000 47.947941980000
TI 5.674064824248 -2.415604034534 2.488231260000 47.947941980000
TI 4.052903824248 0.361995942022 2.488231260000 47.947941980000
TI 2.431742824248 3.139595918578 2.488231260000 47.947941980000
TI -2.431742175752 -5.193204011090 2.488231260000 47.947941980000
TI -4.052903175752 -2.415604034534 2.488231260000 47.947941980000
TI -5.674064175752 0.361995942022 2.488231260000 47.947941980000
TI 5.674064824248 3.139595918578 2.488231260000 47.947941980000
TI 0.810579824248 -5.193204011090 2.488231260000 47.947941980000
TI -0.810581175752 -2.415604034534 2.488231260000 47.947941980000
TI -2.431742175752 0.361995942022 2.488231260000 47.947941980000
TI -4.052903175752 3.139595918578 2.488231260000 47.947941980000
TI 4.052901824248 -5.193204011090 2.488231260000 47.947941980000
TI 2.431740824248 -2.415604034534 2.488231260000 47.947941980000
TI 0.810579824248 0.361995942022 2.488231260000 47.947941980000
TI -0.810581175752 3.139595918578 2.488231260000 47.947941980000
TI 5.674064824248 -4.267337352238 -2.488231260000 47.947941980000
TI 4.052903824248 -1.489737375682 -2.488231260000 47.947941980000
TI 2.431742824248 1.287862600874 -2.488231260000 47.947941980000
TI 0.810581824248 4.065462577430 -2.488231260000 47.947941980000
TI -4.052903175752 -4.267337352238 -2.488231260000 47.947941980000
TI -5.674064175752 -1.489737375682 -2.488231260000 47.947941980000
TI 5.674064824248 1.287862600874 -2.488231260000 47.947941980000
TI 4.052903824248 4.065462577430 -2.488231260000 47.947941980000
TI -0.810581175752 -4.267337352238 -2.488231260000 47.947941980000
TI -2.431742175752 -1.489737375682 -2.488231260000 47.947941980000
TI -4.052903175752 1.287862600874 -2.488231260000 47.947941980000
TI -5.674064175752 4.065462577430 -2.488231260000 47.947941980000
TI 2.431740824248 -4.267337352238 -2.488231260000 47.947941980000
TI 0.810579824248 -1.489737375682 -2.488231260000 47.947941980000
TI -0.810581175752 1.287862600874 -2.488231260000 47.947941980000
TI -2.431742175752 4.065462577430 -2.488231260000 47.947941980000
O 5.674064824248 4.991329330058 3.482042162040 15.994914619570
O 4.052903824248 -3.341470693386 3.482042162040 15.994914619570
O 2.431742824248 -0.563870716830 3.482042162040 15.994914619570
O 0.810581824248 2.213729259726 3.482042162040 15.994914619570
O -4.052903175752 4.991329330058 3.482042162040 15.994914619570
O -5.674064175752 -3.341470693386 3.482042162040 15.994914619570
O 5.674064824248 -0.563870716830 3.482042162040 15.994914619570
O 4.052903824248 2.213729259726 3.482042162040 15.994914619570
O -0.810581175752 4.991329330058 3.482042162040 15.994914619570
O -2.431742175752 -3.341470693386 3.482042162040 15.994914619570
O -4.052903175752 -0.563870716830 3.482042162040 15.994914619570
O -5.674064175752 2.213729259726 3.482042162040 15.994914619570
O 2.431740824248 4.991329330058 3.482042162040 15.994914619570
O 0.810579824248 -3.341470693386 3.482042162040 15.994914619570
O -0.810581175752 -0.563870716830 3.482042162040 15.994914619570
O -2.431742175752 2.213729259726 3.482042162040 15.994914619570
O 5.674064824248 4.991329330058 -3.482042162040 15.994914619570
O 4.052903824248 -3.341470693386 -3.482042162040 15.994914619570
O 2.431742824248 -0.563870716830 -3.482042162040 15.994914619570
O 0.810581824248 2.213729259726 -3.482042162040 15.994914619570
O -4.052903175752 4.991329330058 -3.482042162040 15.994914619570
O -5.674064175752 -3.341470693386 -3.482042162040 15.994914619570
O 5.674064824248 -0.563870716830 -3.482042162040 15.994914619570
O 4.052903824248 2.213729259726 -3.482042162040 15.994914619570
O -0.810581175752 4.991329330058 -3.482042162040 15.994914619570
O -2.431742175752 -3.341470693386 -3.482042162040 15.994914619570
O -4.052903175752 -0.563870716830 -3.482042162040 15.994914619570
O -5.674064175752 2.213729259726 -3.482042162040 15.994914619570
O 2.431740824248 4.991329330058 -3.482042162040 15.994914619570
O 0.810579824248 -3.341470693386 -3.482042162040 15.994914619570
O -0.810581175752 -0.563870716830 -3.482042162040 15.994914619570
O -2.431742175752 2.213729259726 -3.482042162040 15.994914619570
H 2.431742824248 -0.563870716830 4.482042162040 1.007825032230
H -2.431742175752 2.213729259726 4.482042162040 1.007825032230
H -0.810581175752 4.991329330058 4.482042162040 1.007825032230
H 0.810581824248 2.213729259726 -4.482042162040 1.007825032230
H -5.674064175752 -3.341470693386 -4.482042162040 1.007825032230
H -5.674064175752 2.213729259726 -4.482042162040 1.007825032230
H 2.431742824248 -0.563870716830 -4.482042162040 1.007825032230
H 0.810581824248 2.213729259726 4.482042162040 1.007825032230
H 5.674064824248 -0.563870716830 -4.482042162040 1.007825032230
H 2.431740824248 4.991329330058 4.482042162040 1.007825032230
H 5.674064824248 4.991329330058 -4.482042162040 1.007825032230
H -2.431742175752 -3.341470693386 -4.482042162040 1.007825032230
H -0.810581175752 4.991329330058 -4.482042162040 1.007825032230
H 0.810579824248 -3.341470693386 -4.482042162040 1.007825032230
H -4.052903175752 -0.563870716830 4.482042162040 1.007825032230
H -5.674064175752 -3.341470693386 4.482042162040 1.007825032230
H 5.674064824248 4.991329330058 4.482042162040 1.007825032230
H -4.052903175752 -0.563870716830 -4.482042162040 1.007825032230
H 4.052903824248 2.213729259726 -4.482042162040 1.007825032230
H -2.431742175752 2.213729259726 -4.482042162040 1.007825032230
H 0.810579824248 -3.341470693386 4.482042162040 1.007825032230
H -0.810581175752 -0.563870716830 4.482042162040 1.007825032230
H -5.674064175752 2.213729259726 4.482042162040 1.007825032230
H 4.052903824248 -3.341470693386 4.482042162040 1.007825032230
H -4.052903175752 4.991329330058 -4.482042162040 1.007825032230
H 5.674064824248 -0.563870716830 4.482042162040 1.007825032230
H -2.431742175752 -3.341470693386 4.482042162040 1.007825032230
H 4.052903824248 -3.341470693386 -4.482042162040 1.007825032230
H 2.431740824248 4.991329330058 -4.482042162040 1.007825032230
H -4.052903175752 4.991329330058 4.482042162040 1.007825032230
H 4.052903824248 2.213729259726 4.482042162040 1.007825032230
H -0.810581175752 -0.563870716830 -4.482042162040 1.007825032230
Thank you so much!
This is a Psi4 error unrelated to RESP. I will close this issue because the discussion is open in the Psi4 forum: http://forum.psicode.org/t/fatal-error-scf-disk-based-algorithm-requires-2-a-b-fitting-metrics-and-an-a-mn-chunk-on-core-memory-issue-when-calculating-resp-charge/2441
Dear cdsgroup,
I am using your resp package to derive the RESP charges, but error happened as shown below (by
python -c "import resp, sys; sys.exit(resp.test('long'))"
):The example cases cannot be run as well. The error messages are shown below:
Could you help me out? I used both psi4=1.4.1 and psi4=1.5 to test.
Thank you so much,
Best,
Xiaobo