Hello Im using 9800GT and 9500GT as my gpu and using window. Im currently using Visual Studio 2008 for coding and
my kernel somehow crash with two basic reason. First pointers for variable are pointing to same address even if
that is supposed to be not true. Also seems like variables are not properly transferred to graphic card.
Mostly the calculations are going to 0 or it says its not a number (-1.#QNA…). Following is part of the code for
kernel function. Does anybody find the reason? Thank you.
__global__ void kernel( int a, cuComplex* d, float e, int* f, float* g ){
int xx = threadIdx.x;
if(xx < XDIM)
{
for(int yy =0; yy<YDIM;yy++)
{
int i = int(g[yy*2]);
d[yy].x = (function of a,e,f,g)/e;
d[yy].y = 0;
}
}
}
I have calculated the memory needed and it was way lower than 512MB which is the total size of memory for
9800GT, so there should be no problem regarding memory allocation. Some how value of e is going to 0. Im
setting value of variable e as
float e_host = somevalue…
cudaMalloc((void**)&e, sizeof(float));
cudaMemcpy(e,&e_host, sizeof(float), cudaMemcpyHostToDevice);
can there be any errors with those codes? Thank you.