owl-project / NVISII

Apache License 2.0
327 stars 28 forks source link

Optix call (optixInit()) failed with code #107

Closed dgriffiths3 closed 3 years ago

dgriffiths3 commented 3 years ago

When trying to run a basic initialise example:

import nvisii

nvisii.initialize(headless=True)
nvisii.deinitialize()

I get the following error:

Optix call (optixInit()) failed with code 7804 (line 152)
terminate called after throwing an instance of 'std::system_error'
  what():  Resource deadlock avoided
Aborted

My setup is

OS: Ubuntu 16.04
Driver: 460.32.03
Python: 3.8.3 (Conda Env.)
Version: 1.1.72

I see 7804 is: OPTIX_ERROR_LIBRARY_NOT_FOUND = 7804, but from the github I see it comes with its own version of the optix library.

natevm commented 3 years ago

Hey @dgriffiths3 ,

The OptiX library comes with the system driver, so this appears at the moment to be an issue with your system’s driver installation. Nvisii links against the driver during runtime time pull in those Optix definitions, but will fail if the driver isn’t setup correctly.

Can you check to see if you have libnvoptix.so in /usr/lib/x86_64-linux-gnu/ on your system? (or similar location)

dgriffiths3 commented 3 years ago

Hi @n8vm thanks for the quick reply! No I am missing that file. It's on a remote cluster which was compiled with some dockerfile I didn't write. I will take a look into that thanks!

natevm commented 3 years ago

Ah, yeah, that's likely to be your issue then.

For what it's worth, this is a known issue with many docker setup scripts, where for some reason they only copy a subset of the driver into the docker image. We have an alternative docker setup script here which includes the full driver (including libnvoptix.so) which can be found here

Closing this issue for now, but feel free to open another if docker continues to give you issues!

taeyeopl commented 2 years ago

@natevm @dgriffiths3 I have the same problem. Currently, I have no files of /usr/lib/x86_64-linux-gnu/libnvoptix.so.1. Any tips would be welcome.

Q1. I wonder Can I download libnvoptix.so.1 only without reinstalling CUDA?? or Should I reinstall CUDA with Optix? (https://github.com/NVIDIA/nvidia-container-toolkit/issues/187)

This is my current setup. Ubuntu 18.04 Driver Version: 460.39
CUDA Version: 11.2

taeyeopl commented 2 years ago

Changing the Cuda version to 10.2 solved me. However, I still didn't clearly know why Cuda 11.2 is not working.

https://github.com/owl-project/NVISII/blob/34e7379781549a1871ffce1ab2f36fc90c1bec24/docker/Dockerfile#L1