./nvml_lib: symbol lookup error: ./nvml_lib: undefined symbol: nvmlDeviceGetComputeRunningProcesses_v3
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_18:49:52_PDT_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0
Device Driver Version: 470.141.03
NVML Version: 11.470.141.03
Unbuntu 18.04
#include <stdio.h>
#include <stdlib.h>
#include <nvml.h>
int
main(int argc, char* argv[])
{
int i;
unsigned int deviceCount;
nvmlReturn_t result;
char version[64], pname[256];
nvmlProcessInfo_t infos[32];
nvmlDevice_t device;
unsigned int infoCount;
if ((result = nvmlDeviceGetHandleByIndex_v2(0, &device)) != NVML_SUCCESS) {
fprintf(stderr, "error: nvmlDeviceGetHandleByIndex_v2 %d\n", result);
return 1;
}
if ((result = nvmlDeviceGetComputeRunningProcesses_v3(device, &infoCount, infos)) != NVML_SUCCESS) {
fprintf(stderr, "error: Get Compute Running Processes error: d\n", result);
return 1;
}
}
Replacing "_v3" with "_v2" produces a compiler error. Removing the "_v3" gives the same run time error.