Nsight compute - SSH login with root

Hi,

Sorry for the late update.

Is there any difference between the two tests?
It seems that you can profile in the first test but meet the
“failed to prepare kernel for profiling” in the second test.

Thanks.

Im sorry I wasnt clear.

The first test situations happens only when i profile on my desktop with ubuntu 18.04 which works without problems (except the error you said). I tried profiling my kernels and everything is working.
The second test situation is on my jetson (while remote profiling from my pc with ubuntu18.04) and it absolutly does not work. Tried it lots of times.

Also, I have been running nsight compute with root privileges since the time you told me so.

Thanks for trying to help me, doesnt seem like an easy error.

Hi,

Sorry for the late update.

Do you test it with the vectorAdd CUDA sample?
If not, would you mind giving it a try?

Thanks.

Hi,

Yes I’m now testing it with the kernel vectorAdd found in your introduction repository. Still the same error.

Hi,

Thanks for the testing.

Could you share the project setting with us?
The file can be found in the workspace with the name xxx.ncu-proj.

Thanks.

Hi,

this is the content of my project settings :

{
“extension”: “ncu-proj”,
“files”: [
],
“launcher”: {
“activity/interactiveprofile/cachecontrol”: “Flush All”,
“activity/interactiveprofile/clockcontrol”: “Base”,
“activity/interactiveprofile/disableprofilingstartstop”: false,
“activity/interactiveprofile/enablenvtxsupport”: true,
“activity/interactiveprofile/enableprofilingfromstart”: true,
“activity/interactiveprofile/importsource”: false,
“activity/profile/applyrules”: true,
“activity/profile/appreplaybuffer”: “File”,
“activity/profile/appreplaymatch”: “Grid”,
“activity/profile/cachecontrol”: “Flush All”,
“activity/profile/checkexitcode”: true,
“activity/profile/clockcontrol”: “Base”,
“activity/profile/disableprofilingstartstop”: false,
“activity/profile/enablenvtxsupport”: false,
“activity/profile/enableprofilingfromstart”: true,
“activity/profile/forceoverwrite”: true,
“activity/profile/importsource”: false,
“activity/profile/kernelid”: “”,
“activity/profile/kernelname”: “”,
“activity/profile/kernelnamebase”: “Function”,
“activity/profile/kill”: false,
“activity/profile/launchcapturecount”: “0”,
“activity/profile/launchskipbeforematchcount”: “0”,
“activity/profile/launchskipcount”: “0”,
“activity/profile/metrics”: “”,
“activity/profile/nvtxincludeexcludeoptions”: “”,
“activity/profile/outputfile”: “”,
“activity/profile/replaymode”: “Kernel”,
“activity/profile/samplingBufferSize”: “33554432”,
“activity/profile/samplingInterval”: “5”,
“activity/profile/samplingIntervalAuto”: true,
“activity/profile/samplingMaxPasses”: “5”,
“activity/profile/targetprocesses”: “Application Only”,
“platform/armserver/arguments”: “”,
“platform/armserver/autoconnect”: true,
“platform/armserver/environment”: “”,
“platform/armserver/executable”: “”,
“platform/armserver/workingdir”: “”,
“platform/l4t/arguments”: “”,
“platform/l4t/autoconnect”: true,
“platform/l4t/environment”: “”,
“platform/l4t/executable”: “/home/loic/Documents/code/loic/cuda-samples/Samples/0_Introduction/vectorAdd/vectorAdd”,
“platform/l4t/executable/history”: [
“/home/loic/Documents/code/loic/cuda-samples/Samples/0_Introduction/vectorAdd/vectorAdd”
],
“platform/l4t/workingdir”: “”,
“platform/linux (aarch64 sbsa)/device”: “127.0.0.1”,
“platform/linux (aarch64)/device”: “192.168.1.100”,
“platform/linux (ppc64le)/device”: “”,
“platform/linux (x86_64)/device”: “localhost”,
“platform/linux/arguments”: “”,
“platform/linux/autoconnect”: true,
“platform/linux/environment”: “DISPLAY=:1”,
“platform/linux/executable”: “”,
“platform/linux/workingdir”: “”,
“platform/ppc/arguments”: “”,
“platform/ppc/autoconnect”: true,
“platform/ppc/environment”: “”,
“platform/ppc/executable”: “”,
“platform/ppc/workingdir”: “”,
“platform/win32/arguments”: “”,
“platform/win32/autoconnect”: true,
“platform/win32/environment”: “”,
“platform/win32/executable”: “”,
“platform/win32/workingdir”: “”,
“platform/windows/device”: “”,
“ssh/armserver/authenticationmode”: “Password”,
“ssh/armserver/deploymentdir”: “/tmp/var/”,
“ssh/armserver/host”: “127.0.0.1”,
“ssh/armserver/port”: “22”,
“ssh/armserver/privatekey”: “”,
“ssh/armserver/user”: “loic”,
“ssh/l4t/authenticationmode”: “Password”,
“ssh/l4t/deploymentdir”: “/tmp/var/”,
“ssh/l4t/host”: “192.168.1.100”,
“ssh/l4t/port”: “22”,
“ssh/l4t/privatekey”: “”,
“ssh/l4t/user”: “loic”
},
“uuid”: “{dba0f11f-78fd-4fcb-bab8-2b756f038f72}”,
“version”: “1.0”
}

Also, i joined the file.

test.ncu-proj (3.9 KB)

Loic

Hi,

Thanks for the testing.

It looks like the project setting is correct but somehow hit the error.
Since we have released a new JetPack 5 GA recently, would you mind giving it a try?

The Nsight Compute included is version 2022.2.1.
We have confirmed that Orin profiling can work correctly.

Thanks.

Hi!

I have successfully updated my orin with jetpack 5.0.2.

Now, I did try to remote profile my jetson using the 2022.2.1 version of nsight compute, but now I have an error which says that I cant connect through ssh (which I can if i try it with this command line : ssh -X myUserName@myIpAddress). This is what i get

Also, when launching the 2022 version without sudo rights, I can connect via ssh and I receive this error when trying to profile:

PS, I have tried again the previous version 2021.2.4, and I get the error “Failed to prepare kernel…”

Just a comment on how ssh determines authenticity…

The first time you connect to an account at a host, it asks if you are ok with that connection (it doesn’t know it is authentic until you say to accept it). If ok, then it memorizes some keys in your “~/.ssh/known_hosts” file. When you flash it, there is a very strong chance the host key will change (or the keys of your user on the remote host) such that “known_hosts” will see a change. It worries that this is a “man in the middle” attack, and won’t allow it to connect until you ok it again. Basically you’d ok it via removing the original “known_hosts” of the PC you are using to debug from. Note that “known_hosts” is entirely a list of public keys, and there is nothing to worry about by anyone seeing the public key (private keys are exactly the opposite and are highly protected).

The “known host” is basically the combination of the account name and address you use. Let’s say you can connect to your Jetson either with address “192.168.55.1” or with an alias in the “/etc/hosts” file (as an example I’ll call this “orin”). Then each of these would have a “known_hosts” entry naming the same key, but paired with each address (I’m using login account name “ubuntu” as an example):

ubuntu@192.168.55.1
ubuntu@orin

Technically I do it wrong by directly deleting the lines in the “known_hosts” file (there are conditions under which this is not correct), but mostly you could just delete that line in “~/.ssh/known_hosts” (it is a human readable text file). The correct method to remove one of those host lines is with this example for the two above entries:

ssh-keygen -R 192.168.55.1
ssh-keygen -R orin

After that manually connect once, accept it as valid, then try again.

1 Like

Hi,

Could you try if you can access Orin with the suggestion shared by linuxdev?

Thanks.

Hi!
Are you sure you logged in to SSH with root permission and not open nsight computer with root permission.
1661755048853
I have the same problem, I modified the User Name of SSH, It worked.

1 Like

Amazing,

It did fix the ssh problem!

Yet I still get some errors when trying to profile.

I can try to screenshot each step.

  1. Connecting to jetson via remote desktop using ubuntu 18.04 and nsight compute 2022.2.1
    image

  2. Launching the process over the application VectorAdd.cu (which is compiled using nvcc and is named a.out)

  3. Getting to the kernel execution using Run to next Kernel key

  4. Trying to profile kernel

That is all.

At least now i get more information on my errors.

Thank you all for trying to help me.

PS this is what i get for checking permissions over the file:


It makes me think that its because I have root acces, I cant access this file which belongs to my user.

UPDATE:

It worked!

FInally…

So what I did to fix the last error was to just delete the file which was already there so that the app could create the file with the right permissions.

Thank you all for helping me :D

Now I will test it out with my application.

Loic

Good to know it works!!
Thanks for the feedback.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.