light_head_rcnn icon indicating copy to clipboard operation
light_head_rcnn copied to clipboard

psroi_pooling.so: undefined symbol:

Open wspt96 opened this issue 6 years ago • 9 comments

I run the make.sh successfully ,but when I run the train.py ,I meet this problem. can anyone give me some suggestions? appreciate so much !

Traceback (most recent call last): File "train.py", line 12, in import network_desp File "/home/pengtao/light_head_rcnn/experiments/lizeming/light_head_rcnn.ori_res101.coco.ps_roialign/network_desp.py", line 29, in from lib_kernel.lib_psroi_pooling import psroi_pooling_op, psroi_pooling_op_grad File "/home/pengtao/light_head_rcnn/lib/lib_kernel/lib_psroi_pooling/psroi_pooling_op.py", line 5, in _psroi_pooling_module = tf.load_op_library(filename) File "/home/pengtao/anaconda2/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library lib_handle = py_tf.TF_LoadLibrary(library_filename, status) File "/home/pengtao/anaconda2/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in exit c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.NotFoundError: /home/pengtao/light_head_rcnn/lib/lib_kernel/lib_psroi_pooling/psroi_pooling.so: undefined symbol: _Z24PSROIPoolForwardLauncherPKffiiiiiiS0_iiPfPiRKN5Eigen9GpuDeviceE

wspt96 avatar Dec 16 '18 11:12 wspt96

### #I have changed the make.sh,because I meet the problem in this issues #https://github.com/zengarden/light_head_rcnn/issues/60 , and I follow the instruction.

TF_INC=$(python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_include())') TF_LIB=$(python3 -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())') CUDA_PATH=/usr/local/cuda

nvcc -I -std=c++11 -c -o psroi_pooling_op.cu.o psroi_pooling_op_gpu.cu.cc -I $TF_INC -x cu -Xcompiler -fPIC -arch=sm_52 -I$TF_INC/external/nsync/public --expt-relaxed-constexpr

g++ -std=c++11 -shared -D_GLIBCXX_USE_CXX11_ABI=1 -o psroi_pooling.so psroi_pooling_op.cc psroi_pooling_op.cu.o -I $TF_INC -fPIC -lcudart -L $CUDA_PATH/lib64 -L$TF_LIB -ltensorflow_framework -I$TF_INC/external/nsync/public

### #after I changed the make.sh .I run the code , the result shows below: python3 setup.py build_ext --inplace running build_ext skipping 'bbox.c' Cython extension (up-to-date) skipping 'nms.c' Cython extension (up-to-date) rm -rf build ~/light_head_rcnn/lib ~/light_head_rcnn/lib/lib_kernel/lib_psroi_pooling ~/light_head_rcnn/lib ~/light_head_rcnn/lib ~/light_head_rcnn/lib/lib_kernel/lib_roi_pooling ~/light_head_rcnn/lib ~/light_head_rcnn/lib ~/light_head_rcnn/lib/lib_kernel/lib_roi_align ~/light_head_rcnn/lib ~/light_head_rcnn/lib ~/light_head_rcnn/lib/lib_kernel/lib_psalign_pooling ~/light_head_rcnn/lib ~/light_head_rcnn/lib ~/light_head_rcnn/lib/lib_kernel/lib_nms_dev ~/light_head_rcnn/lib ~/light_head_rcnn/lib ~/light_head_rcnn/lib/datasets_odgt/lib_coco/PythonAPI ~/light_head_rcnn/lib /# install pycocotools to the Python site-packages python3 setup.py build_ext install --user running build_ext building 'pycocotools._mask' extension creating build creating build/temp.linux-x86_64-3.5 creating build/temp.linux-x86_64-3.5/pycocotools creating build/common gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/pengtao/anaconda2/envs/tensorflow/lib/python3.5/site-packages/numpy/core/include -I../common -I/home/pengtao/anaconda2/envs/tensorflow/include/python3.5m -c pycocotools/_mask.c -o build/temp.linux-x86_64-3.5/pycocotools/_mask.o -Wno-cpp -Wno-unused-function -std=c99 gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/pengtao/anaconda2/envs/tensorflow/lib/python3.5/site-packages/numpy/core/include -I../common -I/home/pengtao/anaconda2/envs/tensorflow/include/python3.5m -c ../common/maskApi.c -o build/temp.linux-x86_64-3.5/../common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99 creating build/lib.linux-x86_64-3.5 creating build/lib.linux-x86_64-3.5/pycocotools gcc -pthread -shared -L/home/pengtao/anaconda2/envs/tensorflow/lib -Wl,-rpath=/home/pengtao/anaconda2/envs/tensorflow/lib,--no-as-needed build/temp.linux-x86_64-3.5/pycocotools/_mask.o build/temp.linux-x86_64-3.5/../common/maskApi.o -L/home/pengtao/anaconda2/envs/tensorflow/lib -lpython3.5m -o build/lib.linux-x86_64-3.5/pycocotools/_mask.cpython-35m-x86_64-linux-gnu.so running install running build running build_py copying pycocotools/coco.py -> build/lib.linux-x86_64-3.5/pycocotools copying pycocotools/mask.py -> build/lib.linux-x86_64-3.5/pycocotools copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-3.5/pycocotools copying pycocotools/init.py -> build/lib.linux-x86_64-3.5/pycocotools running install_lib copying build/lib.linux-x86_64-3.5/pycocotools/_mask.cpython-35m-x86_64-linux-gnu.so -> /home/pengtao/.local/lib/python3.5/site-packages/pycocotools running install_egg_info Removing /home/pengtao/.local/lib/python3.5/site-packages/pycocotools-2.0-py3.5.egg-info Writing /home/pengtao/.local/lib/python3.5/site-packages/pycocotools-2.0-py3.5.egg-info rm -rf build ~/light_head_rcnn/lib

### #!! I don't know whether this change may lead to the problem. And still now ,I didn't solve the problem

wspt96 avatar Dec 16 '18 11:12 wspt96

I follow your advice,but it dose not work.my platform is gcc 5.4; tensorflow 1.12.0; cuda 9.0; cudnn 7.1.3

chanajianyu avatar Dec 17 '18 03:12 chanajianyu

@chanajianyu sorry, I didn't solve this problem. I worry about the instruction in ##60 may cause this problem,so I list it

wspt96 avatar Dec 17 '18 10:12 wspt96

那最后,你解决了嘛,我今天调了一天,没进展

chanajianyu avatar Dec 17 '18 11:12 chanajianyu

还没有啊,贼烦,我还要跑其它的实验,所以就只好先放着了

wspt96 avatar Dec 17 '18 14:12 wspt96

edit the file 'lib/lib_kernel/lib_psalign_pooling/make.sh', add '-I /usr/local' for nvcc compile. It works for me.

alistarhu avatar Jan 14 '19 09:01 alistarhu

so , can you train on your dataset?

chanajianyu avatar Jan 16 '19 11:01 chanajianyu

Do not erase GOOGLE_CUDA=1 from make.sh file and add "-I /usr/local" for nvcc compile. And as it is written in the main page, "find /usr/local/lib/ | grep cuda_config.h" then export your cpath, like: "export CPATH=$CPATH:/usr/local/lib/python3.5/dist-packages/external/local_config_cuda/cuda/" It worked for me.

emjay73 avatar May 14 '19 06:05 emjay73

Has this problem been solved in the end?:(

GodDongWHU avatar Dec 30 '20 08:12 GodDongWHU