Hi,
I have some trouble developing a CUDA app. When I launch the application there is no error report (I catch all return values from CUDA runtime functions, also correctly handled async errors). Nevertheless, executing it in a text terminal (ctrl+alt+F1) the screen flickers and appears a lot of blue, red and green pixels.
Also, If I execute the program within cuda-gdb, I get an error (I insist, this error was not thrown without cuda-gdb).
The error is
Warning: CUDA API error detected: cudaMalloc returned (0x4)
CUDA error call (cudaMalloc(…)): unspecified launch failure.
I concern that unspecified launch failure errors are caused by invalid pointers but I think this is not the case.
The code that was causing the error was something like
double* ptr;
unsigned long int size_in_bytes = 64 * sizeof( double );
cudaMalloc( (void**) &ptr, size_in_bytes )
I have also tested it with a dummy pointer such as (allocate only 1 byte)
double* dummy;
cudaMalloc( (void**) &dummy, 1 )
Executing application with valgrind, some errors are reported but I don’t if that has something to do with above problems
==20107== Conditional jump or move depends on uninitialised value(s)
==20107== at 0x73C075B: __strspn_sse42 (strspn-c.c:126)
==20107== by 0x7BF7829: ??? (in /usr/lib/libcuda.so.304.54)
==20107== Use of uninitialised value of size 8
==20107== at 0x7BF782E: ??? (in /usr/lib/libcuda.so.304.54)
==20107== Use of uninitialised value of size 8
==20107== at 0x4C2A00D: strcmp (mc_replace_strmem.c:538)
==20107== by 0x7C03D98: ??? (in /usr/lib/libcuda.so.304.54)
I don’t know why nor where these message come from because if I execute valgrind with --check-origins=yes then no error message appears.
I will be really greatful to someone who call help in this issue.
F41thful.