Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8838425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:59:29+00:00 2026-06-14T09:59:29+00:00

I have copied a hello world program in cuda using this site http://code.google.com/p/stanford-cs193g-sp2010/wiki/TutorialHelloWorld The

  • 0

I have copied a hello world program in cuda using this site http://code.google.com/p/stanford-cs193g-sp2010/wiki/TutorialHelloWorld

The code is

#include "util/cuPrintf.cu"
#include <stdio.h>

__global__ void device_greetings(void)
{
  cuPrintf("Hello, world from the device!\n");
}

int main(void)
{
  // greet from the host
  printf("Hello, world from the host!\n");

  // initialize cuPrintf
  cudaPrintfInit();

  // launch a kernel with a single thread to greet from the device
  device_greetings<<<1,1>>>();

  // display the device's greeting
  cudaPrintfDisplay();

  // clean up after cuPrintf
  cudaPrintfEnd();

  return 0;
}

Then compiled using nvcc hello_world.cu -o hello_world however I only see the hello fom host and not the device.

I even tried

printf("{CudaPrintfInt => %s}\n",cudaGetErrorString(cudaPrintfInit()));
printf("{cudaPrintfDisplay => %s}\n",cudaGetErrorString(cudaPrintfDisplay(stdout, true)));

and compiled with nvcc -arch=sm_11 hello_world.cu -o hello_world, However I get:

$ ./hello_world
Hello, world from the host!
{CudaPrintfInt => initialization error}
{cudaPrintfDisplay => __global__ function call is not configured}
$

The graphic model is :

$/sbin/lspci -v | grep VGA
07:01.0 VGA compatible controller: Matrox Graphics, Inc. MGA G200eW WPCM450 (rev 0a) (prog-if 00 [VGA controller])

and the cuda version is 4:

$ ls /usr/local/cuda/lib/
libcublas.so         libcudart.so.4.0.17  libcurand.so.4         libnpp.so
libcublas.so.4       libcufft.so          libcurand.so.4.0.17    libnpp.so.4
libcublas.so.4.0.17  libcufft.so.4        libcusparse.so         libnpp.so.4.0.17
libcudart.so         libcufft.so.4.0.17   libcusparse.so.4
libcudart.so.4       libcurand.so         libcusparse.so.4.0.17
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T09:59:31+00:00Added an answer on June 14, 2026 at 9:59 am

    “If you are on a CC 2.0 GPU, you don’t need cuPrintf at all — CUDA has printf built-in for CC-2.0 and higher GPUs. So just replace your call to cuPrintf for the actual prinft” (source)

    Put you code this way just to check what is causing this problem.

    #include <cuda_runtime.h>
    #include "util/cuPrintf.cu"
    #include <stdio.h>
    __global__ void device_greetings(void)
    {
      cuPrintf("Hello, world from the device!\n");
    }
    
      int main(void)
      {
      // greet from the host
      printf("Hello, world from the host!\n");
    
      // initialize cuPrintf
      printf("{CudaPrintfInt => %s}\n",cudaGetErrorString(cudaPrintfInit()));
    
      // launch a kernel with a single thread to greet from the device
      device_greetings<<<1,1>>>();
    
      // display the device's greeting
      printf("{cudaPrintfDisplay => %s}\n",cudaGetErrorString(cudaPrintfDisplay()));
    
      // clean up after cuPrintf
      cudaPrintfEnd();
    
      return 0;
    }
    

    Here say that happen because :
    “The device function being invoked (usually via cudaLaunch()) was not previously configured via the cudaConfigureCall() function.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a Hello World application, in the same vein as http://giantflyingsaucer.com/blog/?p=409 . It
I have this code copied from C# 4.0 in a nutshell that uses Attribute/Reflection
I have created a simple Hello World Application using Flash Builder Burrito SDK. I
I'm trying to run the sample code from this Sun tutorial: http://download.oracle.com/javase/6/docs/technotes/guides/rmi/hello/hello-world.html I've copied
I am trying to learn Java now and this is the hello world program
why do I get this exception?please suggest any solutions.i have properly copied mail.jar and
As the title suggests, I have copied verbatim the hello.cl and hello.c files from
I'm trying to run a SDL hello world example. Everywhere it says, I have
I have this code to demonstrate the problem: public static void main(String[] args) {
I have a problem with the MASM32 assembler The following code is a Hello

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.