I’m developing a raytracer using OpenCL. When I try to raytrace big scenes the driver crashes. In linux all remains freezed and in windows the driver restarts. If I shutdown the graphical environment in linux and try to execute the OpenCL program form terminal It runs ok.
It only happens when the kernels need some time to raytrace the scene. If I try a simple scene all works ok.
There is a restriction about the time that a kernel can be running? Should I divide the work and make more kernel commands?
There is something called the watchdog timer that kills kernels that run for too long, 5-10 seconds or something like that. A search for ‘watchdog’ on the forums should bring up a few threads.
There is something called the watchdog timer that kills kernels that run for too long, 5-10 seconds or something like that. A search for ‘watchdog’ on the forums should bring up a few threads.
The 5 second limit is only if you have a (graphics) display connected. Otherwise, there is no run-time limit on kernels. Run the SDK deviceQuery app:
# /usr/local/cuda_sdk/C/bin/linux/release/deviceQuery
CUDA Device Query (Runtime API) version (CUDART static linking)
There is 1 device supporting CUDA
Device 0: "Tesla C1060"
CUDA Driver Version: 2.30
CUDA Runtime Version: 2.30
CUDA Capability Major revision number: 1
CUDA Capability Minor revision number: 3
Total amount of global memory: 4294705152 bytes
Number of multiprocessors: 30
Number of cores: 240
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 16384 bytes
Total number of registers available per block: 16384
Warp size: 32
Maximum number of threads per block: 512
Maximum sizes of each dimension of a block: 512 x 512 x 64
Maximum sizes of each dimension of a grid: 65535 x 65535 x 1
Maximum memory pitch: 262144 bytes
Texture alignment: 256 bytes
Clock rate: 1.30 GHz
Concurrent copy and execution: Yes
Run time limit on kernels: No
^^^^
Integrated: No
Support host page-locked memory mapping: Yes
Compute mode: Default (multiple host threads can use this device simultaneously)
Test PASSED
Press ENTER to exit...