# Nvprof - Unified Memory profiling failed \[solved\]

**URL:** <https://forums.developer.nvidia.com/t/nvprof-unified-memory-profiling-failed-solved/61197>\
**Category:** Visual Profiler and nvprof\
**Created:** [May 11, 2018, 2:12pm UTC](https://forums.developer.nvidia.com/t/nvprof-unified-memory-profiling-failed-solved/61197 "2018-05-11T14:12:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![admich](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@admich](https://forums.developer.nvidia.com/u/admich)\
**Post date:** [May 11, 2018, 2:12pm UTC](https://forums.developer.nvidia.com/t/nvprof-unified-memory-profiling-failed-solved/61197/1 "2018-05-11T14:12:55Z")

</div>

Hi all,

I’m trying to profile my program which is using UM. Unfortunately, I cannot profile the memory copy process…

When I add the flag “–unified-memory-profiling per-process-device” I get the Error:  
Error: unified memory profiling failed.

I am aware of the following posts:  
[https://stackoverflow.com/questions/39962675/unified-memory-profiling-failed?answertab=votes#tab-top](https://stackoverflow.com/questions/39962675/unified-memory-profiling-failed?answertab=votes#tab-top)  
[https://devtalk.nvidia.com/default/topic/1010924/visual-profiler/unified-memory-profiling-failed/post/5159265/#5159265](https://devtalk.nvidia.com/default/topic/1010924/visual-profiler/unified-memory-profiling-failed/post/5159265/#5159265)  
But I do not have root permissions on the server I am profiling on.

Is there a solution for this error?

I’m using CUDA 8.0 and a K40m on Ubuntu 16.04.4 LTS.

Thanks in advance,

Adrian

---

<div class="post-metadata">

**Author:** ![veraj](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/veraj/32/256893_2.png) [@veraj](https://forums.developer.nvidia.com/u/veraj)\
**Post date:** [May 14, 2018, 2:25am UTC](https://forums.developer.nvidia.com/t/nvprof-unified-memory-profiling-failed-solved/61197/2 "2018-05-14T02:25:07Z")

</div>

Hi, admich

Before the error printed, have you seen any warning about uvm ?  
I’m afraid you system do not meet uvm profiling system requirements. Then you get such error.

---

<div class="post-metadata">

**Author:** ![admich](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@admich](https://forums.developer.nvidia.com/u/admich)\
**Post date:** [May 14, 2018, 6:17am UTC](https://forums.developer.nvidia.com/t/nvprof-unified-memory-profiling-failed-solved/61197/3 "2018-05-14T06:17:24Z")

</div>

Hi veraj,

Thanks for your reply!

No, I do not get a warning.

This is all I get when I execute my program:  
/usr/local/cuda-8.0/bin/nvprof --unified-memory-profiling per-process-device ./build/mb\_bandwidth\_unified\_v5  
==3569== NVPROF is profiling process 3569, command: ./build/mb\_bandwidth\_unified\_v5  
======== Error: unified memory profiling failed.

I checked my system with the requirements listed here:

> **[Programming Guide :: CUDA Toolkit Documentation](https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#um-requirements)**
>
> The programming guide to the CUDA model and interface.

Since I’m using a x86\_64 Ubuntu and a card with sm 3.5 it should work.

Other Ideas?

Best regards,  
Adrian

---

<div class="post-metadata">

**Author:** ![veraj](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/veraj/32/256893_2.png) [@veraj](https://forums.developer.nvidia.com/u/veraj)\
**Post date:** [May 14, 2018, 6:34am UTC](https://forums.developer.nvidia.com/t/nvprof-unified-memory-profiling-failed-solved/61197/4 "2018-05-14T06:34:22Z")

</div>

Hi, admich

As the devtalk link you provided before, we can not reproduce this issue on CUDA 8.0.

1. Upgrade your toolkit/driver to latest version, for current stage, it is 9.1. 9.2 will out soon
2. Check if it is sample specific, you can try SDK sample 0\_Simple/UnifiedMemoryStreams to see if it works

If all not work, I’ll check with dev if we have this GPU support issue.

---

<div class="post-metadata">

**Author:** ![abishek](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@abishek](https://forums.developer.nvidia.com/u/abishek)\
**Post date:** [May 17, 2018, 9:13am UTC](https://forums.developer.nvidia.com/t/nvprof-unified-memory-profiling-failed-solved/61197/5 "2018-05-17T09:13:03Z")

</div>

[Solved]:

I faced the same situation as unified memory profiling failed, try adding the cuda path to the sudoers list in the following way,

1.sudo visudo  
2.modify the defauslt secure path int he following way

```auto
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/cuda/bin/:"

```

now try to run the command/application

```auto
sudo nvprof ./matmul

```

---

<div class="post-metadata">

**Author:** ![veraj](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/veraj/32/256893_2.png) [@veraj](https://forums.developer.nvidia.com/u/veraj)\
**Post date:** [May 18, 2018, 2:54am UTC](https://forums.developer.nvidia.com/t/nvprof-unified-memory-profiling-failed-solved/61197/6 "2018-05-18T02:54:21Z")

</div>

Great. Thanks for the info.

---

<div class="post-metadata">

**Author:** ![pasinduath](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@pasinduath](https://forums.developer.nvidia.com/u/pasinduath)\
**Post date:** [June 17, 2018, 10:57am UTC](https://forums.developer.nvidia.com/t/nvprof-unified-memory-profiling-failed-solved/61197/7 "2018-06-17T10:57:44Z")

</div>

You don’t need root access to fix this. Since you are using Cuda 8.0 this should be working. The problem lies in the ‘iBUS’ config. All you have to do is delete the folder /home/[user]/.config/ibus/bus and the problem will be gone.

---

<div class="post-metadata">

**Author:** ![munesh.ibr](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@munesh.ibr](https://forums.developer.nvidia.com/u/munesh.ibr)\
**Post date:** [June 2, 2019, 4:49pm UTC](https://forums.developer.nvidia.com/t/nvprof-unified-memory-profiling-failed-solved/61197/8 "2019-06-02T16:49:41Z")

</div>

> [@](#):
>
> You don’t need root access to fix this. Since you are using Cuda 8.0 this should be working. The problem lies in the ‘iBUS’ config. All you have to do is delete the folder /home/[user]/.config/ibus/bus and the problem will be gone.

Any specific reason for this issue related to bus?
