Unable to run profiler: Encountered invalid option --track-memory-allocations


I am unable to run the NVIDIA Visual Profiler from the GUI, it is returning “Profiling failed: Unable to profile application. “Internal error: the profiler is not configured correctly””. The console is saying: “Error: Encountered invalid option: – track-memory-allocations”, this is the case even while the Track Memory Allocations box is unchecked. The problem occurs on all cuda programs, including the nvidia samples.

In the command line everything seems to work fine and I am able to pass the results to the Visual Profiler using the .nvprof file.

Current version of the profiler installed is 9.1.85 (21), nvcc version is 9.1.85 as well.
Ubuntu 16.04 is running on the 4.10 kernel.

Please advice on how to solve this issues as I’m only bumping into openACC related errors on google.

Hi, jornkock

Sorry for the issue you met.

Can you tell which GPU/driver are you using ?

Sorry for the late reply, facing the problem both on the 387.26 and the 384.111 driver with a GTX1080

Hi, jornkoch

You met the issue even if “Track Memory Allocations box is unchecked” is because it will add --track-memory-allocations off in the command line when profile from UI. Seems the nvprof on your machine can not handle this option.

But for CUDA9.1.85, I can’t reproduce this issue on my side.

So I think maybe something messed up about the nvprof version, please check if below nvprof command line can reproduce your problem fistly
$nvprof --version
$nvprof --track-memory-allocations off ./sample

If command line also reproduce this, I suggest

  1. uninstall all the toolkit on the machine if you have multi versions installed
  2. rm -rf nvvp-workspace
  3. Re-Install the CUDA 9.1.85 download from official website
  4. add the /usr/local/cuda/bin to path, add /usr/local/cuda/lib64 to LD_LIBRARY_PATH
  5. check nvprof --track-memory-allocations off ./sample again

Hope this works !