Skip to content

Commit

Permalink
fix(system_monitor): fix build error in Humble (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
h-ohta authored May 15, 2023
1 parent 3f32d67 commit 79d24bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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
2 changes: 1 addition & 1 deletion system/system_monitor/launch/system_monitor.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def launch_setup(context, *args, **kwargs):

def generate_launch_description():
system_monitor_path = os.path.join(
get_package_share_directory("tier4_system_launch"), "config", "system_monitor"
get_package_share_directory("system_monitor"), "config", "system_monitor"
)
return launch.LaunchDescription(
[
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 79d24bf

Please sign in to comment.