How to do remote debugging with Nsight 5.5 on Linux? - cuda

Disclaimer: I know that this question has been asked numerous times, but before Nsight 5.5 the answer simply was "You can't."
I'm trying to debug a CUDA program with Nsight 5.5 on Ubuntu. The remote machine is also an Ubuntu with CUDA Toolkit 5.5.
I setup debugging in NSight using the "Debug an application on a remote system".
Whenever I try to run the application I get a "Could not start gdbserver on the remote host" error.
This is what I get on the console:
Last login: Thu Aug 1 16:09:26 2013 from host.whatever.edu
echo $PWD'>'
:2345 /tmp/nsight-debug/flow;exit
someuser#remotehost:~$ echo $PWD'>'
/home/someuser>
someuser#remotehost:~$ :2345 /tmp/nsight-debug/flow;exit
:2345: command not found
logout
Both gdbserver and cuda-gdbserver are installed on both machines.
If I ssh to the remote host, I can run /tmp/nsight-debug/flow manually.
What might be the problem here? Is there anything missing from the setup?

This looks like a bug in Nsight, we will take a look into this matter.
Please make sure that you have remote toolkit configured for your connection.
From the main menu, select Run -> Debug Configurations...
In the left-hand tree, select you debug configuration under C/C++ Remote Application
Make sure that Remote toolkit combo has proper toolkit selected. If you don't have any toolkit configured, click Manage... and setup the toolkit.
Usually you will only have to setup the toolkit once per your connection - e.g. you will not have to setup it if you want to debug another application on the same remote system.

Related

Add "NET START" permission to program?

I am hosting a MySQL server on windows via xampp and want to start it whenever I test my Intellij application.
Intellij provides a way to run commands before starting the application, so I added
NET START MySQL
When starting, the console says:
System error 5 has occurred.
Access is denied.
Answers from other Threads include running cmd as an administrator, but since Intellij runs the commands in the internal "Terminal", I can't really do that without running Intellij as admin every time.
Now my question is, can I grant Intellij some sort of permission to use NET?

"Unauthorized operation" error when installing Express Edition

Microsoft Outlook 2010 with Business Contact Manager worked on my Vista laptop but, laptop died. Now, have Windows 7 Ultimate x64 tower since November. Loaded Office 2010 x86 just fine but, trying to install BCM, failed to install SQL Server Express.
So, now I can't get SQL Server 2008 to install; the Engine, that is, all supporting files install fine. I read that if you can install SQL Server 2008 with the ID=MSSMLBIZ, BCM will pass over the server install, and continue with install. I read that the issue may be SQL Server x86 on Win 7 x64. So, I tried SQL Server x64. Every time I get an Attempted to perform an unauthorized operation.
Install always fails at step SqlBrowserConfigAction_install_ConfigNonRC_Cpu32. So, ran as Admin, from Admin log-in, from the root directory in the Admin log-in, changing permissions on the Security Registry KEY, turned off firewall, all suggestions still failed.
Coincidentally, I have an Update for Windows 7 for x64-based systems (KB2732487) that has failed to install, as well.
I think your Windows 7 is not proper installed, perhaps while installing Windows Updates.
But as for the
SqlBrowserConfigAction_install_ConfigNonRC_Cpu32
I dont understand: ConfigNonRC , in Microsoft terms stands the RC for Release Candidate.
If i was you i should try this:
Open CMD as Admin
Typ: "sfc /scannow"
When that's ready your pc may restart.
Now at CMD typ: "sfc /verifyonly"
If it shows any errors, try "sfc /scannow" again.
If it does not show any errors, try to install Windows Updates. All of them.
If this works, delete all existing SQL apps. And install the Core first.
If the updates can't install, You can try to re-install Windows 7 what i basically should not do and just use MySQL. A lot faster & reliable these days.
I hope this will fix your problems!

NVIDIA Nsight Debugging on GTX 480

I have one machine with GeForce GTX 480 but I can't debug or run analysis activity on it.
This error appears when I debug or run analysis activity:
The remote system is logged in through Remote Desktop. CUDA debugging
does not support Remote Desktop unless a TCC adapter is installed.
My Nsight version is 2.2. Whats wrong?
You would need a TCC capable card (Quadro or Tesla series) if you want to use the GPU from inside a RPD session.
When you do not have a TCC capable GPU, you can for example install VNC Server as a service and use that to access the machine.
Alternatively you can configure windows autologin to log you in automatically and have have the Nsight Monitor in the startup group (but to access the desktop remotely you would still need some kind of remote access software like VNC).
after some test and try ,I found that this problem is because of RDC and if you connect to the target machine from one computer with remote desktop connection even if you disconnect all remote desktop and try to debug with Nsight remotely or locally you get this error .
I were connected to the target machine with remote desktop and configure and run Nsight monitor and then close the RDC . and then I tried to debug the project remotely from host on the target and because of it I get this error
I found that one solution will be restart the target machine and configure the Monitor physically at front of the target machine and then DO NOT remote to the target from anywhere, now I can debug my project from host machine on the target machine .

How to debug CUDA code on TCC enabled device on a remote server?

I would like to start a remote debugging session from my development pc on our soon-to-be production server. On the server I start NSight using the remote desktop, and then I try to Start CUDA Debugging on my local machine (given the server as target before). The result is, that the debug session disconnects saying "The remote system is logged in through remote desktop. WDDM adapters will not be debuggable".
Is this intended behaviour, a bug, wrong configuration? And if there is no solution involveing remote desktop, how could I start the NSight monitor, so that I can start a debugging session?
On the target server I have two Tesla K10 and a Quadro FX (for Display). All Tesla devices (which are actually four), show TCC turned on.
I am using NSight 3.0, CUDA 5.0 and Visual Studio 2008 (the latter two only on the development workstation).
One last thing: Copying the application to the server and executing through remote desktop works fine.
The message you refer to is a warning to let users know that Nsight has detected that you have a RDP session running on the target side and that it won't be able to do Nsight debugging on any WDDM cards in it, if there is one (or more) - which looks like you do, with that Quadro FX that you mentioned).
This message is a Warning, and it should continue to let you run or debug the application under Nsight and debug the application assuming GPU code runs on the TCC devices. Are you sure the application ran successfully on the target machine? Can you double check that you have set a GPU breakpoint and see if you hit those breakpoint(s)?
Are there any other messages shown? - you can check the VS Output window.
Which driver version are you using?
Can you try running (double clicking) the application on the server but from the directory that Nsight synced the application to? It should be under %appdata\NVIDIA Corporation\Nsight\Monitor\Mirror\<hostdev_machine_name>\<path_to_the_sync_app>
I know you mentioned you tried copying it, but I'd like to see if everything that Nsight sync is what's required by the application and that maybe there's not something missing that you need to specify to sync (more info on syncing is here: http://http.developer.nvidia.com/NsightVisualStudio/3.0/Documentation/UserGuide/HTML/Content/Synchronization.htm)
Thank you

CUDA Debugging - VS on windows workstation, GPUs on Linux server?

Has anyone had any experience debugging CUDA code on a server while coding on a workstation?
My laptop (Thinkpad T400) doesn't support CUDA, but I have access to a server with pair of NVIDIA GTX 295 cards that runs Linux.
Can I use NVidia's Visual Studio tools to debug remotely on the server?
Failing that, I also have an Ubuntu VM running on my laptop. Is there a debugger that I can use under Linux to debug on the server?
I really don't want to have to buy another laptop with dual NVidia cards.
Developing in c on a remote linux machine (like your server) is quite common. You can ssh onto the server from any client (like your laptop) to compile and run the code just as you would if you were sitting at the machine, and you can use gdb to debug your code in a terminal. You can also use ddd as a graphical front end to gdb or a linux IDE such as eclipse by forwarding X11 over ssh.
You can use cuda-gdb to debug your CUDA code in a terminal in exactly the same way. Unfortunately, there is not a visual cuda debugger for linux yet. However, it appears you can use ddd with cuda-gdb [source], as you have two gpus. I'm not sure about using cuda-gdb in eclipse.
Yes you can but you need to buy the Parallel Nsight Studio from Nvidia
After installing on the remote machine the NsightDebugServer you can upload and debug programs from
your cuda-less laptop.
Update
Turns out This solution requires a WINDOWS server in order to run the NsightDebugServer.
To connect to the linux machine from your laptop, use a remote connection.
install putty and a Xserver for windows and just login with
ssh -X username#cudaserver.
The environment would not be fancy as Visual Studio but you can do the basic steps of debugging.
Eclipse "might" have some support for remote gdb servers. Never experimented that (Emacs + gdb is sufficient for me)