Hello,
I’m currently working on a python project which does calculations on meshes using the trimesh library and I wanted to test out the triro module (GitHub - lcp29/trimesh-ray-optix: Triro - An in-place replacement for trimesh.ray in OptiX) which uses Optix to speed parts up. But I’m having problems where the module can’t initialize Optix in the first place. So right now I’m trying to at least confirm that Optix can run on my system.
I have an RTX3070, and am using Arch Linux, running in a Wayland environment, with the nvidia-open drivers (version 580.95.05-9 currently), and have CUDA installed as well (V13.0). I downloaded the SDK, went through the steps outlined in the linux install document and updated the architecture to use sm_86 instead of sm_50 (I also tried just removing references to -arch flags in general as I read that if not included, it will decide on it’s which to use in case the sm_86 flag is not correct).
In case this is important for later on, I had turned off the GLFW build options (GLFW_BUILD_EXAMPLES, GLFW_BUILD_TESTS, GLFW_BUILD_WAYLAND, and GLFW_BUILD_X11) because there would always be a configuration error that occurs if those were turned on. GLFW_INSTALL was left on. I then proceeded to make everything.
It would fail after building most of the samples. I have included the error message where it stops below:
[ 80%] Building CXX object optixOpticalFlow/CMakeFiles/optixOpticalFlow.dir/optixOpticalFlow.cpp.o
In file included from /opt/optix/SDK/optixOpticalFlow/optixOpticalFlow.cpp:33:
/opt/optix/SDK/optixOpticalFlow/optixOpticalFlow.cpp: In function ‘int32_t main(int32_t, char**)’:
/opt/optix/SDK/optixOpticalFlow/optixOpticalFlow.cpp:178:45: error: too few arguments to function ‘CUresult cuCtxCreate_v4(CUctx_st**, CUctxCreateParams*, unsigned int, CUdevice)’
178 | CUDA_CHECK( (cudaError_t)cuCtxCreate( &cuCtx, 0, 0 ) );
/opt/optix/SDK/sutil/Exception.h:113:48: note: in definition of macro ‘CUDA_CHECK’
113 | #define CUDA_CHECK( call ) ::sutil::cudaCheck( call, #call, __FILE__, __LINE__ )
| ^~~~
In file included from /opt/optix/include/optix_host.h:40,
from /opt/optix/include/optix.h:34,
from /opt/optix/SDK/optixOpticalFlow/optixOpticalFlow.cpp:32:
/opt/cuda/include/cuda.h:90:45: note: declared here
90 | #define cuCtxCreate cuCtxCreate_v4
| ^~~~~~~~~~~~~~
/opt/cuda/include/cuda.h:6275:18: note: in expansion of macro ‘cuCtxCreate’
6275 | CUresult CUDAAPI cuCtxCreate(CUcontext *pctx, CUctxCreateParams *ctxCreateParams, unsigned int flags, CUdevice dev);
| ^~~~~~~~~~~
make[2]: *** [optixOpticalFlow/CMakeFiles/optixOpticalFlow.dir/build.make:325: optixOpticalFlow/CMakeFiles/optixOpticalFlow.dir/optixOpticalFlow.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1804: optixOpticalFlow/CMakeFiles/optixOpticalFlow.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Since the error outlined is a missing argument in the .cpp file, I would think that other samples that have built should work fine and at least for now, I don’t think I need to dig into the above error to try and fix it. I tried running OptixHello and a few other samples in the bin folder and they seem to work until the very end where they just return the following error:
GLFW Error 65550: This binary only supports the Null platform
Caught exception: Failed to initialize GLFW
So I have the following questions:
It seems that at least when running the built samples, it runs as expected and I think it’s failing at the end when it would show the final results and it tries to create a new window to display. Is this correct? And if it is correct, is it safe to ignore this issue if I just need Optix to perform calculations but don’t need to render results (at least using the GLFW)?
Any help is appreciated and thank you in advance.
-Peter