Strange Error!

Greetings,

I’m sure I’m missing something simple, but since upgrading to the Optix SDK 8.0 and upgrading to cuda 7.5, my code (and the sample sdk) does not run after I compile it,

the program shows the following error:

OptiX Error: Invalid value (Details: Function “_rtContextCompile” caught exception: Unmatchable PTX instruction while compiling function: _Z19traverse_geometry_3v_5:add at (1707), [1049199])

however, the pre-built SDK works fine.

Any ideas? racking my brain and pulling my hair out here…

Update:

This is the latest error I get from just running the cook demo (which I’ve compiled)

OptiX Error: Invalid value (Details: Function “_rtContextCompile” caught exception: Unmatchable PTX instruction while compiling function: _Z9intersecti_0:mad.lo at (3999), [1049199])

The CUDA 7.5 toolkit is not supported by OptiX 3.8.0 as stated in its Release Notes.
Use CUDA 7.0 or 6.5 instead in your OptiX 3.8.0 development environment.

Ahk, I’ll try using the 7.0 cuda toolkit.

Unfortunately this still doesn’t work, it now throws an unknown error when it launches the context.

OptiX Error: Unknown error (Details: Function “_rtContextLaunch2D” caught exception: Encountered a CUDA error: result returned (716): Unknown, [6619204])

My system uses a gtx980 graphics chipset.

The CUDA 7.0 error 716 is CUDA_ERROR_MISALIGNED_ADDRESS (see cuda.h inside the toolkit’s include folder.)

There is no real chance to analyze this further without reproducer.
What you could do to isolate this more is:

  • Enable all OptiX exceptions and implement an exception program for all your entry points which dumps possible errors. For example enable OptiX printfs on all launch indices and print out the error code inside the exception program.
    I posted some code for that before: [url]https://devtalk.nvidia.com/default/topic/872080/nested-rttrace-does-not-return-/?offset=2#4656683[/url]
    Check if there is any exception, especially out of bounds buffer accesses. If yes, find and fix that.
  • Try different acceleration structure builders. I normally start coding with BVH and then use others as the app requires.
  • Make sure you do not inadvertently use a pre-defined “vertex_buffer” or “index_buffer” name with a different format than possibly interpreted by the acceleration structure builder. Use a different name or make sure you match what’s understood as triangles. (See OptiX programming guide on AS builder.)
  • Do not use any debug option when compiling the CUDA code to PTX. There should be no -g or -G option in the nvcc command line.
  • Check if your code contains any double floating point values. Use floats instead. Use the nvcc command line option --use_fast_math