ImportError when import _openmmnn
hi I get an error when from openmmnn import * :
ImportError: /home/roy/tensorflow/lib/libtensorflow.so.2: undefined symbol: _ZNK10tensorflow6Device19IsRemoteCallAllowedEv
It quite seems like some issues aforementioned, but I have tried those solutions but still wrong with it. Do you know how to fix it?
here is how I install the plugin:
rm -rf build
mkdir build
cd build
export TENSORFLOW_DIR=/home/roy/tensorflow
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${TENSORFLOW_DIR}/lib
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:${TENSORFLOW_DIR}/include
condaEnv=~/miniconda3/envs/admp
CUDA_DIR=/local/CUDA/9.0.176
export OPENMM_CUDA_COMPILER=$CUDA_DIR/bin/nvcc
cmake .. -DOPENMM_DIR=$condaEnv \
-DCMAKE_INSTALL_PREFIX=$condaEnv \
-DTENSORFLOW_DIR=$TENSORFLOW_DIR
-DCUDA_TOOLKIT_ROOT_DIR=$CUDA_DIR \
-DNN_BUILD_CUDA_LIB=1 \
-DCMAKE_CXX_FLAGS='-std=c++11' \
-DCMAKE_CXX_FLAGS:STRING=-D_GLIBCXX_USE_CXX11_ABI=0
make -j4
make install
make PythonInstall
and the openmm is install directly from conda with v7.6 Thanks in advanced!
The most likely explanation is that you're compiling against one version of TensorFlow but linking to a different version at runtime. Notice that the error is happening inside libtensorflow.so. That is, the TensorFlow library is getting an error trying to find a TensorFlow function! Make sure you don't have any other version of TensorFlow in your library path.
@Roy-Kid did you solved the problem? I am having it too