0

./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.

1 Answer 1

0

The symbol nvmlDeviceGetComputeRunningProcesses_v3 is unavailable with Device Driver Version 470.141.03. Switch to the oldest version of nvcc that supports CUDA 11, and was able to compile and link using the older "_v2" call.

    nvcc --version
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2020 NVIDIA Corporation
    Built on Mon_Oct_12_20:09:46_PDT_2020
    Cuda compilation tools, release 11.1, V11.1.105
    Build cuda_11.1.TC455_06.29190527_0


    nm --dynamic /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1 | grep -i runningprocess
    0000000000050e10 T nvmlDeviceGetComputeRunningProcesses
    0000000000051010 T nvmlDeviceGetComputeRunningProcesses_v2
    0000000000051370 T nvmlDeviceGetGraphicsRunningProcesses
    0000000000051570 T nvmlDeviceGetGraphicsRunningProcesses_v2
    00000000000518d0 T nvmlDeviceGetMPSComputeRunningProcesses
    0000000000051ad0 T nvmlDeviceGetMPSComputeRunningProcesses_v2
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.