Commit 1fa53f22 authored by Weronika's avatar Weronika

removed some commented out code and fixed a couple of typos

parent 1b55b4ea
This DCDB plugin uses the NVML libarary to capture the following GPU metrics: This DCDB plugin uses the NVML library to capture the following GPU metrics:
* Power - sensor /test/nvml/power * Power - sensor /test/nvml/power
......
...@@ -37,6 +37,7 @@ struct env_t { ...@@ -37,6 +37,7 @@ struct env_t {
nvmlDevice_t device; nvmlDevice_t device;
} env; } env;
// counters storing the GPU metrics queried from the NVML library
struct counters_t { struct counters_t {
unsigned long long energy_initial; unsigned long long energy_initial;
unsigned long long energy_current; unsigned long long energy_current;
...@@ -52,7 +53,6 @@ struct counters_t { ...@@ -52,7 +53,6 @@ struct counters_t {
nvmlUtilization_t utilization; nvmlUtilization_t utilization;
unsigned int pcie_throughput; unsigned int pcie_throughput;
unsigned int procs_cnt; unsigned int procs_cnt;
//nvmlProcessInfo_t running_prcs;
} counters; } counters;
nvmlSensorGroup::nvmlSensorGroup(const std::string& name) : nvmlSensorGroup::nvmlSensorGroup(const std::string& name) :
...@@ -88,10 +88,7 @@ bool nvmlSensorGroup::execOnStart() { ...@@ -88,10 +88,7 @@ bool nvmlSensorGroup::execOnStart() {
} }
void nvmlSensorGroup::execOnStop() { void nvmlSensorGroup::execOnStop() {
/*
* Implement logic when the group stops polling here
* (e.g. close a file descriptor) or remove this method if not required.
*/
cudaError_t cerr; cudaError_t cerr;
cerr = cudaProfilerStop(); cerr = cudaProfilerStop();
} }
...@@ -173,9 +170,7 @@ void nvmlSensorGroup::read() { ...@@ -173,9 +170,7 @@ void nvmlSensorGroup::read() {
reading.value = counters.pcie_throughput; reading.value = counters.pcie_throughput;
break; break;
case(GPU_RUN_PRCS): case(GPU_RUN_PRCS):
//err = nvmlDeviceGetComputeRunningProcesses (env.device,0,&(counters.running_prcs)); err = nvmlDeviceGetComputeRunningProcesses (env.device,&(counters.procs_cnt),NULL);
//reading.value = counters.running_prcs.pid;
err = nvmlDeviceGetComputeRunningProcesses (env.device,&(counters.procs_cnt),NULL);
reading.value = counters.procs_cnt; reading.value = counters.procs_cnt;
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment