adc-connect / adcc

adcc: Seamlessly connect your program to ADC
https://adc-connect.org
GNU General Public License v3.0
32 stars 19 forks source link

RuntimeError: Prohibited to create memoryview without Py_buffer #126

Closed obackhouse closed 3 years ago

obackhouse commented 3 years ago

I have adcc==0.15.1 installed via pip 21.0.1 (python 3.7) on a machine where I intend to run some ADC calculations. The simple example:

from pyscf import gto, scf
import adcc
mol = gto.M(atom='O 0 0 0; O 0 0 1', basis='sto3g', verbose=0)
rhf = scf.RHF(mol).run()
adcc.adc2(rhf)

gives the error

Traceback (most recent call last):
  File "test_adcc.py", line 27, in <module>
    adcc.adc2(rhf)
...
  File "/lustre/home/mmm0686/auxgf/lib/python3.7/site-packages/adcc-0.15.1-py3.7-linux-x86_64.egg/adcc/MoSpaces.py", line 133, in __init__
    spaceargs["frozen_core"], spaceargs["frozen_virtual"])
RuntimeError: Prohibited to create memoryview without Py_buffer

I have tried this with pybind11==2.50,2.6.1,2.2.0, and I do not have this problem on my other machine with the same package versions. I'm not at all familiar with pybind11, so any guidance on this issue would be appreciated.

maxscheurer commented 3 years ago

This is a pybind11-related bug in adcc that has been fixed as of v0.15.2. I'd encourage you to use a newer adcc version to prevent this from happening 😁

obackhouse commented 3 years ago

Thanks @maxscheurer - makes sense. I have had trouble with setup.py when installing more recent versions either via pip or building from source, I think the source of this is an awfully outdated pkg-config on this particular cluster which does not support --define-prefix. Of course outdated libraries are not your problem though :smile:

maxscheurer commented 3 years ago

Ah that sounds ugly... if you do not fully loathe conda, if think this is the easiest way on clusters 😬