isayev / ASE_ANI

ANI-1 neural net potential with python interface (ASE)
MIT License
220 stars 56 forks source link

libAtomicNNP.so: undefined symbol #32

Closed saeid-lab closed 2 years ago

saeid-lab commented 4 years ago

Hello, I'm trying to setup ASE_ANI but I have a problem with loading libAtomicNNP library. I used ctypes library like this:

from ctypes import *
libAtomicNNP= cdll.LoadLibrary('/content/ASE_ANI/lib/libAtomicNNP.so')

but I get this error:

---------------------------------------------------------------------------

OSError                                   Traceback (most recent call last)

<ipython-input-47-b5ad2034551e> in <module>()
----> 1 libAtomicNNP= cdll.LoadLibrary('/content/ASE_ANI/lib/libAtomicNNP.so')

1 frames

/usr/lib/python3.6/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
    346 
    347         if handle is None:
--> 348             self._handle = _dlopen(self._name, mode)
    349         else:
    350             self._handle = handle

OSError: /content/ASE_ANI/lib/libAtomicNNP.so: undefined symbol: _ZN6aevlib18cuaev_compute_file16get_next_datasetERSt6vectorIPfSaIS2_EES5_RS1_ItSaItEE

It seems there are some issues with "c" wrapper in libAtomicNNP.so I think recreating the .so files, mentionnig boost_threads and systems will solve the problem.

Thanks :) Saeid

Jussmith01 commented 4 years ago

Hi there Saeid,

aevlib, referenced in the undefined symbol error, is another shared object lib that makes up the whole of the NeuroChem package. So this might not be in your library path?

Just a little curious, why would you want to load the base functions of libAtomicNNP.so? There is a boost-based python interface to this code that does that for you for inference with the ANI models. If your goal is getting access to training, I would recommend our open source TorchANI package since it is a user friendly code. See this repo: https://github.com/aiqm/torchani

Best, Justin