diff --git a/LICENSE b/LICENSE index 08c6047f..6cc301f3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/cpp/include/ucxx/constructors.h b/cpp/include/ucxx/constructors.h index 847aa6e1..bd020b05 100644 --- a/cpp/include/ucxx/constructors.h +++ b/cpp/include/ucxx/constructors.h @@ -1,13 +1,13 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. + * SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include #include -#include +#include #include #include diff --git a/cpp/include/ucxx/request_am.h b/cpp/include/ucxx/request_am.h index 586abd89..e952bfa6 100644 --- a/cpp/include/ucxx/request_am.h +++ b/cpp/include/ucxx/request_am.h @@ -1,5 +1,5 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. + * SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once @@ -90,7 +90,7 @@ class RequestAm : public Request { RequestCallbackUserFunction callbackFunction, RequestCallbackUserData callbackData); - virtual void populateDelayedSubmission(); + void populateDelayedSubmission() override; /** * @brief Create and submit an active message send request. diff --git a/cpp/python/include/ucxx/python/constructors.h b/cpp/python/include/ucxx/python/constructors.h index 53ea6b38..cb2286ed 100644 --- a/cpp/python/include/ucxx/python/constructors.h +++ b/cpp/python/include/ucxx/python/constructors.h @@ -1,11 +1,13 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. + * SPDX-FileCopyrightText: Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #pragma once #include +#include + #include namespace ucxx { diff --git a/cpp/python/src/python_future.cpp b/cpp/python/src/python_future.cpp index cb50d052..b13d048b 100644 --- a/cpp/python/src/python_future.cpp +++ b/cpp/python/src/python_future.cpp @@ -1,9 +1,10 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. + * SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #include #include +#include #include diff --git a/cpp/src/request_am.cpp b/cpp/src/request_am.cpp index 3a6fc455..8b6122fb 100644 --- a/cpp/src/request_am.cpp +++ b/cpp/src/request_am.cpp @@ -1,5 +1,5 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. + * SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #include @@ -145,7 +145,7 @@ ucs_status_t RequestAm::recvCallback(void* arg, // recvAmMessage.callback(nullptr, UCS_ERR_UNSUPPORTED); // return UCS_ERR_UNSUPPORTED; - ucxx_trace_req("No allocator registered for memory type %lu, falling back to host memory.", + ucxx_trace_req("No allocator registered for memory type %u, falling back to host memory.", allocatorType); allocatorType = UCS_MEMORY_TYPE_HOST; } @@ -292,7 +292,7 @@ void RequestAm::populateDelayedSubmission() ucxx_trace_req_f(_ownerString.c_str(), _request, _operationName.c_str(), - "buffer %p, size %lu, memoryType: %lu, future %p, future handle %p, " + "buffer %p, size %lu, memoryType: %u, future %p, future handle %p, " "populateDelayedSubmission", buffer, length, @@ -303,7 +303,7 @@ void RequestAm::populateDelayedSubmission() ucxx_trace_req_f(_ownerString.c_str(), _request, _operationName.c_str(), - "buffer %p, size %lu, memoryType: %lu, populateDelayedSubmission", + "buffer %p, size %lu, memoryType: %u, populateDelayedSubmission", buffer, length, memoryType); diff --git a/cpp/src/request_tag_multi.cpp b/cpp/src/request_tag_multi.cpp index ae9b4485..e3fd2eb8 100644 --- a/cpp/src/request_tag_multi.cpp +++ b/cpp/src/request_tag_multi.cpp @@ -1,9 +1,7 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. + * SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ -#include "ucxx/delayed_submission.h" -#include #include #include #include @@ -273,7 +271,7 @@ void RequestTagMulti::recvCallback(ucs_status_t status) ucxx_trace_req( "RequestTagMulti::recvCallback failed receiving header with status %d (%s), multi request: " "%p, " - "tag: 0x%lx", + "tag: 0x%lx, " "tagMask: 0x%lx", status, ucs_status_string(status), diff --git a/cpp/src/utils/sockaddr.cpp b/cpp/src/utils/sockaddr.cpp index 3d501b6f..fd3d7528 100644 --- a/cpp/src/utils/sockaddr.cpp +++ b/cpp/src/utils/sockaddr.cpp @@ -1,5 +1,5 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. + * SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #include @@ -51,13 +51,16 @@ void sockaddr_get_ip_port_str(const struct sockaddr_storage* sockaddr, addr_in = reinterpret_cast(sockaddr); inet_ntop(AF_INET, &addr_in->sin_addr, ip_str, max_str_size); snprintf(port_str, max_str_size, "%u", ntohs(addr_in->sin_port)); + break; case AF_INET6: addr_in6 = reinterpret_cast(sockaddr); inet_ntop(AF_INET6, &addr_in6->sin6_addr, ip_str, max_str_size); snprintf(port_str, max_str_size, "%u", ntohs(addr_in6->sin6_port)); + break; default: - ip_str = const_cast(reinterpret_cast("Invalid address family")); - port_str = const_cast(reinterpret_cast("Invalid address family")); + snprintf(ip_str, max_str_size, "Invalid address family"); + snprintf(port_str, max_str_size, "Invalid address family"); + break; } } diff --git a/cpp/src/worker.cpp b/cpp/src/worker.cpp index 71ad2afe..ae9a1bbf 100644 --- a/cpp/src/worker.cpp +++ b/cpp/src/worker.cpp @@ -1,5 +1,5 @@ /** - * SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. + * SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. * SPDX-License-Identifier: BSD-3-Clause */ #include @@ -204,7 +204,9 @@ void Worker::initBlockingProgressMode() }}; err = epoll_ctl(_epollFileDescriptor, EPOLL_CTL_ADD, _workerFileDescriptor, &workerEvent); - if (err != 0) throw std::ios_base::failure(std::string("epoll_ctl() returned " + err)); + if (err != 0) { + throw std::ios_base::failure(std::string("epoll_ctl() returned ") + std::to_string(err)); + } } bool Worker::arm()