Hi!
I’m sorry for my English.
I have problem with CUDA on my computer (OS: Windows 7 64 bits, GPU: NVidia GeForce GT 335M).
I installed CUDA Toolkit 6.5 and used MS Visual Studio 2012. I created CUDA project, and this standart program don’t run correctly:
#include “cuda_runtime.h”
#include “device_launch_parameters.h”
#include <stdio.h>
global void add( int a, int b, int *c ) {
c = a + b;
}
int main(void) {
int c;
int dev_c;
cudaMalloc( (void)&dev_c, sizeof(int));
add<<<1,1>>>( 2, 7, dev_c );
cudaError_t error = cudaMemcpy( &c, dev_c, sizeof(int), cudaMemcpyDeviceToHost);
printf( “2 + 7 = %d\n”, c );
printf(“error = %c”, error);
cudaFree( dev_c );
getchar();
return 0;
}
When I start the debugger in openning window:
2 + 7 = 0
and no errors. But when I start the debugger step by step, the compiler calls <vector_types.h> and refers to the following code:
struct device_builtin dim3
{
unsigned int x, y, z;
#if defined(__cplusplus)
host device dim3(unsigned int vx = 1, unsigned int vy = 1, unsigned int vz = 1) : x(vx), y(vy), z(vz) {}
host device dim3(uint3 v) : x(v.x), y(v.y), z(v.z) {}
host device operator uint3(void) { uint3 t; t.x = x; t.y = y; t.z = z; return t; }
#endif /* __cplusplus */
};
and then “No Source Availible” and generete following error:
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: c:\users\анюта\appdata\local\temp\tmpxft_00001ba8_00000000-2_kernel.cudafe1.stub.c.
The debugger could not locate the source file ‘c:\users\анюта\appdata\local\temp\tmpxft_00001ba8_00000000-2_kernel.cudafe1.stub.c’.
I think, my processor does not see Kernel and anything methods. Why?
What am i doing wrong?
Maybe I need some additional environment settings?
Thanks, Anna