With the experimental support for CUDA on WSL out I was wondering if Optix is also able to run on WSL. I tried a sample project earlier but was not able to get it to run. Although I am still not sure if I did it right ;)
So should I even bother trying to get it to run or is Optix not yet supported?
I haven’t heard of anyone on the team even trying OptiX on WSL yet, but we’d certainly like to support it officially as soon as CUDA on WSL is official.
What is the issue you ran into? Maybe the fix is easy… fingers crossed. Were you able to build the OptiX sample in WSL? Are you able to build and run any of the CUDA SDK samples?
I just tried again. I also reinstalled CUDA because I couldn’t find its samples directory earlier. I am now on CUDA 11. Compiling and running the CUDA sample “BlackScholes” did work, it did recognize my GPU (showed “GPU Device 0: “Pascal” with compute ability 6.1”).
Now to OptiX: I tried the OptiX 7 SDK and after changing “sm_30” in the CMakeLists.txt file to “sm_35” it did compile (Probably because of CUDA 11?). But running “./optixHello” gave me Caught exception: OPTIX_ERROR_LIBRARY_NOT_FOUND: Optix call 'optixInit()' failed: /opt/optix7/NVIDIA-OptiX-SDK-7.0.0-linux64/SDK/optixHello/optixHello.cpp:125)
But I have not configured my system for X11 forwarding to Windows so maybe it just couldn’t display the window? Although the above was the only error message and it seems to be an OptiX problem.
Anyways, thanks for the quick reply!
Edit: ./optixHello -f test gave me the same error message. So probably not a “opening a window” problem…
Edit2: Retried OptiX SDK optixHello with CUDA 10.2, still the same error.
Yes some of the Optix libraries that are usually part of the native linux driver package and and needed for Optix 7.0 are not yet there for WSL (older versions of Optix might work without it). So these apps won’t run until they get added.
Thanks and sorry you ran into this, we will post an update when we will have more to share about this.
$ ./optixHello
[ 2][ ERROR]: Specified 0 as the CUDA context, but the current CUDA context could not be queried. (CUDA error string: initialization error, CUDA error code: 3)
Caught exception: OPTIX_ERROR_CUDA_NOT_INITIALIZED: Optix call 'optixDeviceContextCreate( cuCtx, &options, &context )' failed: /opt/optix7/NVIDIA-OptiX-SDK-7.0.0-linux64/SDK/optixHello/optixHello.cpp:129)
So as you said, rboissel, it seems some libraries are still missing. Thanks for the heads-up!
Yes you are running optix7. and this requires extra driver components that we haven’t yet added to the WSL driver package.
We will post an update when this gets added to WSL.
I am running Optix 6.5.0 and am having similar issues running on Ubuntu wsl. When running cuda 11.1 samples, everything works as expected. When I run optixHello I get:
“freeglt (./optixHello): failed to open display”
And when I run optixDeviceQuery I get:
“OptiX Error: A supported NVIDIA GPU could not be found”
Does anyone know if there’s any support or a work around to get OptiX working on wsl?
With OptiX 6.5.0 the issue would be exactly the same root cause as described above.
The OptiX core implementation for that also lives inside a display driver component and if that is not present inside this WSL environment, it’s not possible to run OptiX 6 or 7 based applications.
The “failed to open display” error from freeglut is a separate issue and would indicate that there is a problem with your display configuration and maybe the OpenGL implementation running.
Comming back to this old topic, I try to use VMD with OptiX on WSL 2 (Windows 10 21H2), and I guess it’s not working because of this driver issue you have mentioned. Is it still planed to add optiX to the Driver (currently on 510.06) ?
Thank you :)
Hi all, this is being worked on, but is still going to take some time before it is released, a few months at the very least. I’m sorry it’s taking so long (I want WSL OptiX too), and we’re glad there’s demand for this. We’ll make an announcement when it happens.
The reason I can’t get OptiX to run is that my official nvidia/cuda images cannot be made to include libnvoptix even when running with environment variable NVIDIA_DRIVER_CAPABILITIES=compute,graphics into a docker container.
The compilation goes just fine building the OptiX 7.4 SDK for me. Runtime is what kills it because NVIDIA in WSL2 doesn’t seem to have a mechanism for including OptiX in the image.
Running WSL2 Ubuntu 20 and tried to install the NVIDIA drivers for my P1000 laptop drive first on windows and then with the .run file on linux. I’m getting an error on the linux driver installation that no supported card is found even though I selected P1000 in the download driver section.
Also, I see people doing the linux drivers in a docker environment. Can this be done in raw WSL or do i need the docker?
Hello, I am currently trying to install deepstream on WLS2 but I keep getting the following issue:
“/sbin/ldconfig.real: Can’t link /usr/lib/wsl/lib/libnvoptix_loader.so.1 to libnvoptix.so.1
/sbin/ldconfig.real: /usr/lib/wsl/lib/libcuda.so.1 is not a symbolic link”