Open njzjz opened 1 year ago
PSIO error 12 means write error: https://github.com/psi4/psi4/blob/58efb602ee9fdf3d774a3a6f073dbf47f2ac249b/psi4/src/psi4/libpsio/config.h#L55
Unfortunately your environment does not seem to give you the rest of the error message, so we dont actually know why a write has failed. Are you sure you have enough free disk space for the temporary files?
The disk space for the temporary file is about 245 GB. I don't know exactly how much space it requires.
Could this kind of error raise a Python exception? I use try...except
to mark failed points, and core dumped
can not be caught within the Python script.
The input file would be needed to see if it can be reproduced.
Thanks. Below is the code to call psi4. I have omitted the code for reading data and processing and storing data.
import psi4
import numpy as np
# Actually, data is read from the file
data = {
"atom_names": ["C", "H", "N", "O"],
"atom_types": np.array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3]),
"coords": np.array([[[-3.9865585648, -1.8582760752, 0.0587669877], [0.7980528366, 0.9905034199, -3.8757579839], [0.0178106787, -3.8114712569, -1.287341706], [0.1736042014, 2.8676674012, -2.6686480772], [1.5168871292, -3.4840112517, -1.2165490831], [5.9928177782, -1.0263175637, -0.727870595], [3.017388062, -3.0468838322, 0.725796647], [-1.1257063419, 2.2024569872, -2.1982624119], [3.7523959141, -2.0176820993, -0.1459387132], [2.6259054243, -0.1622076966, 1.1085321105], [2.049646823, 1.0182428923, 0.6838607968], [1.4062565931, 2.114871008, 1.4772425059], [-0.2523568246, -4.016672408, 1.0999647374], [2.3255033754, 3.3522821937, 1.6200106665], [3.7046766018, 2.9848831541, 2.1651825241], [1.1735625484, -4.5811334275, 0.9540162067], [2.4315347043, 4.0937068732, 0.2851573364], [3.2575655511, 5.3716076028, 0.3706631766], [6.7031283129, 1.0016787128, 0.6498103659], [5.2035205069, -1.8267984714, 0.310962209], [-0.8282256535, -1.9486626369, -0.0358093116], [-0.4674373308, 0.2364862053, -3.4484642696], [7.1610170448, -0.2486147189, -0.1207126491], [-6.5341397454, -0.0411486966, 1.763398572], [-7.0404010675, -0.1062099769, -0.5364760195], [-1.0082892403, 0.037578979, -1.0747103581], [-6.0424831429, 0.8949890937, 2.8738572621], [-3.9739485022, 1.6408470604, 2.0051764222], [-6.6202866638, 0.5125099574, -1.8747825793], [-2.4878029945, 1.6996757336, 2.3582928852], [-1.4969461675, -0.143208941, 1.1102807713], [-4.1119885595, -1.0217653672, -0.7882992237], [-4.2973010873, -0.0415607786, -1.847178749], [5.6555819166, -2.8072201692, 0.4649965987], [5.201041384, -1.3183226287, 1.275497881], [-6.4356133459, 1.9033044571, 2.6781390688], [-7.5986205227, -0.2620689834, 1.9372581796], [6.3682326149, -1.7072084584, -1.4948520646], [5.3206432155, -0.3239359453, -1.229189328], [7.7228189317, -0.8981040693, 0.5527825706], [-4.3826738861, 2.6590816954, 1.9262780172], [5.9839080242, 0.7189536547, 1.4232364458], [7.5670658959, 1.4471289795, 1.1506060496], [5.2715598856, 1.6911175648, -0.6410698838], [6.7401534369, 2.3783433323, -0.8548688716], [-0.2650650476, -0.8249766121, -3.3167075961], [-0.9582567982, -4.838510552, 1.2653010477], [1.6552489511, -4.6724884576, 1.9281749784], [-0.3212780436, -3.315804755, 1.9333902078], [-1.9737534209, 2.3488013352, 1.6496947171], [1.157489124, -5.5644038395, 0.4736865667], [1.6275273384, -2.4374739884, -1.5061238113], [-2.3642992505, 2.0857513251, 3.371584088], [-2.1504701352, -0.2655020749, 2.9919815006], [2.0884535097, -4.1168389228, -1.9076390582], [-1.9375728156, 2.4525666513, -2.8929217819], [0.9661878722, 2.6551256953, -1.938751508], [1.6022040792, 0.7841724731, -3.157160468], [0.0402096324, 3.9447647083, -2.7816946538], [-1.2467265935, 0.3780860721, -4.2084641204], [1.1057392299, 0.6873032458, -4.8782205076], [-4.102496078, 1.1336002767, 1.0432065929], [-1.3867786933, 2.5179094766, -1.1894915886], [4.3013076735, 5.1465739282, 0.5694956485], [3.7453584779, -2.3026160384, -1.2011059512], [-3.5436704242, -0.2263867341, -2.6214227607], [-4.1477441305, 0.9681629588, -1.4354234002], [-6.385367684, 1.5720686653, -1.6936358888], [-8.1293707449, -0.008364784, -0.4022235369], [-6.7835818427, -1.173938393, -0.5304731763], [-5.9690222981, -0.9837445356, 1.7942878858], [-6.4295543745, 0.5345655452, 3.830479889], [-0.1642482084, -4.8870667374, -1.3346361942], [-0.4246651863, -3.3287027858, -2.1574341496], [7.835478458, 0.065926779, -0.9217655086], [0.2801993817, 0.956672257, 2.7286499313], [1.7470023071, 1.3598969122, 3.3460428246], [-3.829442847, -2.5711178289, 0.8127942519], [4.203697503, 3.8694521886, 2.5508165156], [2.7646312712, -0.6072610943, 2.0709963606], [1.8229417322, 3.9989502928, 2.3471195754], [2.8732914, 3.4283145737, -0.4584330667], [1.4232745887, 4.3450459859, -0.0530997127], [4.329620552, 2.5614196883, 1.3839267312], [2.8817086248, 6.0173146394, 1.1617793827], [3.6252554546, 2.2719743014, 2.9830155292], [-7.4434855186, 0.4410405616, -2.5890974162], [3.2010845698, 5.9140326326, -0.5704640658], [0.5088426041, 2.4245642089, 0.9265473367], [6.0893550874, 2.0422571744, -0.1530407297], [-1.862134336, 0.4034738095, 2.2937204065], [-1.4138901004, 0.644406742, 0.0455352137], [-0.7095180298, -1.2632553768, -1.1676109686], [-0.6142721952, -3.2938004635, -0.1006904859], [1.97840289, -3.6814323378, 0.1492620683], [-0.9437197295, 0.7707072186, -2.1950994456], [3.0305830988, -0.7745567723, -0.0274639225], [2.1393686347, 1.0406513402, -0.6640047053], [2.7240826757, -0.0248994808, -1.0779442116], [0.9643448844, 1.7016817799, 2.7995701586], [-1.1897838302, -1.4434141329, 1.1398546593], [-4.6504826146, 0.9351211172, 3.0300907006], [0.5539503234, 2.3790185178, -3.9384263268], [-6.3763829627, 0.5740180369, 0.5055913646], [-5.5478006374, -0.1317291531, -2.5089137294], [3.352889237, -3.2422161861, 1.8787720858]]])
}
psi4.set_memory("8 GB")
psi4.set_num_threads(4)
types = np.array(data["atom_names"])[data["atom_types"]]
buff = ["0 1"]
for tt, cc in zip(types, data["coords"][0]):
buff.append(" ".join([tt] + [str(x) for x in cc]))
psi4.geometry("\n".join(buff))
G, wfn = psi4.gradient("WB97M-D3BJ/def2-TZVPPD", return_wfn=True)
energy = wfn.energy()
wfn.gradient().print_out()
gradient = np.array(G)
# post process energy and gradient
I bet this is because of the calls to exit()
in libpsio, combined with the lack of flushing of the error messages to the output. I have replaced the calls to exit()
in #3118, which should solve this issue.
I use psi4 v1.7 to perform gradient calculations under the WB97M-D3BJ/DEF2-TZVPPD level. Most structures work fine, but I get the following error in some structures without a clear error message.
I used conda to install psi4 in a new environment.
Below is the full log, which includes the geometry:
CPU information: