No NVTX events collected

Hi, I’m on the latest version of Nsight Systems 2021.2.4. I tried running a basic program here:

#include <nvtx3/nvToolsExt.h>
#include <Windows.h>
#include <thread>

static void wait(int ms) {
	nvtxRangePushA("wait()");
	nvtxMarkA("Waiting...");
	Sleep(ms);
	nvtxRangePop();
}

int main(void) {
	nvtxInitialize(0);
	nvtxNameOsThreadA(1, "Main Thread");
	nvtxRangePushA("main()");
	wait(5000);
	nvtxRangePop();
}

But when I run the program through Nsight Systems, I get a warning that says: “No NVTX events collected. Does the process use NVTX?” Instead, all the threads are in a blocked state and I cannot tell if there is any useful information. Is there something wrong with my test?

I just tested Nsight Systems on the nvToolsExt samples, but I’m getting the same issue that no NVTX samples are being collected. I tried collecting CUDA and Vulkan from other samples, both of which seem to be fine. My hardware is an RTX 3070 with an AMD Ryzen 9 5900HS.

I passed this issue on to @jcohen, who is our NVTX expert. He indicated that your code is fine and he would look into what the problem was.

1 Like

Hi Jebbly, your test is perfectly fine. I can’t repro the problem – here is what I get when I compile your code and run it in Nsight Systems with “NVTX” enabled:

I tried capturing both from the GUI and the command line, and I get the NVTX events. Does it work for you when you disable all trace options except for NVTX?

Oh, also, Nsight Systems 2021.3 is out now. I don’t really expect that to change anything in this case, but it couldn’t hurt to grab the newest version, since that’s what I’m testing with.