Coder Social home page Coder Social logo

Importing Pyredner outside build folder about redner HOT 27 CLOSED

 avatar commented on July 22, 2024
Importing Pyredner outside build folder

from redner.

Comments (27)

abhinavvs avatar abhinavvs commented on July 22, 2024 1

Ok. Now the installation went fine (after I turned off the above mentioned embree flags). But I still get the same error.

ImportError: libembree3.so.3: cannot open shared object file: No such file or directory

I just checked that "libembree3.so.3" is there in /usr/local/lib.
However LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64.

Is this the issue? If so, how do i fix it?

[Edit]: Yes, this was the only problem. Once I added the path where EMBREE library was to the LD_LIBRARY_PATH, everything works smoothly.

Thanks a lot for all your help with this issue..!!

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

The error message is complaining that it cannot find Embree. Copy libembree3.so.3 to a directory in LD_LIBRARY_PATH or install embree.

from redner.

 avatar commented on July 22, 2024

Hi,

I copied libembree3.so.3 to LD_LIBRARY_PATH, and then I received a similar error for optix prime. I repeated the same step for liboptix_prime.so.1, and then when I tried to import pyredner from outside the build folder, I received the following error:

import pyredner
Traceback (most recent call last):
File "", line 1, in
File "/home/abhinav/redner/pyredner/init.py", line 9, in
from .render_pytorch import *
File "/home/abhinav/redner/pyredner/render_pytorch.py", line 4, in
import redner
ImportError: /usr/local/cuda-10.0/lib64/libembree3.so.3: undefined symbol: _ZN3tbb10interface78internal15task_arena_base24internal_max_concurrencyEPKNS0_10task_arenaE

Note that I have set the path for embree in my FindEmbree.CMake file to:
set(EMBREE_LIBRARY "/home/abhinav/embree-3.5.0.x86_64.linux/lib/libembree3.so.3")
set(EMBREE_INCLUDE_PATH "/home/abhinav/embree-3.5.0.x86_64.linux/include/")

Do you know what is causing the error, and why does import pyredner work specifically under the build folder of redner? Thank you!

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

The prebuilt Embree binary requires tbb (Intel's multithreading library). This is complaining that it couldn't find a function in tbb. If you are using Ubuntu, maybe try "sudo apt-get install libtbb-dev".

from redner.

 avatar commented on July 22, 2024

Hi,

I ran the command successfully, but I am still getting the same error. Any other thoughts? Thanks!

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

Can you compile/run any embree examples/tests/tutorials?

from redner.

 avatar commented on July 22, 2024

I can and have run a tutorial, but I must launch Python in the build folder of redner.

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

Not my code. Can you run the tutorials in Embree?
https://github.com/embree/embree/tree/master/tutorials

from redner.

 avatar commented on July 22, 2024

I was able to successfully compile Embree using ccmake .., but I still received the error. Any other suggestions?

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

Well, can you run the Embree tutorials?
Build some projects here
https://github.com/embree/embree/tree/master/tutorials
can you run them?

from redner.

 avatar commented on July 22, 2024

Sorry for my lack of understanding, but how do I run let's say the triangle_geometry tutorial? Do I make the triangle_geometry.cpp file an executable under that directory and run that with ./? For I receive an error when trying to make it an executable. Thank you!

from redner.

abhinavvs avatar abhinavvs commented on July 22, 2024

Hi,
I have been trying to install redner (with CUDA support) on my GPU. I am having similar problems as those raised in this issue. I followed the instructions exactly as given on the wiki. The "make install" command ran without any errors.

I was wondering if we need to install embree separately, or does the installation of redner automatically takes care of that?

Any help will be much appreciated. Thank you in advance!

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

What exactly is the problem? In theory the installation now automatically installs Embree as well but I'm not sure if I've written a robust installation script.

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

Ok turns out I didn't. I think I just fixed it. Can you pull from the latest commit and try again?

from redner.

abhinavvs avatar abhinavvs commented on July 22, 2024

Thank you for checking it. I pulled again from the latest commit. Then went over the installation steps again (which happened without any issues). However I get the same error when I try to execute one of the tutorials:

[Traceback](most recent call last):
File "01_optimize_single_triangle.py", line 2, in
import pyredner
File "/home/abhinav/anaconda3/lib/python3.7/site-packages/pyredner/init.py", line 2, in
from .camera import *
File "/home/abhinav/anaconda3/lib/python3.7/site-packages/pyredner/camera.py", line 4, in
import redner
ImportError: libembree3.so.3: cannot open shared object file: No such file or directory

However, I am able to run the tutorials from within the "build" folder. My system configuration:

  • Linux OS
  • CUDA 10
  • OptiX 5.1
  • Python 3.7

I had previously tried installing embree independently (for redner) but am not sure if I did that right either. I am relatively new to ray tracing softwares. So haven't done any of this before.

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

Can you remove your embree installation and try again?

from redner.

abhinavvs avatar abhinavvs commented on July 22, 2024

Should i simply just delete the embree folder (which i installed previously)? or is there a way to uninstall embree?

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

It depends on how you installed it. You should remove libembree.so and the embree3 include directory. My guess is they are located at /usr/local/lib and /usr/local/include

from redner.

abhinavvs avatar abhinavvs commented on July 22, 2024

There are 3 embree related files in /usr/local/lib:
"libembree3.so", "libembree3.so.3", and "libembree.3.so.3.4.0". Should I remove them all?

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

Yes

from redner.

abhinavvs avatar abhinavvs commented on July 22, 2024

Ok. I did that. "make install -j 8" threw an error after about 33% completion:

[ 33%] Building NVCC (Device) object CMakeFiles/redner.dir/redner_generated_pathtracer.cpp.o
In file included from /home/abhinav/redner/primary_contribution.cpp:2:0:
/home/abhinav/redner/scene.h:16:10: fatal error: embree3/rtcore.h: No such file or directory
#include <embree3/rtcore.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
CMake Error at redner_generated_primary_contribution.cpp.o.cmake:219 (message):
Error generating
/home/abhinav/redner/build/CMakeFiles/redner.dir//./redner_generated_primary_contribution.cpp.o
CMakeFiles/redner.dir/build.make:3243: recipe for target 'CMakeFiles/redner.dir/redner_generated_primary_contribution.cpp.o' failed
make[2]: *** [CMakeFiles/redner.dir/redner_generated_primary_contribution.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/abhinav/redner/envmap.cpp:2:0:
/home/abhinav/redner/scene.h:16:10: fatal error: embree3/rtcore.h: No such file or directory
#include <embree3/rtcore.h>
^~~~~~~~~~~~~~~~~~
.
.
.
^~~~~~~~~~~~~~~~~~
compilation terminated.
CMake Error at redner_generated_pathtracer.cpp.o.cmake:219 (message):
Error generating
/home/abhinav/redner/build/CMakeFiles/redner.dir//./redner_generated_pathtracer.cpp.o
CMakeFiles/redner.dir/build.make:2909: recipe for target 'CMakeFiles/redner.dir/redner_generated_pathtracer.cpp.o' failed
make[2]: *** [CMakeFiles/redner.dir/redner_generated_pathtracer.cpp.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/redner.dir/all' failed
make[1]: *** [CMakeFiles/redner.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

I can paste in the full error message if needed.

from redner.

abhinavvs avatar abhinavvs commented on July 22, 2024

Ok, so I deleted the build folder and try to build and install again. I faced the following errors when I tried to build (configure in ccmake):

Embree not found in the system. Building from scratch.
CMake Error at embree/common/cmake/ispc.cmake:54 (MESSAGE):
Intel SPMD Compiler (ISPC) not found. Disable EMBREE_ISPC_SUPPORT or
install ISPC.
Call Stack (most recent call first):
embree/CMakeLists.txt:396 (INCLUDE)

I remember this happening in the previous installation as well. Then I turned OFF the EMBREE_ISPC_SUPPORT flag using ccmake and then built (which seemed to work then).

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

Cool. The error is expected since ispc is not installed. We do not use any ispc-related features in Embree, so it is fine. You may also need to turn off EMBREE_TUTORIAL.

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

Yay!

from redner.

abhinavvs avatar abhinavvs commented on July 22, 2024

So, I have another question (unrelated to this issue).

I have installed redner without tensorflow support (currently have only PyTorch installed in the system). But if I want to start using the tensorflow version, would I have to redo the installation from scratch after pulling from newer commits, i.e. configure, generate and the make install?
This in fact applies to any of the newer functionalities introduced.

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

In theory you only need to make install again. Let me know if it doesn't work.

from redner.

BachiLi avatar BachiLi commented on July 22, 2024

I suppose I can close this issue now. For those who have similar issues, checkout your LD_LIBRARY_PATH. Feel free to reopen if you have other issues.

from redner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.