Updating to CUDA 2.3

It’s been a while since I’ve posted anything, so I thought I’d start again by upgrading from CUDA 1.1 to the new CUDA 2.3.

For hardware, I’m still using my old NX8600GTS graphics card.  For my software development environment, I downloaded and installed the Microsoft SDK for Windows Server 2008 and Microsoft Visual C++ 2008 Express Edition.  Then I downloaded and installed the NVIDIA Driver 190.38, the CUDA Toolkit 2.3 and the CUDA SDK 2.3 for 32-bit XP.

Once everything was set up, the first thing I did was to recompile and run the deviceQuery example (just as I did in my first attempt with CUDA).  The default installation location of the CUDA examples has changed since version 1.1, so I found the example in

C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\deviceQuery

I just double-clicked the deviceQuery_vc90.sln file and the project popped-up in the Visual C++ IDE.  I hit F7 to rebuild the program, and then I pressed Ctrl+F5 to run it.  The program ran and reported the presence of a “GeForce 8600 GTS” in my PC.  So far, so good.

Next, I downloaded and unpacked my first CUDA program (written so long ago).  Because this example was created using MS Visual C++ 2005, I had to start the Visual C++ 2008 IDE and then drag-and-drop the example1.sln file into it.  This started the Visual Studio Conversion Wizard which converted the project into the newer format.  Then I hit F7 to build it and got the following error:

1>LINK : fatal error LNK1181: cannot open input file 'cutil32D.lib'

This error is the result of moving the default installation directory of CUDA SDK 2.3 versus 1.1.  To correct for this, I opened the Property Pages for this project and, under the Linker properties, I changed the Additional Library Directories to include

C:\Documents and Settings\All Users\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\common\lib

After doing this, the program compiled and ran successfully.

Here’s the source code for this example if you want to try it.

Bookmark and Share

About these ads

About dave_vandenbout
President of XESS Corp, a manufacturer of FPGA development boards.

6 Responses to Updating to CUDA 2.3

  1. MIA says:

    I try to simplify my problem in order to let you get it easily for this reason i prefered working in small project with 4 files :
    my_vector.cu : program which initialise host & device vectors and launch kernel_function.
    my_vector_kernel.cu : program which declare a kernel function.
    my_vector.h : header where i declare a simple class which use standard template library.
    and finally my CMakeLists.txt.

    Then for having a better idea about my project i will attach code source below.

    The problem it s when i include my header file my compiler (nvcc) does not accept this declaration :

    typename my_vector::iterator it_best_element()
    {
    typename my_vector::iterator it = std::max_element(begin(), end());
    return it;
    }
    it gives me this kind of error : “my_vector.h(22): error: nontype “my_vector::iterator” is not a type name” .

    And it accepts this declaration :

    typename vector::iterator it_best_element()
    {
    typename vector::iterator it = max_element(begin(), end());
    return it;
    }
    knowing that my class “my_vector” inherited from std::vector ( template class my_vector:public std::vector )!

    Thanks to think to help me if you have any ideas !

    my_vector.h:

    #include
    #include
    #include
    using namespace std;

    template
    class my_vector:public vector{

    using vector::operator[];
    using vector::begin;
    using vector::end;
    using vector::resize;
    using vector::size;
    using vector::iterator;

    my_vector(unsigned _size = 0, EOT _value = EOT())
    :vector(_size, _value)
    {}

    /* My compilator nvcc don’t agree this declaration*/
    typename my_vector::iterator it_best_element()
    {
    typename my_vector::iterator it = std::max_element(begin(), end());
    return it;
    }

    /* My compilator nvcc accept this use of my iterator */
    /*
    typename vector::iterator it_best_element()
    {
    typename vector::iterator it = max_element(begin(), end());
    return it;
    }
    */
    }

  2. Monteiro says:

    I have a notebook with Nvidia G102M and it works fine! I have Windows Vista Home Premium 32 bit and Visual C++ 2008 Express Edition.

  3. Shaun says:

    Btw for anyone, 2.3 does not work on notebooks.

  4. arighna says:

    thanks in advance.. :-)

  5. arighna says:

    I was just wondering, in your previous post for the VS 2005, you had configured some properties to make the VS use nvcc to compile the *.cu program. But here no such thing has been done.. is it saved in one of the files in zip file?? I am a newbie in CUDA programming and will be grateful if you explain the same..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 33 other followers

%d bloggers like this: