Sorry everyone, I just found that I made an obvious mistake. The problem comes from invalid include files of optix.
Original Post
I had Optix 4.0 and CUDA 7.5.17 installed in redhat linux. When I run Context::Launch, the runtime failed to compile PTX files for me. I had tried to comment out some of the PTX instruction but the problem seemed to expand further, I encountered the same exception on multiple PTX routines. Here are the exceptions I got from different places:
HERE 2
terminate called after throwing an instance of ‘optix::Exception’
what(): Invalid value (Details: Function “RTresult _rtContextCompile(RTcontext)” caught exception: Unmatchable PTX instruction while compiling function: _Z7PO_Freqv_0:add at (1707), [1049199])
Aborted (core dumped)
HERE 2
terminate called after throwing an instance of ‘optix::Exception’
what(): Invalid value (Details: Function “RTresult _rtContextCompile(RTcontext)” caught exception: Unmatchable PTX instruction while compiling function: _Z18intersectSecondaryv_0:add at (1707), [1049199])
Aborted (core dumped)
HERE 2
terminate called after throwing an instance of ‘optix::Exception’
what(): Invalid value (Details: Function “RTresult _rtContextCompile(RTcontext)” caught exception: Unmatchable PTX instruction while compiling function: _Z16intersectPrimaryv_0:add at (1707), [1049199])
Aborted (core dumped)
HERE 2
terminate called after throwing an instance of ‘optix::Exception’
what(): Invalid value (Details: Function “RTresult _rtContextCompile(RTcontext)” caught exception: Unmatchable PTX instruction while compiling function: _Z14mesh_intersecti_0:mad.wide at (3936), [1049199])
Aborted (core dumped)
HERE 2
terminate called after throwing an instance of ‘optix::Exception’
what(): Invalid value (Details: Function “RTresult _rtContextCompile(RTcontext)” caught exception: Unmatchable PTX instruction while compiling function: _Z14mesh_intersecti_0:add at (1707), [1049199])
Aborted (core dumped)
The Optix SDK Samples compiled and ran correctly. Any suggestion for this situation? Thanks in advance.