PointNet++ ext_op cannot be loaded
Created by: jb892
Background info
- OS version: Ubuntu 20.04
- Paddle version: paddlepaddle-gpu 1.8.1.post107
Issue
Hi,
I'm trying to run pointnet++ on my PC. I have compiled the pointnet_lib.so and added the path into the LD_LIBRARY_PATH. However, I'm not able to load the so file when running the test script. The error msg is listed down below:
W0621 23:53:27.860921 21639 dynamic_loader.cc:120] Can not find library: /home/jake/Documents/paddle/pointnet2_paddle/ext_op/src/pointnet_lib.so. The process maybe hang. Please try to add the lib path to LD_LIBRARY_PATH.
Traceback (most recent call last):
File "tests/test_farthest_point_sampling_op.py", line 20, in <module>
import pointnet_lib
File "/home/jake/Documents/paddle/pointnet2_paddle/ext_op/pointnet_lib.py", line 19, in <module>
fluid.load_op_library(os.path.join(file_dir, 'src/pointnet_lib.so'))
File "/home/jake/anaconda3/envs/paddle-dev/lib/python3.7/site-packages/paddle/fluid/framework.py", line 5162, in load_op_library
core.load_op_library(lib_filename)
paddle.fluid.core_avx.EnforceNotMet:
--------------------------------------------
C++ Call Stacks (More useful to developers):
--------------------------------------------
0 std::string paddle::platform::GetTraceBackString<char const*>(char const*&&, char const*, int)
1 paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int)
2 paddle::platform::dynload::GetOpDsoHandle(std::string const&)
3 paddle::framework::LoadOpLib(std::string const&)
----------------------
Error Message Summary:
----------------------
Error: Failed to find dynamic library: /home/jake/Documents/paddle/pointnet2_paddle/ext_op/src/pointnet_lib.so ( /home/jake/Documents/paddle/pointnet2_paddle/ext_op/src/pointnet_lib.so: undefined symbol: _ZNK6paddle9framework12OperatorBase13DebugStringExB5cxx11EPKNS0_5ScopeE )
Please specify its path correctly using following ways:
Method. set environment variable LD_LIBRARY_PATH on Linux or DYLD_LIBRARY_PATH on Mac OS.
For instance, issue command: export LD_LIBRARY_PATH=...
Note: After Mac OS 10.11, using the DYLD_LIBRARY_PATH is impossible unless System Integrity Protection (SIP) is disabled. at (/paddle/paddle/fluid/platform/dynload/dynamic_loader.cc:177)
Seems like there is a linking error with the c++ lib. The compiled pointnet_lib.so
is inside the src folder.
drwxrwxr-x 2 jake jake 4096 6月 21 23:10 ./
drwxrwxr-x 5 jake jake 4096 6月 21 22:44 ../
-rw-rw-r-- 1 jake jake 2502 6月 13 00:14 farthest_point_sampling_op.cc
-rw-rw-r-- 1 jake jake 5366 6月 13 00:14 farthest_point_sampling_op.cu
-rw-rw-r-- 1 jake jake 4251 6月 13 00:14 gather_point_op.cc
-rw-rw-r-- 1 jake jake 4800 6月 13 00:14 gather_point_op.cu
-rw-rw-r-- 1 jake jake 4531 6月 13 00:14 group_points_op.cc
-rw-rw-r-- 1 jake jake 5448 6月 13 00:14 group_points_op.cu
-rw-rw-r-- 1 jake jake 1054 6月 13 00:14 make.sh
-rwxrwxr-x 1 jake jake 16741600 6月 21 23:10 pointnet_lib.so*
-rw-rw-r-- 1 jake jake 3292 6月 13 00:14 query_ball_op.cc
-rw-rw-r-- 1 jake jake 4097 6月 13 00:14 query_ball_op.cu
-rw-rw-r-- 1 jake jake 5258 6月 13 00:14 three_interp_op.cc
-rw-rw-r-- 1 jake jake 5817 6月 13 00:14 three_interp_op.cu
-rw-rw-r-- 1 jake jake 3576 6月 13 00:14 three_nn_op.cc
-rw-rw-r-- 1 jake jake 4074 6月 13 00:14 three_nn_op.cu
-rw-rw-r-- 1 jake jake 810 6月 13 00:14 util.cu.h
(paddle-dev) jake@jake-pc:~/Documents/paddle/pointnet2_paddle/ext_op/src$
Please help, thx!