I’m trying to use the curand library to create random numbers inside an optix program. Running a test program seems to show that curand_init fails when subsequence and offset are not zero.
The program does this (it’s basically just a kernel, despite the slightly different syntax)
RT_PROGRAM void set_random_state()
curand_init(0, 0, 0, &random_state_buffer[launch_index]);
rtPrintf("%d %d %d : %f\n", launch_index.x, launch_index.y, launch_index.z, curand_uniform(&random_state_buffer[launch_index]));
This code runs fine and the printf calls prints out the random number. If I change the call to curand_init to
curand_init(0, 1, 0, &random_state_buffer[launch_index]);
There is no output, which I believe means that the kernel died.
Any ideas as to what I’m doing wrong or if it’s a bug?
The system is a gtx690 running under debian linux with cuda 5 and optix 3, driver 313.30