I installed cuda 5 in my Ubuntu 12.10 and it is working well, I can compile and debug through cuda-gdb in terminal as well. I'm trying to use nsight, it compiles and executes my code with no issues, but when I try to debug I got the following error
Error in final launch sequence
Failed to execute MI command:
-gdb-set cuda api_failures ignore
Error message from debugger back end:
Undefined set cuda command: "api_failures ignore". Try "help set cuda".
Undefined set cuda command: "api_failures ignore". Try "help set cuda".
I'm using ubuntu 12.10 64 bits and launching cuda executables and nsight with optirun (bumblebee) because I have a GTX 675M (optimus). I installed cuda-gdb throught apt-get, I got version 4.2:
frederico#zeus:~/Dropbox/coisas/projetos/delta_cuda$ cuda-gdb --version
NVIDIA (R) CUDA Debugger
4.2 release
Portions Copyright (C) 2007-2012 NVIDIA Corporation
GNU gdb (GDB) 7.2
I think this is not a problem since I can use it alone (without nsight). I changed nsight to launch cuda-gdb with optirun as well, keep receiving the same error.
The problem was the version of cuda-gdb, I had to use cuda-gdb version 5. It comes with the toolkit version 5, just did a symbolic lick to /usr/bin and it's working.
It is possible to debug CUDA programs with nsight and bumblebee.
(nsight v.5.0.0, bumblebee 3.2.1, Debian sid)
You just have to replace the debugger command line (CUDA GDB Executable) in:
Project Explorer -> right click on your project -> select "Debug as" -> click on "Debug configurations..." -> select "Debugger" tab
CUDA GDB Executable: optirun --no-xorg cuda-gdb
(another possibility is to make a small shell script like the one that follows: /usr/bin/opti-cuda-gdb)
#!/bin/bash
optirun --no-xorg /usr/bin/cuda-gdb $*
This way optirun does not start a virtual screen for gdb, the GPU is not accepting graphics and debug is possible.
Hope that helps!
There's no need to create this link.
You can select the cuda-gdb executable used by nsight in the Run/Debug Configurations... Menu.
In this menu, click on your application under C/C++ Application, then choose the Debugger tab where you can browse your filesystem and set the path to the cuda-gdb-5.0 executable.
Related
I am running Xubuntu on a 64 bit machine. When trying to debug a Beaglebone using gdb (via Eclipse) I get the following error message:
"Remote 'g' packet reply is too long"
See here for more details:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=509479
At the host I am using gdb-multiarch.
When start it, it announces:
"This GDB was configured as "x86_64-linux-gnu"."
Can you please tell me how to configure GDB to work with a 32 bit target? Any other thoughts?
Thank you.
As far as I know the BeagleBone uses an ARM processor.
You'll have to get the ARM version (more precise: version for debugging ARM processors) of GDB to debug - you cannot do this with the x86 version.
For Windows the ARM version is available in the "WinARM" packet.
Maybe for Linux such a packet does not exist and you'll have to re-compile GDB.
Add "set architecture arm" to the .gdbinit file referenced in Eclipse under Debug Configurations -- Debugger -- GDB command file. Make sure the .gdbinit file can be found at run-time by making sure GDB command file contains full path to file.
I encountered a similar issue trying to set up cross compilation through Eclipse with a Ubuntu 12.04 Host VM running on a Mac connecting to a Beaglebone Black target. When trying to debug my project, I would get the same "Remote 'g' packet reply is too long" error. What solved this issue for me was to go into the Debug Configuration for your project, select the Debugger tab, and replace gdb to gdb-multiarch the GDB debugger field.
here's my system specs;
Arch Linux x86_64,
Kernel: 3.6.10-1-ARCH,
Gnome 3.6.2,
xf86-video-nouveau 1.0.4-1,
jdk7-openjdk 7.u9_2.3.3-1,
jre7-openjdk 7.u9_2.3.3-1,
jre7-openjdk-headless 7.u9_2.3.3-1,
lib32-libjpeg-turbo 1.2.1-1, libjpeg-turbo 1.2.1-1, libjpeg6-turbo 1.2.1-1
libpng12 1.2.50-2,
net-tools 1.60.20120804git-2,
unzip 6.0-6.
Ok, so there's the list of requirements that are installed, version numbers as well. Upon launch, the loading/splash screen won't even show, and then nothing... it just dies out. I attempted to launch it "aptana -v" and no output in the shell. I have looked for any error logs in ~/ , but nothing is there.
Other steps I've done is to delete any configuration folders/files for eclipse and aptana-secure in ~/. Also did a clean uninstall of just Aptana (not the dependencies), reinstall. Same result.
Any suggestions?
It appears that there is a mix up in the downloads. 32-bit and 64-bit got switched. If you are on 32-bit download 64-bit and vice versa. Hopefully it will be fixed soon.
See issues below:
Aptana 64 bit version crashes on startup on 64bit Linux OS with 64bit Oracle 7 java
Linux Installer Aptana_Studio_3_Setup_Linux_x86_3.3.0.zip contains x64 bit version of the project
I'm installed qemu in my ubuntu 12.04, in both ways [through source and from the software center in ubuntu] it shows same error. It does not pop up the qemu window. when i'm given a dummy filesystem,kernel,initrd, it simply shows some "VNC SERVER listening 127.0.0.1" screen and hangs no more response. Please give me the installation steps and needful libraries to run simple qemu for x86.
Try to include SDL support to QEMU and add option -sdl to run it. VNC is by default probably means you don't have SDL devel lib. Install libsdl-dev with apt.
In short, I need to understand how to configure eclipse to run "optirun gbd" instead of "gdb". An explanation of what exactly I'm trying to accomplish follows.
I need to run my debug app in eclipse such that it will use the nvidia optimus card instead of the integrated card. My app requires opengl support that is only available this way.
I've got a laptop with an nvidia optimus video card. I'm running linux (ubuntu). I've successfully set up bumblebee such that I can take advantage of the optimus technology. This requires that, to use the nvidia card, I run a given program "foo" with the program "optirun:" optirun foo.
I need to configure eclipse to launch my program in debug mode under optirun. If I run from command line: optirun gdb app everything works as expected.
Edit: Changing the "GDB Debugger" field inside the debug configuration to optirun gdb does not work. Lanching eclipse by optirun eclipse does, however. But this is a detriment to battery life.
Go to "Debug Configurations", open "Debugger" tab. Change "GDB debugger" from gdb to optirun gdb.
Works in Eclipse Juno, Ubuntu 12.04.
Since I'm sure eclipse uses the shell to execute the program, a workaround is to alias gdb to optirun gdb in ~/.bashrc
I look into this issue today and I found another solution. As long as you have Bumblebee installed (http://www.bumblebee-project.org/) and you know you can attach optirun to an executable (try with glxgears for example) you can attach it to cuda-gdb.
What I did is create a script:
#!/bin/bash
optirun /usr/local/cuda/bin/cuda-gdb $*
And save it to /usr/local/cuda/bin or somewhere else it doesn't matter, with the appropriate permissions for execution (755).
What it does is very simple, it runs optirun cuda-gdb args where args is whatever the command line sends it.
In terminal just run opti_cuda-gdb with or without arguments.
For example I named it opti_cuda-gdb and placed it in that directory (which conveniently is added to the path if CUDA is properly configured).
If you use an IDE to develop, like say Netbeans, point the debbuger executable to that script.
I've been successfully compiled and debbuged code using CuSparse and CuBlas with NetBeans running in a SAMSUNG SF410 with Nvidia Optimus and Ubuntu 11.04 and 11.10.
I'm open to provide further details if you think I omitted something.
I am trying to install CUDA on a server running Ubuntu 10.04.
I followed the NVDIA instructions and installed the "CUDA toolkit for Ubuntu Linux 10.04", "GPU Conputing SDK code samples",and "Developer Drivers for Linux (260.19.26) (64 bit)", my system is 64 bit. This installation seems successful. everything downloaded from http://developer.nvidia.com/object/cuda_3_2_downloads.html#Linux
According to the messages of the installation packages, I added /usr/local/cuda/bin to PATH, /usr/local/cuda/lib64:/usr/local/cuda/lib to LD_LIBRARY_PATH
Then, I tried to run the sample programs. The strange things is, some of them can be run, and some of them don't even through they can be made with no problem.
For example,
- convolutionSeparable will just stop there without any message, I can kill it by ctrl + c.
matrixMul outputs a line
Device 0: "Quadro 5000" with Compute 2.0 capability
and stop there, again can be killed by Ctrl+C
clock works, outputs
PASSED
time = 12574
Press ENTER to exit...
simpleMultiCopy outputs PASSED
MonteCarlo outputs PASSED
simpleZeroCopy outputs PASSED
bandwidthTest stops there with blinking cursor for ever.
What is wrong with this?! How can I check if my CUDA installation is successful ? What is wrong with those programs don't run? They don't even have a error message.
I would start by upgrading the driver to 260.19.36, which can be found here. Then I would suggest running nvidia-smi -a to see if the driver is happy. Then I second the suggestion to run deviceQuery to see if the CUDA Toolkit 3.2 is working.
If deviceQuery output appears nominal, then I would start adding printf's to see where things go awry in matrixMul.
What does deviceQuery say? Also check the output of dmesg right after you run that program to see if you can figure out whats up.
Another tip, if you still are having issues, is try running:
strace ./deviceQuery 2> out.txt
Then check out.txt to see if you can find any clues why this error is occuring.
I have similar problem but solved by updating kernel and drivers.
install newer kernel on 10.04
linux-image-generic-pae-lts-backport-natty
linux-headers-generic-pae-lts-backport-natty
download the latest nvidia driver
from http://www.nvidia.com/Download/index.aspx?lang=en-us
install the latest CUDA (at moment 4.0) from
http://developer.nvidia.com/cuda-toolkit-40
CUDA Toolkit for Ubuntu Linux 10.10 32-bit
CUDA Tools SDK 32-bit
GPU Computing SDK code samples
then I passed all SDK example tests.
ThinkPad w520 Quadro 1000 on Ubuntu 10.04