I have had strange problem with DP. Currently following snipped fails:
// If __forceinline__ is added, problem goes away
__device__
void initThread( int *s) {
// This fails in memcheck in debug build with message
// "Invalid __global__ write of size 4"
// Address is >= 0x01000000
*s = threadIdx.x;
}
__global__
void simulation() {
__shared__ int pmseed[CHILD_THREADS];
// This is ok
pmseed[threadIdx.x] = threadIdx.x;
initThread(&pmseed[threadIdx.x]);
}
Kernel seems to work. But when run using memcheck assigment “*s = …” creates error.
This kernel is invoked from another kernel.
Problem seems to happen only in debug builds, probably release builds inline function.
Any ideas what could be wrong?
Minimal nsight project reproducing is in http://gowrite.net/error.zip
My environment is opensuse 12.2 (64bit), GTX titan, Cuda SDK 5.5-22.
My first thought looking at it is you are passing around pointers to shared memory. If you change the shared memory declaration to global does the problem still manifest?
Hi lpaatero, could you update with the version of cuda-memcheck and the driver you are using ? The cuda-memcheck version can be read out with cuda-memcheck --version. The driver version is the output of cat /proc/driver/nvidia/version. Could you also retry with the latest CUDA driver available ?
The latest available driver for the GTX Titan for Linux 64 bit is : 319.60 (Geforce Driver Results | NVIDIA). Could you try using this driver ? If the problem persists, could you file a bug through the registered developer site with a self contained application that reproduces the issue ?