file not generated

I tried to run an Optix program on an Ubuntu instance with NVIDIA Tesla P4 attached.
The program was compiled with Cuda 11 and Optix6.5. with NVRTC tunred off.

terminate called after throwing an instance of ‘optix::Exception’
what(): Couldn’t open source file /home/ravi/build/lib/ptx/IRay/ray/
Aborted (core dumped)

Contents of build/lib/ptx has indeed has these files. Why is executable looking in a strange path.
ravi@ray:~/build/lib/ptx$ ls

Hi @ravi_saripalli,

There isn’t quite enough information here for us to help you. What program are you trying to run? Have you checked the source to see how it’s looking for ptx files? Is there a reason you know that “IRay” might be getting used in the path? Incidentally it may help to share which driver version you’re using.


Thanks David for trying to help me. I figured it out now. When creating programs the ptx string generation call requires directory string. The cuda/optix files I was compiling are under “ray” sub directory under IRay where my CMakeLists.txt exists. There executable target in it is “rat”. It looks like one has to set the DirPath to this target name and everything worked as it should. b.t.w. I don’t use the convenient function to make examples at the top level CMakeLists.txt.

I now know most of the logic related to generated files names is in the "sutil.cpp "file. That helped me a lot. Also, I have turned off the NVRTC intentionally to simplify my “CMakeLists.txt”. Also, I am quite happy to recompile if hardware changes.