Cldfire/nvml-wrapper

Cannot call legacy functions

lharri73 opened this issue ยท 3 comments

device_count() panics with value: FailedToLoadSymbol("/lib64/libnvidia-ml.so: undefined symbol: nvmlDeviceGetComputeRunningProcesses_v3")

nvml_wrapper version: 0.9.0 (with legacy-functions feature)
nvidia driver version: 470.161.03

Is something else required to call the v2 version of this function?

edit: nevermind, I didn't see that you've already enabled the legacy-functions feature ๐Ÿ˜…
It's weird then. Maybe you can call the right version directly from nvml-wrapper-sys?

@lharri73 Nvml.device_count() is implemented as:

    pub fn device_count(&self) -> Result<u32, NvmlError> {
        let sym = nvml_sym(self.lib.nvmlDeviceGetCount_v2.as_ref())?;

        unsafe {
            let mut count: c_uint = mem::zeroed();
            nvml_try(sym(&mut count))?;

            Ok(count)
        }
    }

Meaning it is already trying to call the v2 version of the function (self.lib.nvmlDeviceGetCount_v2).

The error you shared implies you were trying to call Device.running_compute_processes(). Can you clarify what you were calling here and share a bit of your code please? ๐Ÿ™‚

Closing for inactivity. If you're still having issues feel free to comment ๐Ÿ™‚