I was running all my code in Ubuntu(16.04) smoothly, then I ported the same code into windows 10 (driver : 471.41). Both with OptiX 6.5 and CUDA 10.1.
However, in windows I got this compile error and having been struck here over a few days.
Unknown error(Details: _rtProgramCreateFromPTXString"caught Exception: More than one use of a bound callable program variable (myfunctionName))found
I declared one function sampleAreaLight in area_light.cu file, and declared it as a program in host code
Program sampleAreaLightProgram = createProgram("lights/area_light.cu", "sample_area_light"); context["sampleAreaLight"]->set(sampleAreaLightProgram);
And then in another .cu file.
rtDeclareVariable( rtCallableProgramX<void(const IndependentSampler& sampler, float3&, float3&, float3&, float&)>, sampleAreaLight, , );
and then call the callableProgram sampleAreaLight in another function.
I tried to commened out all the callers and this exception is gone. However, when i call this function only once, it failed. (I thought it means i shouldn’t use this callable function more than once)
Could you point out my potential problems? And why it went smoothly in Ubuntu. Besides, I don’t see any rules about we cannot call the bound callablefunction more than once. Would changing to boundless callable help?