Dear all,
I can’t find a reason of the message:
OptiX Error: Invalid value (Details: Function "_rtContextLaunch2D" caught exception: Error in rtPrintf format string: "", [7995426])
Hystory:
From sample5pp I created a very simple application consisting of the only sample5pp.cpp and pinhole_camera.cu.
Extract from sample5pp.cpp:
int polarization = 2;
context["polarization"]->setInt(polarization);
File pinhole_camera.cu:
#include <optix_world.h>
using namespace optix;
rtDeclareVariable(int, polarization, , );
RT_PROGRAM void pinhole_camera()
{
//int polarization = 3; // or = 2; it is LINE_B
double I = 0.0, Iup = 1.0, Idown = 1.0, del1 = 0.0, del2 = 0.0, shift = 0.0;
if (polarization != 3)
{
;
}
else
{
I += 2.0 * (1.0 + cos(shift)); // LINE_A
rtPrintf("E I %f Iup %f Idown %f shift %f del1 %f del2 %f\n", I, Iup, Idown, shift, del1, del2);
}
rtPrintf("E I %f Iup %f Idown %f shift %f del1 %f del2 %f\n", I, Iup, Idown, shift, del1, del2);
rtPrintf("E I %f Iup %f Idown %f shift %f del1 %f del2 %f\n", I, Iup, Idown, shift, del1, del2);
}
Remarks:
- That message arises independetly on a value of polarization ( 2 or 3 ).
- If I comment the line LINE_A - this message is absent
- if I uncomment the line LINE_B - this message is absent
- If rtPrintf’s fmt contains “%lf” instead of “%f” - the same result.
Where my mistake?
My configuration:
Win 8.1, x64, VS2013, GeForce GT 650M, OptiX 7.0 (final), CUDA 6.5