• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Misery

CUDA hello world MSVC

9 posts in this topic

Hello,

I have bought book Cuda by example.
I have done everything required to run a simple CUDA program (downloaded drivers, SDK, tools etc).
And as written...

I write a code:

[code]

__global__ void kernel( void ){
}

int main (void) {

kernel<<<1,1>>>();
return 0;
}
[/code]


And it of course doesn't work. It is written that I don't need to do anything special, just use Microsof Visual C++ express and compile this code.
The nVidia tools will do the rest.
Am I retarded or something, that I cannot make this work?


Thanks for help,
Regards
0

Share this post


Link to post
Share on other sites
[quote name='gsamour' timestamp='1310570984' post='4834863']
What do you mean "it doesn't work" ? Could you be a little more specific?
[/quote]
I get this message in visual studio.
1>------ Build started: Project: HelloWorld, Configuration: Debug Win32 ------
1>Compiling...
1>stdafx.cpp
1>Compiling...
1>HelloWorld.cpp
1>c:\misery\moje projekty\cuda\helloworld\helloworld.cpp(6) : error C2144: syntax error : 'void' should be preceded by ';'
1>c:\misery\moje projekty\cuda\helloworld\helloworld.cpp(6) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>Build log was saved at "file://c:\Misery\Moje projekty\CUDA\HelloWorld\Debug\BuildLog.htm"
1>HelloWorld - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

trying to compile it with nvcc doesn't work either I get error:
C:\Misery\Moje projekty\CUDA\HelloWorld>nvcc helloworld.cpp
nvcc fatal : Visual Studio configuration file '(null)' could not be found for installation at 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin/../..'

Again I wasted money... on GPU and on this book :blink:
0

Share this post


Link to post
Share on other sites
Are you sure you're setting up the project correctly? AFAIK, you need to compile CUDA code with the CUDA compiler, "nvcc".

Also, I wouldn't say you've wasted your money... unless you're quitting after one simple error...


EDIT: sorry I didn't read the part about you compiling with nvcc... never mind. Will keep looking for solutions.
2

Share this post


Link to post
Share on other sites
Check this out, there's a comment by "Mike" that might help you (last comment atm):

[url="http://llpanorama.wordpress.com/2008/05/21/my-first-cuda-program/"]http://llpanorama.wo...t-cuda-program/[/url]

It explains one solution to the "nvcc fatal: Visual Studio configuration file (null)" error. It has something to do with needing to make a 32-bit build on a 64-bit machine.


These might help too:

[url="http://llpanorama.wordpress.com/2010/06/18/cuda-gets-easier/"]http://llpanorama.wo...da-gets-easier/[/url]

[url="http://stackoverflow.com/questions/2970493/cuda-linking-error-visual-express-2008-nvcc-fatal-due-to-null-configuration"]http://stackoverflow.com/questions/2970493/cuda-linking-error-visual-express-2008-nvcc-fatal-due-to-null-configuration[/url]
2

Share this post


Link to post
Share on other sites
Try installing Parallel NSight, for a possible quick fix.

IIRC the msbuild targets for 64 bit on msvc 2010 are broken/missing in the cuda sdk, but a working version comes with NSight.
1

Share this post


Link to post
Share on other sites
[quote name='gsamour' timestamp='1310571793' post='4834870']
Also, I wouldn't say you've wasted your money... unless you're quitting after one simple error...
[/quote]

Thanks, for now I'm upset with that all and I will read this all stuff later.

Well I'm a scientist in fluid mechanics, and I must say that I have disposed of many books I've bought for quite lots of money.
I just threw them to garbage.
Most of books promise quite a lot of solutions but in fact they're no more than very general subject review.
Many authors just lie to ppl who buy their books, and that is the sad truth.
I don't give up easily, but I know that Cuda by example authors didn't do their job as they should.
Explanaiton about how to compile a program would be crucial for a beginner in CUDA.

And sometimes it is better to leave something at the beginning than waste a few months for learning how
to make something absolutely useless.

Thanks for answering :D
0

Share this post


Link to post
Share on other sites
[quote name='Misery' timestamp='1310573673' post='4834884']
I don't give up easily[/quote]You copied 5 lines of code, then gave up.

"Easily" would actually mean putting in effort.

[quote]And sometimes it is better to leave something at the beginning than waste a few months for learning how [/quote]You typed 5 lines of code.

And months? I've been learning for a decade now and slowly a few small pieces are starting to make sense.


This is why consultants charge so much. Because their fee is a fraction of the cost needed to actually learn something.

[quote]Well I'm a scientist in fluid mechanics[/quote]

Let me guess. This programming stuff is beneath you and so trivial it's not worth spending your mental effort on.
0

Share this post


Link to post
Share on other sites
[quote name='Antheus' timestamp='1310574459' post='4834890']
[quote name='Misery' timestamp='1310573673' post='4834884']
I don't give up easily[/quote]You copied 5 lines of code, then gave up.

"Easily" would actually mean putting in effort.

[quote]And sometimes it is better to leave something at the beginning than waste a few months for learning how

[/quote]You typed 5 lines of code.

And months? I've been learning for a decade now and slowly a few small pieces are starting to make sense.


This is why consultants charge so much. Because their fee is a fraction of the cost needed to actually learn something.

[quote]Well I'm a scientist in fluid mechanics[/quote]

Let me guess. This programming stuff is beneath you and so trivial it's not worth spending your mental effort on.
[/quote]

LMAO
You seem very frustrated.
Some things are just not worth effort, that's all.
Don't take it personally. You know nothing about my work, and what I do. You are probably paid for programming
and I am not. I'm not educated programmer and often I need help, that's why i post at this forum. I wonder how
smart would you be if you had to learn tensor analyses and fluid mechanics yourself...
so don't fuss too much.

And if after 10 years of doing exactly one thing, you still are not (as you say) good in it...
well... I think you have made a wrong choice choosing this kind of work.
-3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0