laoreja / HPLFlowNet

Code for our CVPR 2019 paper, HPLFlowNet: Hierarchical Permutohedral Lattice FlowNet for Scene Flow Estimation on Large-scale Point Clouds.
GNU General Public License v3.0
101 stars 9 forks source link

ImportError: user/HPLFlowNet/models/_khash_ffi.cpython-35m-x86_64-linux-gnu.so: failed to map segment from shared object #16

Closed ameyskulkarni closed 4 years ago

ameyskulkarni commented 4 years ago

Hello @laoreja I am really interested in this project and hence was trying it out. I could not run the training because of the following error - When I run python3 main.py configs/train_ours.yaml I get

Traceback (most recent call last): File "main.py", line 16, in import transforms File "/amey/amey_projects/HPLFlowNet/transforms/init.py", line 1, in from .transforms import * File "/amey/amey_projects/HPLFlowNet/transforms/transforms.py", line 18, in import _khash_ffi ImportError: /amey/amey_projects/HPLFlowNet/models/_khash_ffi.cpython-35m-x86_64-linux-gnu.so: failed to map segment from shared object

Also I wanted to confirm if the results for building khash are correct. When I run python3 build_khash_cffi.py , I get

generating ./_khash_ffi.c (already up-to-date) the current directory is '/amey/amey_projects/HPLFlowNet/models' running build_ext building '_khash_ffi' extension x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c _khash_ffi.c -o ./_khash_ffi.o x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 ./_khash_ffi.o -o ./_khash_ffi.cpython-35m-x86_64-linux-gnu.so

Is this output correct? Or something more is required? Also please let me know what do you think is the error and how to rectify it. When I searched online, I noticed that there might be permissions issues to run these files. Hence I have already given executable permissions to the files. I still am getting the same error.

I am using a docker environment so that I dont mess up my system while satisfying the requirements of this package. System specs - Ubuntu 16.04, Python 3.5.2, cuda 9.0, Installed the rest of the packages using the links you provided.

Thanks

ameyskulkarni commented 4 years ago

Solved this issue. It was a permissions problem. I was using this repo with a docker. The trick is to download the repository in the docker itself. Do not mount the repository to the docker. Only mount the 3D reconstructed dataset to the docker and download this repository separately to another folder inside the docker.