Skip to content

Commit

Permalink
fix(system_monitor): modify build error in rolling (#788)
Browse files Browse the repository at this point in the history
Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
  • Loading branch information
wep21 authored and yn-mrse committed Dec 20, 2022
1 parent 63b0a55 commit 43125ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion system/system_monitor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wno-stringop-truncation)
endif()

find_package(ament_cmake_auto REQUIRED)
Expand Down
8 changes: 4 additions & 4 deletions system/system_monitor/src/gpu_monitor/nvml_gpu_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ void GPUMonitor::addProcessUsage(
uint32_t info_count = MAX_ARRAY_SIZE;
std::unique_ptr<nvmlProcessInfo_t[]> infos;
infos = std::make_unique<nvmlProcessInfo_t[]>(MAX_ARRAY_SIZE);
ret = nvmlDeviceGetComputeRunningProcesses_v2(device, &info_count, infos.get());
ret = nvmlDeviceGetComputeRunningProcesses(device, &info_count, infos.get());
if (ret != NVML_SUCCESS) {
RCLCPP_WARN(
this->get_logger(), "Failed to nvmlDeviceGetComputeRunningProcesses_v2 NVML: %s",
this->get_logger(), "Failed to nvmlDeviceGetComputeRunningProcesses NVML: %s",
nvmlErrorString(ret));
return;
}
Expand All @@ -197,10 +197,10 @@ void GPUMonitor::addProcessUsage(
// Get Graphics Process ID
info_count = MAX_ARRAY_SIZE;
infos = std::make_unique<nvmlProcessInfo_t[]>(MAX_ARRAY_SIZE);
ret = nvmlDeviceGetGraphicsRunningProcesses_v2(device, &info_count, infos.get());
ret = nvmlDeviceGetGraphicsRunningProcesses(device, &info_count, infos.get());
if (ret != NVML_SUCCESS) {
RCLCPP_WARN(
this->get_logger(), "Failed to nvmlDeviceGetGraphicsRunningProcesses_v2 NVML: %s",
this->get_logger(), "Failed to nvmlDeviceGetGraphicsRunningProcesses NVML: %s",
nvmlErrorString(ret));
return;
}
Expand Down

0 comments on commit 43125ee

Please sign in to comment.