theochem / horton

HORTON: Helpful Open-source Research TOol for N-fermion systems
http://theochem.github.io/horton/
GNU General Public License v3.0
94 stars 40 forks source link

Installation on Fedora 25 hits a problem when compliling C extensions #212

Closed jmelcr closed 7 years ago

jmelcr commented 7 years ago

Hello,

I wanted to try Horton on another machine which runs a recent version of Fedora 25. Unfortunately, I keep hitting the same problem on both current Git-version and on the 2.0.1 release:

horton/meanfield/cext.cpp: In function ‘PyObject __pyx_pf_6horton_9meanfield_4cext_12LibXCWrapper_4refs_get(__pyx_obj_6horton_9meanfield_4cext_LibXCWrapper)’: horton/meanfield/cext.cpp:2110:74: error: cannot convert ‘func_reference_type const’ to ‘const char’ for argument ‘1’ to ‘PyObject PyString_FromString(const char*)’ pyx_t_1 = Pyx_PyBytes_FromString((pyx_v_self->_func.info[0]).refs); if (unlikely(!pyx_t_1)) PYX_ERR(0, 117, pyx_L1_error)

Looks like there's something wring in the Cythonized cext.cpp.

In addition, there's no "dependencies.json" file in the release archive. Since it is required by the setup.py scirpt, you might consider shipping it with the release, too.

Hope this helps you.

tovrstra commented 7 years ago

My guess is that you are compiling with a different version of LibXC (3.0). Can you try to build LibXC locally with the following script (developer version):

./tools/qa/install_libxc-2.2.2.sh

Then clean up the old build and recompile:

./cleanfiles.sh
./setup.py build_ext

Does this work? (The first lines of output of setup.py show how HORTON is linked with LibXC.)

jmelcr commented 7 years ago

Works, thanks. I expected the library to be backwards compatible...

But now there are different issues: git-current version -- there's no RMP2 or RAP1roG module in the final build. 2.0.1 release -- probably a small bug with citing:

from running the example mp2_h2_4-31g.py script: AttributeError Traceback (most recent call last) /home/joe/.local/share/horton/examples/perturbation_theory/mp2_h2_4-31g.py in () 23 kin = obasis.compute_kinetic(lf) 24 na = obasis.compute_nuclear_attraction(mol.coordinates, mol.pseudo_numbers, lf) ---> 25 er = obasis.compute_electron_repulsion(lf) 26 external = {'nn': compute_nucnuc(mol.coordinates, mol.pseudo_numbers)} 27 terms = [ horton/gbasis/cext.pyx in horton.gbasis.cext.GOBasis.compute_electron_repulsion (horton/gbasis/cext.cpp:13725)() AttributeError: 'ScreenLog' object has no attribute 'cite'

Shall I open a new issue for that?

tovrstra commented 7 years ago

We've dropped Ap1roG out of the 2.1 version because it's maintenance was unbearable. (it worked but messy code.)

I think the MP2 example is from the 2.0.1 release, while you're executing it with the development HORTON library. Could that be the case?

jmelcr commented 7 years ago

With a new day and fresh mind, I just rebuilt to 2.0.1 release from scratch and the example works. I probably intermixed the two versions (2.0.1 and devel) together.

Thank you! With such a support, Horton will surely be helpful also to me.

jmelcr commented 7 years ago

Would you like to include this setup.cfg in future releases -- it works for Fedora25:

[libint2] include_dirs=/usr/include/libint2 libraries=int2

[libxc]

include_dirs=/usr/include

libraries=xc

separate build of an older version necessary, e.g. v2.2.2 using the install script in Horton-development hosted on GitHub

[blas] include_dirs=/usr/include/openblas libraries=openblas

tovrstra commented 7 years ago

Good idea. I'll make a PR for that. I'll be offline for a little while, so it may take some time.