I encountered a problem when I try to access a variable located in device memory. Here is the situation basically:
// ------ CODE -------
#define ARRAY_SIZE 16
device struct mystruct* myarray;
// dynamically allocate the array of structs
cudaMalloc((void**)&myarray, ARRAY_SIZE*sizeof(struct mystruct));
// this triggers an exception ?!?!? myarray.dummy = 1;
// ------- END CODE -------
An important thing to mention is that this happens only when running on the device. The code runs OK in emulation mode.
My GPU is 8600 GTS.
Anyone had the same problem? I appreciate any help!