GPU device emulator - cuda

I am new to learning CUDA and I was looking around for a good emulator to run my CUDA programs on, since my laptop does not come with a Graphics card.
I have heard of mcuda and gpuocelot but they seem to have terrible and confusing documentation. I have been trying to get them installed for a few hours now but with very little progress.
Does any one know of a decent GPU emulator with good documentation. I am using Ubuntu 10.10
operating system
Thank you,
Gaurish

nvcc has an option to turn on the emulation mode and will run the entire application on your CPU. You don't need to have a CUDA enabled GPU for this, of course.
nvcc -deviceemu my_first_app.cu

I tried for GPUocelot on ubuntu 12.04.
its time consuming job we have to download some folders from "http://gpuocelot.googlecode.com/svn/trunk/ "I hope it will work after downloading these folders using svn.
here is link where you can find all steps to install gpuocelot
http://barefeg.wordpress.com/2012/06/16/how-to-install-gpuocelot-in-ubuntu-12-04

Related

freebsd open source kernel

I am beginner. I want install freebsd on VM and test open source world! I want to write a small function and to put it into kernel of OS, and then I want to use it in another program as a system function.
I just installed freebsd11 on VM. I know a command line environment! I should use a GUI? Where is kernel?
FreeBSD is a wonderful beast once you know all its capabilities, if you want to play with jails, ZFS and build your own kernels, probably this already build image can be a good starting point:
https://fabrik.red/post/test/ more info can be found here including scripts about how to create your own images/jails (custom kernel): https://github.com/fabrik-red/images
There is no GUI on the images, and maybe you will never need one, unless you want to use FreeBSD as a desktop, but FreeBSD shines more on headless systems (no GUI).
Update:
For GUI probably you can give a try to trueos.org or you can install your own Xorg, desk environments
Sounds like you should learn a bit more about what the operating system does before trying to modify the kernel. There are lots of resources about the unix kernels. See the developers handbook, https://www.freebsd.org/doc/en/books/developers-handbook/ or just google and you will find many resources.

CUDA samples cause machine to crash

I was planning on starting to use CUDA on a machine with Kubuntu 12.04 LTS and a Quadro card. I installed CUDA 5.5 using the .deb from here, and the installation seems to have gone fine. Then I built the CUDA samples, again everything went fine.
When I run the samples in sequence, however, some of them botch my display, and others simply crash my computer.
What causes the crash? How can I fix it?
I'll mention that my NVidia card is the only display adapter the machine has, but that shouldn't make CUDA crash and burn.
The problem was due to the X server using the FOSS nouveau drivers. These are known to conflict with NVidia's way of accessing the card. When I restarted X (actually, I restarted the machine), the samples did run and work properly.
Not all the samples are runnable if you just installed CUDA on a clean ubuntu system. Some of them require additional libraries, and some of them require particular CC versions.
You could read the CUDA sample document of those crashed samples for more information.
http://docs.nvidia.com/cuda/cuda-samples/index.html

CUDA on Windows and Linux

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)

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.