CUDA on Windows and Linux - cuda

I'm trying to set up a cuda development environment under windows, and lurked many cuda-tagged posts, but few things are still unclear:
Can I debug cuda applications under windows without the need of a second video card, using nsight and VS2010 express?
Can I debug cuda applications under linux without the need of a second video card, AND without shut down the graphical interface?
Answered thousands of times, but perhaps something has changed, so I ask again just to be sure: Can I develop under windows without installing a cuda-enabled video card? There is some kind of emeulator? (Ocelot for windows is practically inexistent).
Thanks.

Can I debug cuda applications under windows without the need of a second video card, using nsight and VS2010 express?
You can apparently debug with a single video card, but nsight requires vs2010 professional (not express edition)
https://developer.nvidia.com/nsight-visual-studio-edition-requirements
Can I debug cuda applications under linux without the need of a second video card, AND without shut down the graphical interface?
I don't think so, from the eclipse nsight docs (http://docs.nvidia.com/cuda/nsight-eclipse-edition-getting-started-guide/index.html#linux-requirements):
"A GPU that is running X11 (on Linux) or Aqua (on Mac) cannot be used to debug a CUDA application and will be hidden from the application ran in the debugger. Such GPU can still be used for profiling GPU applications."
Answered thousands of times, but perhaps something has changed, so I ask again just to be sure: Can I develop under windows without installing a cuda-enabled video card? There is some kind of emeulator? (Ocelot for windows is practically inexistent).
no, if you want to use cuda, you'd be best off just getting a cheap cuda-enabled card (e.g. a GTX 650 is ~$100 and is the most recent (kepler) architecture)

Related

Nsight Debugging using single GPU

I have a single GPU in my Windows 7 system. Would like to debug my gpu code locally on this machine.
There is a confusion regarding this. Do I need to do headless debugging, (may be making my on-board display as display driver), as explained in Setup Local Headless GPU Debugging?
Or do I need not do any thing like that?
You cannot do local headless debugging with only a single GPU. Headless means there is no monitor or active display attached to the GPU that is running the code under debug. If you are debugging locally, you need this display to see the nsight GUI and your windows desktop.
Single GPU local (non-headless) debugging is covered in the nsight manual.
If you can enable another GPU (need not be an NVIDIA GPU), then you can use that GPU for your windows display, and do headless debugging on the NVIDIA GPU.

Developing using CUDA on several computers, when only one has a GPU installed

I am a Java developer. To speed some of our algorithms, we have decided to try CUDA.
But the Issue is, currently we have only one server with GPU installed and 3 developers have to work on it (by transferring the file each time over ssh and compiling and running it over there). This obviously is a tedious process.
What I would like to know is: On my machine which does not have GPU, can I using NSight work on CUDA by compiling and generating files locally. This can automatically be transferred to server to get the result.
If we can at least work on algorithm locally using NSight (or any other IDE) and not pure vim and then compile it to remove compile time errors, this would save quite some time.
On Linux you can do remote debugging using Nsight Eclipse Edition as documented here. This requires 5.5 or later. On Windows you need to start the Nsight monitor on the server and then just configure Nsight Visual Studio Edition to use the remote machine.

Can't debug CUDA: CUDA dynamic parallelism debugging is not supported in preemption mode

I have CUDA 5.5, latest drivers, Nsight studio 3.1 for VC2010 on Windows7 64bit.
The target machine has a headless Titan card, and another simple NVidia card, to which the monitor is connected.
I'm trying to debug my CUDA code which includes some dynamic parallelism. Whenever I click "Start CUDA Debugging" in VC, I get this error from Nsight Monitor: CUDA dynamic parallelism debugging is not supported in preemption mode. From what little I found regarding this issue, this is because I'm trying to debug CUDA on the same device that drives my screen. This however is not true, as I mentioned, I have a separate card to drive the screen.
I went even further with this, disconnected the monitor from the second card as well, rebooted, and set up remote debugging from a different machine. Same result.
Does anyone have an idea how to tackle this?
Right click the monitor's tray icon, check "Options\CUDA\Debugger". Except TCC GPUs, the others are by default force "Software Preemption".
You can set "Desktop GPUS must use Software Preemption" and "Headless GPUs must use software preemption" to false. And make sure in you VisualStuido, the setting "Nsight\Options\CUDA\Preemption Preference" is "Prefer no Software Preemption".

Debugger in CUDA 5

Nvidia has released extended eclipse for CUDA 5. They have Nsight plugin for VS2010 also. In VS2010 we can stop program execution at breakpoint in kernel but how to achieve this functionality in eclipse on Linux? I don't see any nsight specific keys to stop execution. I tried changing perspective but it debugs as a normal C/C++ application. I'm using Tesla C2070, Intel Xeon 8 core machine with Linux.
I'm from Nsight Eclipse Edition team.
Our goal is specifically for the application to be debugged as a normal C/C++ application. This means that you can set breakpoints, use "run to line", etc. regardless of whether you debug host or device code.
Basically, the process is quite standard for Eclipse:
Create a project (you can also import existing executable)
Click debug button
Debugger will run and by default will break in the main function. Note that no device code posted on the device so you will only see the host thread.
Set a breakpoint in the device code and hit resume (note that Breakpoints view toolbar also allows you setting breakpoint on any CUDA kernel launch)
Debugger will break when device code reaches the breakpoint. You can inspect your application state using visual debugger UI.
Couple things, and not sure which solved the issue. Drivers updated to latest ones with RC5.0, but I chose to run VNC server instead of native X server. Then the CUDA card(s) are dedicated to my apps and debugging, and it works like a charm, and now accessible from everywhere.
Eugene,
I just installed Cuda 5, and I wasn't able to break in any kernel code. It was a clean install of centos 5.5, with a fresh download of cuda-5, and i am running on a asus g71x laptop which has a gtx260m installed.
I thought maybe you cant run display and dedbug on one device still, so i switched to non-nv x display, but still had same issue, cant stop in the kernel code.
Have you tried CUDA 5.0 RC1? It is available now. You can download and try it. And I have tried the Nsight in it, it works well for debugging.
Best regards!
The 304.43 NVIDIA Driver does not let users other than root debug their CUDA application.
That problem is not present in any past or future public releases. The CUDA documentation recommends using only drivers listed in the CUDA DevZone. The 304.43 driver is not one of them.
That may or may not be the issue you are hitting. But I thought it was worth mentioning.

cuda with optimus just to access gpgpu

I have a Dell XPS L502 with the Nvidia 525M graphics card. I am only interested in using the gpgpu capabilities of the card for now.
I installed Ubuntu 12.04 as a dual boot with the Windows 7 that came with the machine and followed several installation procedures for installing the CUDA driver and developer kit from Nvidia ( many re-installs of Ubuntu ). In all cases the display drops to 640x480 resolution. Best I can determine this has something to do with Optimus technology and Linux. I tried Bumblebee to no avail.
I really don't care about using the NVidia card to drive the display. Is there any way that I can just install the NVidia drivers so that a program can use the CUDA capabilities of the graphics card and I still get the full resolution on the display?
I had a similar issue with my Alienware M11xR2, and posted the solution on the NVIDIA Forums. Unfortunately the forums are down at the moment but essentially the process is as follows:
Install the Nvidia Drivers, but when prompted to modify your X11 Config, select 'No'. This is because the Nvidia card cannot be used as a display device.
Install the CUDA SDK and run one of the samples as root. I found this to be a necessary step. After this you should be able to execute further CUDA programs as a normal user.
Hope that helps.
With the new release of CUDA 5 the, comes the installation guide, there you have just one file that installs drivers, toolkit and sdk (even nvidia nsight). And one thing that got my attention is that you also have optimus options in the installation process.
I also have and Alienware M14x, and i understand your problem, but i also wanted the drivers to work for me, so i didn't try too hard on that.
Maybe you could give that a try and comment with the rest of us.
Here you can look for the CUDA 5 release candidate: CUDA 5
and here is the installation guide (maybe give this a read first): CUDA 5 Starting Guide for Linux.