I am trying to execute the following kernel with NVRTC:
#include <curand_kernel.h>
extern "C" __global__ void rngSetupStates(
curandState *rngState,
int device_id)
{
// determine global thread id
int tid = threadIdx.x + blockIdx.x * blockDim.x;
// Each threadblock gets different seed,
// Threads within a threadblock get different sequence numbers
curand_init(blockIdx.x + gridDim.x * device_id, threadIdx.x, 0, &rngState[tid]);
}
But everytime I try to execute the kernel, NVRTC tells me, that “stddef.h” cannot be opened:
/usr/include/stdlib.h(32): catastrophic error: cannot open source file “stddef.h”
and 1 catastrophic error detected in the compilation of “cuda_program”.
Compilation terminated.
I already tried to include ‘/usr/include/’ but it did not fix it. Can anybody tell me how I can solve this?