Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined symbol in roi_pooling.so #50

Closed
yakovenkodenis opened this issue Dec 20, 2016 · 18 comments
Closed

Undefined symbol in roi_pooling.so #50

yakovenkodenis opened this issue Dec 20, 2016 · 18 comments

Comments

@yakovenkodenis
Copy link

yakovenkodenis commented Dec 20, 2016

I'm trying to run the demo following the instructions in readme, however, when I run the command

python ./tools/demo.py --model ./lib/pretrained/VGGnet_fast_rcnn_iter_70000.ckpt

I get the error below:

➜ Faster-RCNN_TF git:(master) ✗ python ./tools/demo.py --model ./lib/pretrained/VGGnet_fast_rcnn_iter_70000.ckpt
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally
Traceback (most recent call last):
File "./tools/demo.py", line 11, in
from networks.factory import get_network
File "/home/denis/WEB/DeepLearning/Faster-RCNN_TF/tools/../lib/networks/init.py", line 8, in
from .VGGnet_train import VGGnet_train
File "/home/denis/WEB/DeepLearning/Faster-RCNN_TF/tools/../lib/networks/VGGnet_train.py", line 2, in
from networks.network import Network
File "/home/denis/WEB/DeepLearning/Faster-RCNN_TF/tools/../lib/networks/network.py", line 3, in
import roi_pooling_layer.roi_pooling_op as roi_pool_op
File "/home/denis/WEB/DeepLearning/Faster-RCNN_TF/tools/../lib/roi_pooling_layer/roi_pooling_op.py", line 5, in
_roi_pooling_module = tf.load_op_library(filename)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/load_library.py", line 64, in load_op_library
None, None, error_msg, error_code)
tensorflow.python.framework.errors_impl.NotFoundError: /home/denis/WEB/DeepLearning/Faster-RCNN_TF/tools/../lib/roi_pooling_layer/roi_pooling.so: undefined symbol: _ZN10tensorflow7strings6StrCatB5cxx11ERKNS0_8AlphaNumE


CUDA: 8.0
CuDNN: 5
Python: 2.7.12
Tensorflow: 0.12.0-rc1
GPU: NVidia GeForce 750M (sm_30 architecture)

Due to my setup above, I modified CUDA_PATH in make.sh file to be like this:

CUDA_PATH=/usr/local/cuda-8.0/

and the nvcc instruction to be like this:

	nvcc -std=c++11 -c -o roi_pooling_op.cu.o roi_pooling_op_gpu.cu.cc \
		-I $TF_INC -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC $CXXFLAGS \
		-arch=sm_30

Am I doing something wrong?

Could you please help me with running the demo properly?

@civilman628
Copy link

update g++ line as below: (add -D_GLIBCXX_USE_CXX11_ABI=0 )

g++ -std=c++11 -shared -o roi_pooling.so roi_pooling_op.cc \
	roi_pooling_op.cu.o -I $TF_INC  -D GOOGLE_CUDA=1 -fPIC $CXXFLAGS  -D_GLIBCXX_USE_CXX11_ABI=0 \
	-lcudart -L $CUDA_PATH/lib64

@civilman628
Copy link

and re-run make

@yakovenkodenis
Copy link
Author

@civilman628 Thank you, that worked perfectly!

@mathetes87
Copy link

@civilman628 in what file should I add that argument?

@mathetes87
Copy link

Found it: make.sh file in lib folder

@mathetes87
Copy link

But now I get this error:

g++: error: roi_pooling_op.cc: No such file or directory
g++: error: roi_pooling_op.cu.o: No such file or directory

Running make without @civilman628 's code it finishes without issues

@mathetes87
Copy link

Nevermind, I was mixing roi_pooling_op section with psroi_pooling_op...

@showaichuan
Copy link

@mathetes87 Hi, I got the same problem ,so how did you solve this issue at last?

@mathetes87
Copy link

mathetes87 commented Apr 18, 2017

@showaichuan If you look in the file make.sh, there are 2 sections, one for roi_pooling_op and one for psroi_pooling_op. My error was that I was editing the wrong one. Try looking very carefully so as to edit only the one corresponding to roi_pooling_op

@tp227
Copy link

tp227 commented May 11, 2017

@civilman628 thank you very much! I run the demo.py successfully!

@WLpub
Copy link

WLpub commented May 14, 2017

@civilman628 thank you very much!

@zdm123
Copy link

zdm123 commented Sep 18, 2017

@civilman628 Hi, I added "-D_GLIBCXX_USE_CXX11_ABI=0" as you said. But still have the same problem. How can fix it?

@jakeoung
Copy link

Me too. Same problem..

@tpatel0409
Copy link

Yeah, Even I faced the same problem, adding the extra argument in g++ is not helping.
I am using intel core i7 4th gen CPU and I don't have graphic card installed.

I tried adding up the same flag in g++ in the else branch in make.sh but still does not help.
Thanks

@aiqu
Copy link

aiqu commented Nov 29, 2017

tensorflow/tensorflow#13607

It might help

@danaodai
Copy link

danaodai commented Feb 1, 2018

but my make.sh file has no psroi_pooling_op section。so how to sovle the problem?

@UpCoder
Copy link

UpCoder commented Mar 5, 2018

@civilman628 Thanks, It works for me!
Tensorflow: 1.3.0
TITAN X -arch=sm_52
and add -D_GLIBCXX_USE_CXX11_ABI=0

@JiteshPshah
Copy link

no matter what tensorflow you have, what gcc you this will work :
follow this link: http://windstop.tistory.com/155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests