From a7a509a39e6b1bcbdea919b9bd2b005b51ec7fa6 Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Wed, 18 Jan 2023 14:45:12 -0800 Subject: [PATCH 1/2] #2071: add back in `no_workers`, `WorkerCountType`, and the initialization function that takes in the worker count but make them deprecated to avoid breaking existing code --- src/vt/collective/collective_ops.h | 8 ++++++++ src/vt/configs/types/types_sentinels.h | 2 ++ src/vt/configs/types/types_type.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/src/vt/collective/collective_ops.h b/src/vt/collective/collective_ops.h index e3c9abc699..2254cafdfc 100644 --- a/src/vt/collective/collective_ops.h +++ b/src/vt/collective/collective_ops.h @@ -64,6 +64,14 @@ struct CollectiveAnyOps { int& argc, char**& argv, bool is_interop = false, MPI_Comm* comm = nullptr, arguments::AppConfig const* appConfig = nullptr ); + [[deprecated]] static RuntimePtrType initialize( + int& argc, char**& argv, WorkerCountType const /* num_workers */, + bool is_interop = false, MPI_Comm* comm = nullptr, + arguments::AppConfig const* appConfig = nullptr + ) + { + return initialize(argc, argv, is_interop, comm, appConfig); + } static void finalize(RuntimePtrType in_rt = nullptr); static void scheduleThenFinalize(RuntimePtrType in_rt = nullptr); static void setCurrentRuntimeTLS(RuntimeUnsafePtrType in_rt = nullptr); diff --git a/src/vt/configs/types/types_sentinels.h b/src/vt/configs/types/types_sentinels.h index 6726896c75..cc2235a17a 100644 --- a/src/vt/configs/types/types_sentinels.h +++ b/src/vt/configs/types/types_sentinels.h @@ -52,6 +52,8 @@ namespace vt { // Physical identifier sentinel values (nodes etc.) static constexpr NodeType const uninitialized_destination = static_cast(0xFFFF); +static constexpr PhysicalResourceType const no_workers [[deprecated]] = static_cast(0xFFFF); + // Runtime default `empty' sentinel value static constexpr uint64_t const u64empty = 0xFFFFFFFFFFFFFFFF; static constexpr uint32_t const u32empty = 0xFEEDFEED; diff --git a/src/vt/configs/types/types_type.h b/src/vt/configs/types/types_type.h index 6b7809311e..e3d637c3db 100644 --- a/src/vt/configs/types/types_type.h +++ b/src/vt/configs/types/types_type.h @@ -58,6 +58,8 @@ using NodeType = PhysicalResourceType; /// Used to hold a core ID using CoreType = PhysicalResourceType; +using WorkerCountType [[deprecated]] = PhysicalResourceType; + // Runtime system entity types /// Used to hold a handler ID which identifier a function pointer/context using HandlerType = int64_t; From 741c87bbb1103f5052dc72bd5dd1ad488e92142b Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Wed, 18 Jan 2023 15:24:22 -0800 Subject: [PATCH 2/2] #2071: remove `WorkerCountType` since using it in a deprecated declaration caused deprecation warnings on some compilers --- src/vt/collective/collective_ops.h | 2 +- src/vt/configs/types/types_type.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vt/collective/collective_ops.h b/src/vt/collective/collective_ops.h index 2254cafdfc..3b36e8a29f 100644 --- a/src/vt/collective/collective_ops.h +++ b/src/vt/collective/collective_ops.h @@ -65,7 +65,7 @@ struct CollectiveAnyOps { arguments::AppConfig const* appConfig = nullptr ); [[deprecated]] static RuntimePtrType initialize( - int& argc, char**& argv, WorkerCountType const /* num_workers */, + int& argc, char**& argv, PhysicalResourceType const /* num_workers */, bool is_interop = false, MPI_Comm* comm = nullptr, arguments::AppConfig const* appConfig = nullptr ) diff --git a/src/vt/configs/types/types_type.h b/src/vt/configs/types/types_type.h index e3d637c3db..6b7809311e 100644 --- a/src/vt/configs/types/types_type.h +++ b/src/vt/configs/types/types_type.h @@ -58,8 +58,6 @@ using NodeType = PhysicalResourceType; /// Used to hold a core ID using CoreType = PhysicalResourceType; -using WorkerCountType [[deprecated]] = PhysicalResourceType; - // Runtime system entity types /// Used to hold a handler ID which identifier a function pointer/context using HandlerType = int64_t;