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

ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory #4

Open
hhf-hd opened this issue May 29, 2020 · 10 comments

Comments

@hhf-hd
Copy link

hhf-hd commented May 29, 2020

I have encountered such a mistake:

Traceback (most recent call last):
File "main.py", line 6, in
from models.losses import chamfer_distance
File "/home/lab505/gpu_point2mesh/models/losses.py", line 3, in
from pytorch3d.structures.pointclouds import Pointclouds
File "/home/lab505/anaconda3/envs/p2m/lib/python3.8/site-packages/pytorch3d/structures/init.py", line 4, in
from .pointclouds import Pointclouds
File "/home/lab505/anaconda3/envs/p2m/lib/python3.8/site-packages/pytorch3d/structures/pointclouds.py", line 5, in
from .. import ops
File "/home/lab505/anaconda3/envs/p2m/lib/python3.8/site-packages/pytorch3d/ops/init.py", line 5, in
from .graph_conv import GraphConv
File "/home/lab505/anaconda3/envs/p2m/lib/python3.8/site-packages/pytorch3d/ops/graph_conv.py", line 6, in
from pytorch3d import _C
ImportError: libtorch_cpu.so: cannot open shared object file: No such file or directory

here is my configure:
cudatoolkit 10.1.243
pytorch 1.4.0 py3.8_cuda10.1.243_cudnn7.6.3_0
pytorch3d 0.2.0

but after i use another configure :
pytorch 1.5.0 py3.8_cpu_0 [cpuonly]
pytorch3d 0.2.0 pypi_0
it works,but it's too slow ,so i wonder if your code are running on GPU?
look forword to your help,thanks !

@ranahanocka
Copy link
Owner

Hi @hhf-hd ,

It seems that the environment was not properly installed for some reason. Yes, this code uses GPU by default (if it exists).

Did you install the environment via conda env create -f environment.yml ? If not, please try using this method first.

If the above still did not work, try running these commands:
python -c "import torch; print(torch.cuda.is_available())"
python -c "import torch; print(torch.version.cuda)"

and let me know what is the output. Cuda should be available, and use version 10.1 .

-Rana

@ZhiboRao
Copy link

Hello,
I have run this code too. if It uses CPU, it can work. However, if I use GPU, it can't work. I install the cuda 10.1. And I found that if my pytorch.cuda.is_available() is Ture, I can't import pytorch3D. If I reinstall pytorch3D, my pytorch.cuda.is_available() is False.
image
image
image

@ZhiboRao
Copy link

image

@ranahanocka
Copy link
Owner

Hi @RaoHaocheng ,

So it seems the issue is with the pytorch3D installation (there is no cuda...). Are you using a windows machine? Maybe you can try the steps listed here: facebookresearch/pytorch3d#172 (comment)

@ranahanocka
Copy link
Owner

@RaoHaocheng Also, you might want to try with PyTorch 1.4 instead of 1.5 (it seems that 1.5 might require cuda 10.2?). Did you try installation from the conda env like written in the README?

@ZhiboRao
Copy link

ZhiboRao commented Jun 1, 2020

@ranahanocka, Thanks for you. I have run it successfully on GPUs. I found that the problem caused by CUDA on the system. My CUDA on the system is 9.2. However, my CUDA on the Conda is 10.1, which causes pytorch3d can't run. So I change the CUDA on the Conda to 9.2. And I install Pytorch3d of CUDA 9.2, which can be found in https://anaconda.org/pytorch3d/pytorch3d/files. So my config is
image
Uploading image.png…
Screenshot of successful running:
image

@ZhiboRao
Copy link

ZhiboRao commented Jun 1, 2020

image

image

image

@hhf-hd
Copy link
Author

hhf-hd commented Jun 13, 2020

thanks for you reply!
this is a impressive work~
i wonder if your had compared your method with other method such as Poisson reconstruction on a ideal pointcloud set,and what's your maximum resolutions of mesh and the maximum number of pointcloud that your have dealt with ,since when i set max-faces as 100000,it will run out of GPU memory with a 1080Ti when faces is about 30000
look forword to your reply!

@ranahanocka
Copy link
Owner

ranahanocka commented Jun 14, 2020

Hi @hhf-hd ,

Yes, we did compare to Poisson reconstruction (you can see the details in the paper). In general, Poisson reconstruction is probably the most common technique for surface reconstruction, which incorporates some type of smoothness prior. Where as here we use a "self-prior".

In theory, a large number of faces is possible, but will require splitting the mesh into more than 8 parts. I think the largest we tried was 80k faces.
If you are running out of memory, you can increase the # of parts here

lookup_num_parts = [1, 2, 4, 8]

@xufengfan96
Copy link

Hi,@ranahanocka.
Your work is great and I try to make it. But I meet the same problem about the gpu memory.I want to know the parameters about your GPU.And one more thing I noticed that in the chapter 5.You compared the model with noisy ,inaccurate normals and low density completion in poisson and yours.It really work well in real scan.But how about using a pointcloud set with accuracate normals and uniform x,y,z coordinate?

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

4 participants