p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Professional Professional CUDA C Programming (http://p2p.wrox.com/book-professional-professional-cuda-c-programming-792/)
-   -   I need a help (http://p2p.wrox.com/book-professional-professional-cuda-c-programming/99140-i-need-help.html)

Yasien August 16th, 2016 06:40 PM

I need a help
 
I'm a new user of linux. I installed the CUDA C driver. I run the executable file of the sample bandwidth test and it worked well. But when I tried to run the executable file of this code :
#include <stdio.h>
__global__ void helloFromGPU (void)
{
printf("Hello World from GPU!\n");
}
int main(void)
{
// hello from cpu
printf("Hello World from CPU!\n");
helloFromGPU <<<1, 10>>>();
cudaDeviceReset();
return 0;
}
I got :
$ ./code_1
Hello World from CPU!

and the device code doesn't show the expected result of repeating the string 10 times.


All times are GMT -4. The time now is 02:54 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.