Finding that code examples for the nvml API for nvidia cards is just really sparse.
Before any nvml calls could be conducted CMAKE required:
target_link_libraries(04_nvml_testing "/usr/lib/x86_64-linux-gnu/libnvidia-ml.so")
Code snippet:
nvmlReturn_t result;
unsigned int temp;
nvmlDevice_t device;
result = nvmlInit();
nvmlUnit_t unit;
unsigned int myint;
result = nvmlUnitGetHandleByIndex(0, &unit);
I can read the GPU temperature fine, but getting the nvmlUnit_t value of the card is required before a lot of API calls can be made.
This code block inside Clion is kicking: NVML_ERROR_INVALID_ARGUMENT
Also there is references to 'available to s-Series devices' whatever that is..