Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Professional CUDA C Programming
This is the forum to discuss the Wrox book Professional CUDA C Programming John Cheng, Max Grossman, Ty McKercher; ISBN: 978-1-118-73932-7
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Professional CUDA C Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 16th, 2016, 05:40 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.








Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.