From 00b7f0db9cb79263be1e6ae13f9365804f17544b Mon Sep 17 00:00:00 2001 From: Jonathan Lifflander Date: Tue, 2 May 2023 11:22:37 -0700 Subject: [PATCH 001/242] #2142: ci: upgrade CUDA workflow from 11.0 to 12.1.0 --- ...untu-mpich.yml => azure-nvidia-12-ubuntu-mpich.yml} | 6 +++--- scripts/workflows-azure.ini | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) rename ci/azure/{azure-nvidia-11-ubuntu-mpich.yml => azure-nvidia-12-ubuntu-mpich.yml} (98%) diff --git a/ci/azure/azure-nvidia-11-ubuntu-mpich.yml b/ci/azure/azure-nvidia-12-ubuntu-mpich.yml similarity index 98% rename from ci/azure/azure-nvidia-11-ubuntu-mpich.yml rename to ci/azure/azure-nvidia-12-ubuntu-mpich.yml index eb238f08df..cfb4d9c2d8 100644 --- a/ci/azure/azure-nvidia-11-ubuntu-mpich.yml +++ b/ci/azure/azure-nvidia-12-ubuntu-mpich.yml @@ -2,7 +2,7 @@ ############## Warning this is a generated file---do not modify ############### ############################################################################### -name: PR tests (nvidia cuda 11.0, ubuntu, mpich) +name: PR tests (nvidia cuda 12.1.0, ubuntu, mpich) trigger: branches: @@ -27,7 +27,7 @@ variables: ARCH: amd64 UBUNTU: 20.04 COMPILER_TYPE: nvidia - COMPILER: 11.0.3 + COMPILER: 12.1.0 BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 @@ -55,7 +55,7 @@ variables: CMAKE_CXX_STANDARD: 17 TEST_LB_SCHEMA: 0 CACHE: "$(Agent.TempDirectory)/cache/" - cache_name: ubuntu-nvidia-11-cache + cache_name: ubuntu-nvidia-12-cache build_root: "$(CACHE)/$(ARCH)-ubuntu-$(UBUNTU)-$(COMPILER)-cache/" TS: 0 TS_YEAR: 0 diff --git a/scripts/workflows-azure.ini b/scripts/workflows-azure.ini index db974cb55c..0ca1e6713f 100644 --- a/scripts/workflows-azure.ini +++ b/scripts/workflows-azure.ini @@ -60,13 +60,13 @@ cache_name = ubuntu-intel-oneapi-icpc-cache output_name = ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml vt_extended_tests = 0 -[PR-tests-nvcc-11-0] -test_configuration = "nvidia cuda 11.0, ubuntu, mpich" +[PR-tests-nvcc-12-1] +test_configuration = "nvidia cuda 12.1.0, ubuntu, mpich" compiler_type = nvidia -compiler = 11.0.3 +compiler = 12.1.0 distro = 20.04 -cache_name = ubuntu-nvidia-11-cache -output_name = ci/azure/azure-nvidia-11-ubuntu-mpich.yml +cache_name = ubuntu-nvidia-12-cache +output_name = ci/azure/azure-nvidia-12-ubuntu-mpich.yml vt_extended_tests = 0 job_name = build_optional vt_diagnostics = 0 From ac33341a2fc2263106f28face4abca4968325c42 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Sat, 29 Apr 2023 17:09:42 +0200 Subject: [PATCH 002/242] #2138: CI: Change concurrency to use PR number instead of branch name --- .github/workflows/comment-on-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/comment-on-pr.yml b/.github/workflows/comment-on-pr.yml index 5452343649..5c627cae37 100644 --- a/.github/workflows/comment-on-pr.yml +++ b/.github/workflows/comment-on-pr.yml @@ -4,7 +4,7 @@ on: repository_dispatch: types: comment-pr -concurrency: ${{ github.event.repository.name }}-${{ github.ref }} +concurrency: ${{ github.event.repository.name }}-${{ github.event.client_payload.pr_number }} jobs: comment-on-pr: From 162d7a5307d1c6d59a195104c155ae9d7a260d18 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Sat, 8 Apr 2023 15:27:26 +0200 Subject: [PATCH 003/242] #2122: CMake: Silence icpc deprecation warning --- cmake-modules/SetCXXCompilerFlags.cmake | 10 +++++++++- cmake/load_bundled_libraries.cmake | 7 +++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cmake-modules/SetCXXCompilerFlags.cmake b/cmake-modules/SetCXXCompilerFlags.cmake index b02800d518..6c1cd2811c 100644 --- a/cmake-modules/SetCXXCompilerFlags.cmake +++ b/cmake-modules/SetCXXCompilerFlags.cmake @@ -11,6 +11,12 @@ function(set_darma_compiler_flags vt_target) endif () elseif (CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2021.3.0) list(APPEND TARGET_PRIVATE_CXX_FLAGS -fhonor-infinites -fhonor-nans) + elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Intel") + # Intel classic (icpc) + # Set as PUBLIC because we want to propagate it to "derived" targets + # gtest-main links with gtest, while VT's tests link with base VT + list(APPEND TARGET_PUBLIC_CXX_FLAGS -diag-disable=10441) + list(APPEND TARGET_PUBLIC_LINK_FLAGS -diag-disable=10441) elseif (NOT ${CMAKE_CXX_COMPILER_ID} MATCHES "Intel") message(FATAL_ERROR "Your C++ compiler may not support C++14.") endif () @@ -26,9 +32,11 @@ function(set_darma_compiler_flags vt_target) endif() endif() - message(DEBUG "Target ${vt_target} public compile options: ${TARGET_PUBLIC_CXX_FLAGS}") + message(DEBUG "Target ${vt_target} public compile options: ${TARGET_PUBLIC_CXX_FLAGS} \n public link options: ${TARGET_PUBLIC_LINK_FLAGS}") target_compile_options(${vt_target} PUBLIC ${TARGET_PUBLIC_CXX_FLAGS}) + target_link_options(${vt_target} PUBLIC ${TARGET_PUBLIC_LINK_FLAGS}) message(DEBUG "Target ${vt_target} private compile options: ${TARGET_PRIVATE_CXX_FLAGS}") target_compile_options(${vt_target} PRIVATE ${TARGET_PRIVATE_CXX_FLAGS}) + endfunction() diff --git a/cmake/load_bundled_libraries.cmake b/cmake/load_bundled_libraries.cmake index 96146ad6d3..c2773a24ad 100644 --- a/cmake/load_bundled_libraries.cmake +++ b/cmake/load_bundled_libraries.cmake @@ -41,9 +41,12 @@ set(BROTLI_DISABLE_TESTS ON) # we need to disable bundled mode so it will install properly set(BROTLI_BUNDLED_MODE OFF) set(BROTLI_BUILD_PORTABLE ON) -set(BROTLI_LIBRARY brotlicommon-static brotlienc-static brotlidec-static) +set(BROTLI_BUILD_SHARED_LIBS OFF) +set(BROTLI_LIBRARY brotlicommon-static brotlidec-static brotlienc-static) add_subdirectory(${PROJECT_LIB_DIR}/brotli) -set_darma_compiler_flags(${BROTLI_LIBRARY}) +foreach(lib ${BROTLI_LIBRARY}) + set_darma_compiler_flags(${lib}) +endforeach() # Optionally include mimalloc (alternative memory allocator) if (vt_mimalloc_enabled) From 57ee1ca97d80435190cd02c532e2960e374cef8c Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Sat, 8 Apr 2023 15:28:02 +0200 Subject: [PATCH 004/242] #2122: Brotli: Dont build Brotli's shared libs since we don't use them --- lib/brotli/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/brotli/CMakeLists.txt b/lib/brotli/CMakeLists.txt index 4f120cb243..6489daf735 100644 --- a/lib/brotli/CMakeLists.txt +++ b/lib/brotli/CMakeLists.txt @@ -162,7 +162,7 @@ endfunction() transform_sources_list("scripts/sources.lst" "${CMAKE_CURRENT_BINARY_DIR}/sources.lst.cmake") include("${CMAKE_CURRENT_BINARY_DIR}/sources.lst.cmake") -if(BROTLI_EMSCRIPTEN) +if(BROTLI_EMSCRIPTEN OR NOT BROTLI_BUILD_SHARED_LIBS) set(BROTLI_SHARED_LIBS "") else() set(BROTLI_SHARED_LIBS brotlicommon brotlidec brotlienc) @@ -206,7 +206,7 @@ foreach(lib IN LISTS BROTLI_SHARED_LIBS BROTLI_STATIC_LIBS) # set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIRS}") endforeach() -if(NOT BROTLI_EMSCRIPTEN) +if(NOT BROTLI_EMSCRIPTEN AND BROTLI_BUILD_SHARED_LIBS) target_link_libraries(brotlidec brotlicommon) target_link_libraries(brotlienc brotlicommon) endif() @@ -230,7 +230,7 @@ add_executable(brotli ${BROTLI_CLI_C}) target_link_libraries(brotli ${BROTLI_LIBRARIES_STATIC}) # Installation -if(NOT BROTLI_EMSCRIPTEN) +if(NOT BROTLI_EMSCRIPTEN AND BROTLI_BUILD_SHARED_LIBS) if(NOT BROTLI_BUNDLED_MODE) install( TARGETS brotli From a5df9ffeff647fd9a3488171f7f51f21962624e1 Mon Sep 17 00:00:00 2001 From: Jacob Domagala Date: Mon, 8 May 2023 17:57:59 +0200 Subject: [PATCH 005/242] #2122: CMake: Use STREQUAL to determine icpc compiler --- cmake-modules/SetCXXCompilerFlags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake-modules/SetCXXCompilerFlags.cmake b/cmake-modules/SetCXXCompilerFlags.cmake index 6c1cd2811c..25f909438a 100644 --- a/cmake-modules/SetCXXCompilerFlags.cmake +++ b/cmake-modules/SetCXXCompilerFlags.cmake @@ -9,9 +9,9 @@ function(set_darma_compiler_flags vt_target) if (APPLE) list(APPEND TARGET_PUBLIC_CXX_FLAGS -stdlib=libc++) endif () - elseif (CMAKE_CXX_COMPILER_ID STREQUAL IntelLLVM AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2021.3.0) + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 2021.3.0) list(APPEND TARGET_PRIVATE_CXX_FLAGS -fhonor-infinites -fhonor-nans) - elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Intel") + elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel") # Intel classic (icpc) # Set as PUBLIC because we want to propagate it to "derived" targets # gtest-main links with gtest, while VT's tests link with base VT From c7d010120f87c62786ff2a0d3bdcad1fcf8120b4 Mon Sep 17 00:00:00 2001 From: amdarr Date: Tue, 9 May 2023 13:33:37 -0700 Subject: [PATCH 006/242] #2134: modifiable: rename to elimimate typos --- .../insert/{modifyable.h => modifiable.h} | 20 +++++++++---------- .../{modifyable.impl.h => modifiable.impl.h} | 16 +++++++-------- src/vt/vrt/collection/manager.h | 4 ++-- .../proxy_traits/proxy_col_traits.h | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-) rename src/vt/vrt/collection/insert/{modifyable.h => modifiable.h} (85%) rename src/vt/vrt/collection/insert/{modifyable.impl.h => modifiable.impl.h} (85%) diff --git a/src/vt/vrt/collection/insert/modifyable.h b/src/vt/vrt/collection/insert/modifiable.h similarity index 85% rename from src/vt/vrt/collection/insert/modifyable.h rename to src/vt/vrt/collection/insert/modifiable.h index 74df4f557c..14b805ed8c 100644 --- a/src/vt/vrt/collection/insert/modifyable.h +++ b/src/vt/vrt/collection/insert/modifiable.h @@ -2,7 +2,7 @@ //@HEADER // ***************************************************************************** // -// modifyable.h +// modifiable.h // DARMA/vt => Virtual Transport // // Copyright 2019-2021 National Technology & Engineering Solutions of Sandia, LLC @@ -41,8 +41,8 @@ //@HEADER */ -#if !defined INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFYABLE_H -#define INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFYABLE_H +#if !defined INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFIABLE_H +#define INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFIABLE_H #include "vt/config.h" #include "vt/vrt/collection/insert/modify_token.h" @@ -51,12 +51,12 @@ namespace vt { namespace vrt { namespace collection { template -struct Modifyable : BaseProxyT { - Modifyable() = default; - Modifyable(Modifyable const&) = default; - Modifyable(Modifyable&&) = default; - explicit Modifyable(VirtualProxyType const in_proxy); - Modifyable& operator=(Modifyable const&) = default; +struct Modifiable : BaseProxyT { + Modifiable() = default; + Modifiable(Modifiable const&) = default; + Modifiable(Modifiable&&) = default; + explicit Modifiable(VirtualProxyType const in_proxy); + Modifiable& operator=(Modifiable const&) = default; public: /** @@ -78,4 +78,4 @@ struct Modifyable : BaseProxyT { }}} /* end namespace vt::vrt::collection */ -#endif /*INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFYABLE_H*/ +#endif /*INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFIABLE_H*/ diff --git a/src/vt/vrt/collection/insert/modifyable.impl.h b/src/vt/vrt/collection/insert/modifiable.impl.h similarity index 85% rename from src/vt/vrt/collection/insert/modifyable.impl.h rename to src/vt/vrt/collection/insert/modifiable.impl.h index 7a4b28245e..fce3faaba8 100644 --- a/src/vt/vrt/collection/insert/modifyable.impl.h +++ b/src/vt/vrt/collection/insert/modifiable.impl.h @@ -2,7 +2,7 @@ //@HEADER // ***************************************************************************** // -// modifyable.impl.h +// modifiable.impl.h // DARMA/vt => Virtual Transport // // Copyright 2019-2021 National Technology & Engineering Solutions of Sandia, LLC @@ -41,24 +41,24 @@ //@HEADER */ -#if !defined INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFYABLE_IMPL_H -#define INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFYABLE_IMPL_H +#if !defined INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFIABLE_IMPL_H +#define INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFIABLE_IMPL_H #include "vt/config.h" -#include "vt/vrt/collection/insert/modifyable.h" +#include "vt/vrt/collection/insert/modifiable.h" #include "vt/vrt/collection/manager.h" #include "vt/vrt/proxy/base_collection_proxy.h" namespace vt { namespace vrt { namespace collection { template -Modifyable::Modifyable( +Modifiable::Modifiable( VirtualProxyType const in_proxy ) : BaseProxyT(in_proxy) { } template -ModifierToken Modifyable::beginModification( +ModifierToken Modifiable::beginModification( std::string const& label ) const { auto const col_proxy = this->getProxy(); @@ -66,7 +66,7 @@ ModifierToken Modifyable::beginModification( } template -void Modifyable::finishModification( +void Modifiable::finishModification( ModifierToken&& token ) const { auto const col_proxy = this->getProxy(); @@ -75,4 +75,4 @@ void Modifyable::finishModification( }}} /* end namespace vt::vrt::collection */ -#endif /*INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFYABLE_IMPL_H*/ +#endif /*INCLUDED_VT_VRT_COLLECTION_INSERT_MODIFIABLE_IMPL_H*/ diff --git a/src/vt/vrt/collection/manager.h b/src/vt/vrt/collection/manager.h index 3dd95b156d..020115113d 100644 --- a/src/vt/vrt/collection/manager.h +++ b/src/vt/vrt/collection/manager.h @@ -1151,7 +1151,7 @@ struct CollectionManager * * \param[in] proxy the collection proxy bits * - * \return number of local elmeents + * \return number of local elements */ template std::size_t groupElementCount(VirtualProxyType const& proxy); @@ -1778,7 +1778,7 @@ struct CollectionManager #include "vt/vrt/collection/reducable/reducable.impl.h" #include "vt/vrt/collection/invoke/invokable.impl.h" #include "vt/vrt/collection/insert/insertable.impl.h" -#include "vt/vrt/collection/insert/modifyable.impl.h" +#include "vt/vrt/collection/insert/modifiable.impl.h" #include "vt/vrt/collection/destroy/destroyable.impl.h" #include "vt/vrt/collection/destroy/manager_destroy_attorney.impl.h" #include "vt/vrt/collection/broadcast/broadcastable.impl.h" diff --git a/src/vt/vrt/collection/proxy_traits/proxy_col_traits.h b/src/vt/vrt/collection/proxy_traits/proxy_col_traits.h index 8f9258b4ff..d93b75fcd6 100644 --- a/src/vt/vrt/collection/proxy_traits/proxy_col_traits.h +++ b/src/vt/vrt/collection/proxy_traits/proxy_col_traits.h @@ -48,7 +48,7 @@ #include "vt/vrt/collection/destroy/destroyable.h" #include "vt/vrt/collection/reducable/reducable.h" #include "vt/vrt/collection/broadcast/broadcastable.h" -#include "vt/vrt/collection/insert/modifyable.h" +#include "vt/vrt/collection/insert/modifiable.h" #include "vt/vrt/collection/rdmaable/rdmaable.h" #include "vt/vrt/proxy/base_collection_proxy.h" @@ -60,7 +60,7 @@ template using Chain5 = RDMAable>; template -using Chain4 = Modifyable>; +using Chain4 = Modifiable>; template using Chain3 = Broadcastable>; From f1b9a4eebca5fab1264380a6bde1c48bcc794c2d Mon Sep 17 00:00:00 2001 From: amdarr Date: Tue, 9 May 2023 13:34:17 -0700 Subject: [PATCH 007/242] #2134: tests: eliminate typos --- sketches/sketch_j1d.cc | 6 +++--- tests/perf/common/test_harness.cc | 2 +- tests/unit/active/test_pending_send.cc | 4 ++-- tests/unit/collection/test_collection_construct_common.h | 2 +- tests/unit/collection/test_collection_group.extended.cc | 2 +- .../test_model_weighted_communication_volume.nompi.cc | 2 +- tests/unit/collection/test_reduce_collection_race.cc | 8 ++++---- tests/unit/objgroup/test_objgroup.cc | 2 +- tests/unit/termination/test_term_cleanup.cc | 2 +- tests/unit/timetrigger/test_time_trigger.extended.cc | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sketches/sketch_j1d.cc b/sketches/sketch_j1d.cc index 53a0346da2..5aed418977 100644 --- a/sketches/sketch_j1d.cc +++ b/sketches/sketch_j1d.cc @@ -1,8 +1,8 @@ -// sketched out example interface to VirutalContextCollection, just for +// sketched out example interface to VirtualContextCollection, just for // pedagogical purposes template -struct VirutalContextCollection { +struct VirtualContextCollection { Idx index(); Idx min_index(); Idx max_index(); @@ -32,7 +32,7 @@ struct FinishedMsg : vt::Message { }; // the virtual context for a Jacobi1D block -struct Jacobi1D : VirutalContextCollection> { +struct Jacobi1D : VirtualContextCollection> { double* v1 = nullptr, *v2 = nullptr; double lb = 0.0, rb = 0.0; int size = 0; diff --git a/tests/perf/common/test_harness.cc b/tests/perf/common/test_harness.cc index 7fd028c779..c7313fdced 100644 --- a/tests/perf/common/test_harness.cc +++ b/tests/perf/common/test_harness.cc @@ -441,7 +441,7 @@ void PerfTestHarness::SpinScheduler() { } void PerfTestHarness::GetMemoryUsage() { - // Memory footpring from PerfTestHarness' internal data structs are included + // Memory footprint from PerfTestHarness' internal data structs are included memory_use_[current_run_].push_back(mem_tracker_.getUsage()); } diff --git a/tests/unit/active/test_pending_send.cc b/tests/unit/active/test_pending_send.cc index 9f320ddd5c..6d18bcd834 100644 --- a/tests/unit/active/test_pending_send.cc +++ b/tests/unit/active/test_pending_send.cc @@ -103,7 +103,7 @@ TEST_F(TestPendingSend, test_pending_send_hold) { theTerm()->finishedEpoch(ep); // It should not break out of this loop because of - // !theTerm()->isEpochTermianted(ep), thus `k` is used to + // !theTerm()->isEpochTerminated(ep), thus `k` is used to // break out int k = 0; @@ -143,7 +143,7 @@ TEST_F(TestPendingSend, test_pending_broadcast_hold) { theTerm()->finishedEpoch(ep); // It should not break out of this loop because of - // !theTerm()->isEpochTermianted(ep), thus `k` is used to + // !theTerm()->isEpochTerminated(ep), thus `k` is used to // break out int k = 0; diff --git a/tests/unit/collection/test_collection_construct_common.h b/tests/unit/collection/test_collection_construct_common.h index f239434bad..33ff3f9d86 100644 --- a/tests/unit/collection/test_collection_construct_common.h +++ b/tests/unit/collection/test_collection_construct_common.h @@ -74,7 +74,7 @@ struct ConstructHandlers { static void handler(CollectionT* col, MessageT* msg) { // fmt::print( // "{}: constructed TestCol: idx.x()={}\n", - // theContext()->getNode(), col->getInex().x(), print_ptr(col) + // theContext()->getNode(), col->getIndex().x(), print_ptr(col) // ); } }; diff --git a/tests/unit/collection/test_collection_group.extended.cc b/tests/unit/collection/test_collection_group.extended.cc index 0d08a1e2c9..32b9c94a36 100644 --- a/tests/unit/collection/test_collection_group.extended.cc +++ b/tests/unit/collection/test_collection_group.extended.cc @@ -246,7 +246,7 @@ struct TestCollection : Collection { ); // Even if msg was sent locally, it is still serialized, - // and the handler gots a fresh copy of it. + // and the handler gets a fresh copy of it. if (from_node == to_node) { EXPECT_TRUE(was_serialized); } diff --git a/tests/unit/collection/test_model_weighted_communication_volume.nompi.cc b/tests/unit/collection/test_model_weighted_communication_volume.nompi.cc index 6271721956..40409270a1 100644 --- a/tests/unit/collection/test_model_weighted_communication_volume.nompi.cc +++ b/tests/unit/collection/test_model_weighted_communication_volume.nompi.cc @@ -179,4 +179,4 @@ TEST_F(TestModelWeightedCommunicationVolume, test_model) { } } -}}}}} // end namespace vt::tests::unit::veighted::volume +}}}}} // end namespace vt::tests::unit::weighted::volume diff --git a/tests/unit/collection/test_reduce_collection_race.cc b/tests/unit/collection/test_reduce_collection_race.cc index 37459a7bc6..0790d73c20 100644 --- a/tests/unit/collection/test_reduce_collection_race.cc +++ b/tests/unit/collection/test_reduce_collection_race.cc @@ -51,12 +51,12 @@ using TestReduceCollectionRace = TestParallelHarnessParam; struct MyCol : vt::Collection {}; using ReduceMsg = vt::collective::ReduceTMsg; -static int multipler = 0; +static int multiplier = 0; struct ReduceFunctor { void operator()(ReduceMsg* msg) { auto const num_nodes = theContext()->getNumNodes(); - auto const num_elems = num_nodes * multipler; + auto const num_elems = num_nodes * multiplier; fmt::print("reduce finished: val={}, num_elems={}\n", msg->getVal(), num_elems); EXPECT_EQ(msg->getVal(), (num_elems * (num_elems-1))/2); } @@ -72,8 +72,8 @@ static void handler(MyCol* col) { TEST_P(TestReduceCollectionRace, test_reduce_race_1) { auto const num_nodes = theContext()->getNumNodes(); - multipler = GetParam(); - auto const range = Index1D(multipler * num_nodes); + multiplier = GetParam(); + auto const range = Index1D(multiplier * num_nodes); auto proxy = theCollection()->constructCollective( range, "test_reduce_race_1" ); diff --git a/tests/unit/objgroup/test_objgroup.cc b/tests/unit/objgroup/test_objgroup.cc index 572e6c238c..d0f83474a7 100644 --- a/tests/unit/objgroup/test_objgroup.cc +++ b/tests/unit/objgroup/test_objgroup.cc @@ -377,7 +377,7 @@ struct MyTestObj { ); // Even if msg was sent locally, it is still serialized, - // and the handler gots a fresh copy of it. + // and the handler gets a fresh copy of it. if (from_node == to_node) { EXPECT_TRUE(was_serialized); } diff --git a/tests/unit/termination/test_term_cleanup.cc b/tests/unit/termination/test_term_cleanup.cc index 57f779f8a5..6e587d897f 100644 --- a/tests/unit/termination/test_term_cleanup.cc +++ b/tests/unit/termination/test_term_cleanup.cc @@ -58,7 +58,7 @@ struct TestTermCleanup : TestParallelHarness { using TestMsgType = TestStaticBytesNormalMsg<64>; static void handler(TestMsgType* msg) { - //fmt::print("recieve msg\n"); + //fmt::print("receive msg\n"); } }; diff --git a/tests/unit/timetrigger/test_time_trigger.extended.cc b/tests/unit/timetrigger/test_time_trigger.extended.cc index 3a7b830aed..660dac0b0f 100644 --- a/tests/unit/timetrigger/test_time_trigger.extended.cc +++ b/tests/unit/timetrigger/test_time_trigger.extended.cc @@ -130,7 +130,7 @@ TEST_F(TestTimeTrigger, test_time_trigger_manager_trigger_ready) { trigger_manager->triggerReady(current_time + trigger_period_s + 0.01); EXPECT_EQ(triggered, 2); - // test unregisteration of triggers + // test unregistration of triggers auto prev_triggered = triggered; trigger_manager->removeTrigger(id); trigger_manager->triggerReady(current_time + trigger_period_s + 0.01); From dba42769621bf825d422d5712539fbd5e1af0bf3 Mon Sep 17 00:00:00 2001 From: amdarr Date: Tue, 9 May 2023 13:35:31 -0700 Subject: [PATCH 008/242] #2134: collection: eliminate typos --- .../vrt/collection/balance/hierarchicallb/hierlb.cc | 10 +++++----- .../vrt/collection/balance/hierarchicallb/hierlb.h | 2 +- src/vt/vrt/collection/balance/model/load_model.h | 2 +- .../vrt/collection/balance/temperedlb/temperedlb.cc | 4 ++-- .../vrt/collection/balance/temperedlb/temperedlb.h | 2 +- src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc | 2 +- src/vt/vrt/collection/broadcast/broadcastable.h | 12 ++++++------ src/vt/vrt/collection/send/sendable.h | 12 ++++++------ 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/vt/vrt/collection/balance/hierarchicallb/hierlb.cc b/src/vt/vrt/collection/balance/hierarchicallb/hierlb.cc index 0d0fae47dc..b41661dc40 100644 --- a/src/vt/vrt/collection/balance/hierarchicallb/hierlb.cc +++ b/src/vt/vrt/collection/balance/hierarchicallb/hierlb.cc @@ -501,7 +501,7 @@ void HierarchicalLB::lbTreeUp( if (bin.second.size() > 0) { // splice in the new list to accumulated work units that fall in a - // common histrogram bin + // common histogram bin auto given_iter = given_objs.find(bin.first); if (given_iter == given_objs.end()) { @@ -565,7 +565,7 @@ void HierarchicalLB::lbTreeUp( ); sendDownTree(); } else { - distributeAmoungChildren(); + distributeAmongChildren(); } } } @@ -691,12 +691,12 @@ void HierarchicalLB::sendDownTree() { } } -void HierarchicalLB::distributeAmoungChildren() { +void HierarchicalLB::distributeAmongChildren() { auto const& this_node = theContext()->getNode(); vt_debug_print( normal, hierlb, - "distributeAmoungChildren: parent={}\n", parent + "distributeAmongChildren: parent={}\n", parent ); auto cIter = given_objs.rbegin(); @@ -756,7 +756,7 @@ void HierarchicalLB::distributeAmoungChildren() { auto const& is_live = child.second->is_live; vt_debug_print( verbose, hierlb, - "distributeAmoungChildren: parent={}, child={}. is_live={}, size={}, " + "distributeAmongChildren: parent={}, child={}. is_live={}, size={}, " "load={}\n", parent, node, is_live, node_size, TimeTypeWrapper(load / 1000) ); diff --git a/src/vt/vrt/collection/balance/hierarchicallb/hierlb.h b/src/vt/vrt/collection/balance/hierarchicallb/hierlb.h index e3f0dc82df..e2c5de91b1 100644 --- a/src/vt/vrt/collection/balance/hierarchicallb/hierlb.h +++ b/src/vt/vrt/collection/balance/hierarchicallb/hierlb.h @@ -109,7 +109,7 @@ struct HierarchicalLB : LoadSamplerBaseLB { ); void sendDownTree(); - void distributeAmoungChildren(); + void distributeAmongChildren(); void clearObj(ObjSampleType& objs); HierLBChild* findMinChild(); void startMigrations(); diff --git a/src/vt/vrt/collection/balance/model/load_model.h b/src/vt/vrt/collection/balance/model/load_model.h index 0f6dbfdb3d..6593278e05 100644 --- a/src/vt/vrt/collection/balance/model/load_model.h +++ b/src/vt/vrt/collection/balance/model/load_model.h @@ -265,7 +265,7 @@ struct LoadModel /** * \brief Compute how many phases of past load statistics need to be - * kept availble for the model to use + * kept available for the model to use * * \param[in] look_back How many phases into the past the caller * intends to query diff --git a/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc b/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc index 32af5af035..2af126eb26 100644 --- a/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc +++ b/src/vt/vrt/collection/balance/temperedlb/temperedlb.cc @@ -155,7 +155,7 @@ Default: ModifiedGrapevine Values: {SyncInform, AsyncInform} Default: AsyncInform Description: - Approach used to track rounds in the information propagatation step. Options + Approach used to track rounds in the information propagation step. Options are: SyncInform: synchronous sharing of underloaded processor loads. The round number is defined at the processor level. This approach propagates known @@ -237,7 +237,7 @@ Default: false Values: {true, false} Default: true Description: - If the final iteration of a trial has a worse imbalance than any earier + If the final iteration of a trial has a worse imbalance than any earlier iteration, it will roll back to the iteration with the best imbalance. )" }, diff --git a/src/vt/vrt/collection/balance/temperedlb/temperedlb.h b/src/vt/vrt/collection/balance/temperedlb/temperedlb.h index 6839ae6eb7..20617ae1da 100644 --- a/src/vt/vrt/collection/balance/temperedlb/temperedlb.h +++ b/src/vt/vrt/collection/balance/temperedlb/temperedlb.h @@ -146,7 +146,7 @@ struct TemperedLB : BaseLB { /** * \brief Whether to roll back to the best iteration * - * If the final iteration of a trial has a worse imbalance than any earier + * If the final iteration of a trial has a worse imbalance than any earlier * iteration, it will roll back to the best iteration. */ bool rollback_ = true; diff --git a/src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc b/src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc index 299c5d7321..94612a8149 100644 --- a/src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc +++ b/src/vt/vrt/collection/balance/zoltanlb/zoltanlb.cc @@ -438,7 +438,7 @@ void ZoltanLB::setParams() { std::unique_ptr ZoltanLB::makeGraph() { // Insert local load objs into a std::set to get a deterministic order to - // traverse them for building the graph consistenly + // traverse them for building the graph consistently std::set load_objs; for (auto obj : *load_model_) { if (obj.isMigratable()) { diff --git a/src/vt/vrt/collection/broadcast/broadcastable.h b/src/vt/vrt/collection/broadcast/broadcastable.h index 2c7061c317..5e21072ac5 100644 --- a/src/vt/vrt/collection/broadcast/broadcastable.h +++ b/src/vt/vrt/collection/broadcast/broadcastable.h @@ -85,7 +85,7 @@ struct Broadcastable : BaseProxyT { /** * \brief Rooted broadcast with action function handler * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ @@ -117,7 +117,7 @@ struct Broadcastable : BaseProxyT { /** * \brief Rooted broadcast with action member handler * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ @@ -141,7 +141,7 @@ struct Broadcastable : BaseProxyT { * \brief Create message (with action function handler) and broadcast it in a * collective manner to the collection * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ @@ -165,7 +165,7 @@ struct Broadcastable : BaseProxyT { * \brief Create message (with action member handler) and broadcast it in a * collective manner to the collection * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ @@ -216,7 +216,7 @@ struct Broadcastable : BaseProxyT { /** * \brief Rooted broadcast with action function handler * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ @@ -243,7 +243,7 @@ struct Broadcastable : BaseProxyT { * \brief Create message (with action function handler) and broadcast it in a * collective manner to the collection * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ diff --git a/src/vt/vrt/collection/send/sendable.h b/src/vt/vrt/collection/send/sendable.h index fb9191eb90..a695052468 100644 --- a/src/vt/vrt/collection/send/sendable.h +++ b/src/vt/vrt/collection/send/sendable.h @@ -75,7 +75,7 @@ struct Sendable : BaseProxyT { /** * \brief Create message (with action function handler) and send to collection element * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ @@ -85,7 +85,7 @@ struct Sendable : BaseProxyT { /** * \brief Create message (with action function handler) and send to collection element * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ @@ -104,7 +104,7 @@ struct Sendable : BaseProxyT { /** * \brief Create message (with action member handler) and send to collection element * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ @@ -114,7 +114,7 @@ struct Sendable : BaseProxyT { /** * \brief Create message (with action member handler) and send to collection element * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ @@ -126,7 +126,7 @@ struct Sendable : BaseProxyT { /** * \brief Create message (with action function handler) and send to collection element * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ @@ -141,7 +141,7 @@ struct Sendable : BaseProxyT { /** * \brief Create message (with action function handler) and send to collection element * - * \param[in] args arguments needed for creteating the message + * \param[in] args arguments needed for creating the message * * \return a pending send */ From 26adccb2e52b1bf5529b7fa536429887c3c0f115 Mon Sep 17 00:00:00 2001 From: amdarr Date: Tue, 9 May 2023 13:36:37 -0700 Subject: [PATCH 009/242] #2134: context: eliminate typos --- src/vt/vrt/context/context_vrtmanager.cc | 2 +- src/vt/vrt/context/context_vrtmanager.h | 4 ++-- src/vt/vrt/context/context_vrtmanager.impl.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vt/vrt/context/context_vrtmanager.cc b/src/vt/vrt/context/context_vrtmanager.cc index c09e901d33..becb64982a 100644 --- a/src/vt/vrt/context/context_vrtmanager.cc +++ b/src/vt/vrt/context/context_vrtmanager.cc @@ -215,7 +215,7 @@ void VirtualContextManager::destroyVirtualByID( holder.erase(iter); } -void VirtualContextManager::destoryVirtualByProxy( +void VirtualContextManager::destroyVirtualByProxy( VirtualProxyType const& proxy ) { auto const& is_remote = VirtualProxyBuilder::isRemote(proxy); diff --git a/src/vt/vrt/context/context_vrtmanager.h b/src/vt/vrt/context/context_vrtmanager.h index 77579fd9a8..11842a3de8 100644 --- a/src/vt/vrt/context/context_vrtmanager.h +++ b/src/vt/vrt/context/context_vrtmanager.h @@ -109,7 +109,7 @@ struct VirtualContextManager VirtualContext* getVirtualByProxy(VirtualProxyType const& proxy); VirtualInfoType* getVirtualInfoByProxy(VirtualProxyType const& proxy); - void destoryVirtualByProxy(VirtualProxyType const& proxy); + void destroyVirtualByProxy(VirtualProxyType const& proxy); template *f> messaging::PendingSend sendMsg( @@ -139,7 +139,7 @@ struct VirtualContextManager // until the worker executes it VirtualProxyType makeVirtualPlaceholder(); - void setupMappedVirutalContext( + void setupMappedVirtualContext( VirtualProxyType const& proxy, SeedType const& seed ); diff --git a/src/vt/vrt/context/context_vrtmanager.impl.h b/src/vt/vrt/context/context_vrtmanager.impl.h index 39d3bad273..3e71c60895 100644 --- a/src/vt/vrt/context/context_vrtmanager.impl.h +++ b/src/vt/vrt/context/context_vrtmanager.impl.h @@ -223,7 +223,7 @@ VirtualProxyType VirtualContextManager::makeVirtualRemote( return return_proxy; } -inline void VirtualContextManager::setupMappedVirutalContext( +inline void VirtualContextManager::setupMappedVirtualContext( VirtualProxyType const& proxy, SeedType const& seed ) { auto vrt_info = getVirtualInfoByProxy(proxy); @@ -237,7 +237,7 @@ VirtualProxyType VirtualContextManager::makeVirtualMapComm( auto const& proxy = makeVirtual( std::forward(args)... ); - setupMappedVirutalContext(proxy, seed); + setupMappedVirtualContext(proxy, seed); return proxy; } From 38510221494cf1b34fb1968d5b5ff3e9dabd3150 Mon Sep 17 00:00:00 2001 From: amdarr Date: Tue, 9 May 2023 13:37:17 -0700 Subject: [PATCH 010/242] #2134: eliminate typos in comments --- src/vt/messaging/envelope/envelope_set.h | 2 +- src/vt/rdmahandle/handle.index.h | 2 +- src/vt/rdmahandle/handle.node.h | 2 +- src/vt/runtime/component/component.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vt/messaging/envelope/envelope_set.h b/src/vt/messaging/envelope/envelope_set.h index ca59e84ec4..440275be59 100644 --- a/src/vt/messaging/envelope/envelope_set.h +++ b/src/vt/messaging/envelope/envelope_set.h @@ -226,7 +226,7 @@ inline void envelopeSetCommLBDataRecordedAboveBareHandler( * with a guard assert. This is to prevent accidental edge-cases such as * sending a message twice. * - * A message is locked when it is sent and recieved. Unlocking messages + * A message is locked when it is sent and received. Unlocking messages * should be reserved for special cases as done in some core code. * * \param[in,out] env the envelope diff --git a/src/vt/rdmahandle/handle.index.h b/src/vt/rdmahandle/handle.index.h index 861da4f588..e74b87a02b 100644 --- a/src/vt/rdmahandle/handle.index.h +++ b/src/vt/rdmahandle/handle.index.h @@ -229,7 +229,7 @@ struct Handle< * * If MPI 3 is not enabled, it attaches a regular \c MPI_Get to the * \c RequestHolder that is dispatched when waited on. This variant of \c get - * fetches into the buffer that is associated with the the handle. See \c + * fetches into the buffer that is associated with the handle. See \c * setBuffer and \c getBuffer * * \param[in] idx the handle index to target diff --git a/src/vt/rdmahandle/handle.node.h b/src/vt/rdmahandle/handle.node.h index fdcc6aac6e..f973a0ee0c 100644 --- a/src/vt/rdmahandle/handle.node.h +++ b/src/vt/rdmahandle/handle.node.h @@ -297,7 +297,7 @@ struct Handle< * * If MPI 3 is not enabled, it attaches a regular \c MPI_Get to the * \c RequestHolder that is dispatched when waited on. This variant of \c get - * fetches into the buffer that is associated with the the handle. See \c + * fetches into the buffer that is associated with the handle. See \c * setBuffer and \c getBuffer * * \param[in] node the process/node to target diff --git a/src/vt/runtime/component/component.h b/src/vt/runtime/component/component.h index fc2b6fe420..e1790169e8 100644 --- a/src/vt/runtime/component/component.h +++ b/src/vt/runtime/component/component.h @@ -116,7 +116,7 @@ struct Component : BaseComponent { * * \param[in] args the arguments to forward to the component's constructor * - * \return unique pointer to the the component + * \return unique pointer to the component */ template static std::unique_ptr staticInit(Args&&... args) { From 60f057c5079d03f2806dd84a3116d5c6d9d2eaa0 Mon Sep 17 00:00:00 2001 From: amdarr Date: Mon, 17 Apr 2023 04:23:27 -0600 Subject: [PATCH 011/242] #2134: fix typos --- src/vt/termination/termination.h | 6 +++--- src/vt/topos/location/location.impl.h | 2 +- src/vt/trace/trace.h | 2 +- src/vt/trace/trace_lite.h | 2 +- src/vt/trace/trace_log.h | 2 +- src/vt/trace/trace_registry.cc | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vt/termination/termination.h b/src/vt/termination/termination.h index 8e99a02b33..cc535f105a 100644 --- a/src/vt/termination/termination.h +++ b/src/vt/termination/termination.h @@ -603,7 +603,7 @@ struct TerminationDetector : bool propagateEpoch(TermStateType& state); /** - * \internal \brief Notfiy that an epoch has terminated + * \internal \brief Notify that an epoch has terminated * * \param[in] epoch the epoch * \param[in] from the caller @@ -663,9 +663,9 @@ struct TerminationDetector : * \internal \brief Make a dependency between two epochs * * \param[in] predecessor the predecessor epoch - * \param[in] successoor the successoor epoch + * \param[in] successor the successor epoch */ - void addDependency(EpochType predecessor, EpochType successoor); + void addDependency(EpochType predecessor, EpochType successor); /** * \brief Disable termination detection on an epoch. Local counting is still diff --git a/src/vt/topos/location/location.impl.h b/src/vt/topos/location/location.impl.h index b0f065f3ad..f3b195c3c1 100644 --- a/src/vt/topos/location/location.impl.h +++ b/src/vt/topos/location/location.impl.h @@ -119,7 +119,7 @@ void EntityLocationCoord::registerEntity( if (msg_action != nullptr) { // vtAssert( // local_registered_msg_han_.find(id) == local_registered_msg_han_.end(), - // "Entitiy should not exist in local registered msg handler" + // "Entity should not exist in local registered msg handler" // ); local_registered_msg_han_.emplace( std::piecewise_construct, diff --git a/src/vt/trace/trace.h b/src/vt/trace/trace.h index 31fe8b6c8b..30fc33695d 100644 --- a/src/vt/trace/trace.h +++ b/src/vt/trace/trace.h @@ -357,7 +357,7 @@ struct Trace : runtime::component::Component, TraceLite { /** * \brief Check if trace is in a idle event * - * \return whether in an idle eveent + * \return whether in an idle event */ bool inIdleEvent() const; diff --git a/src/vt/trace/trace_lite.h b/src/vt/trace/trace_lite.h index 7ed64ba559..a14a2f1d3a 100644 --- a/src/vt/trace/trace_lite.h +++ b/src/vt/trace/trace_lite.h @@ -228,7 +228,7 @@ struct TraceLite { /** * \brief Check if trace is in a idle event * - * \return whether in an idle eveent + * \return whether in an idle event */ bool inIdleEvent() const; diff --git a/src/vt/trace/trace_log.h b/src/vt/trace/trace_log.h index c9973e7aeb..cf495a3eb5 100644 --- a/src/vt/trace/trace_log.h +++ b/src/vt/trace/trace_log.h @@ -236,7 +236,7 @@ struct Log final { } } - // No default constructor. Seems wierd? Copy+move all the way.. + // No default constructor. Seems weird? Copy+move all the way.. // (Copy-constructible and copy-assignable required for dequeue.) Log() = delete; Log(Log const& in) = default; diff --git a/src/vt/trace/trace_registry.cc b/src/vt/trace/trace_registry.cc index 7a1d66e3ad..a2047b9527 100644 --- a/src/vt/trace/trace_registry.cc +++ b/src/vt/trace/trace_registry.cc @@ -65,7 +65,7 @@ TraceRegistry::registerEventHashed( std::string const& event_type_name, std::string const& event_name ) { // Trace registration (mostly) happens during initialization - // of templates from the auto-registy. + // of templates from the auto-registry. // This occurs BEFORE the underling 'go' flags are enabled in VT. // Not printing ANYTHING for the most consistent NOTHING. // vt_debug_print( From 79a42f49856b6e3b80fdc346351349d84e058d03 Mon Sep 17 00:00:00 2001 From: amdarr Date: Mon, 17 Apr 2023 04:30:20 -0600 Subject: [PATCH 012/242] #2134: fix typos --- src/vt/configs/error/assert_out_info.impl.h | 8 ++++---- src/vt/configs/error/stack_out.cc | 8 ++++---- src/vt/runtime/runtime.cc | 6 +++--- src/vt/runtime/runtime_diagnostics.cc | 2 +- src/vt/scheduler/scheduler.cc | 2 +- src/vt/termination/epoch_guard.h | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/vt/configs/error/assert_out_info.impl.h b/src/vt/configs/error/assert_out_info.impl.h index a14809e33d..f3bf3d7224 100644 --- a/src/vt/configs/error/assert_out_info.impl.h +++ b/src/vt/configs/error/assert_out_info.impl.h @@ -103,24 +103,24 @@ assertOutInfo( auto yellow = debug::yellow(); auto reset = debug::reset(); auto green = debug::green(); - auto seperator = fmt::format("{}{}{:-^120}{}\n", prefix, yellow, "", reset); + auto separator = fmt::format("{}{}{:-^120}{}\n", prefix, yellow, "", reset); auto space = fmt::format("{}\n", prefix); auto title = fmt::format( "{}{}{:-^120}{}\n", prefix, yellow, " Debug State Assert Info ", reset ); - auto pre = fmt::format("{}{}{}{}", seperator, title, seperator, space); + auto pre = fmt::format("{}{}{}{}", separator, title, separator, space); std::ostringstream str_buf; auto buf = fmt::format("{}", pre); str_buf << buf; - //str_buf << seperator << seperator; + //str_buf << separator << separator; for (auto&& var : varlist) { auto cur = fmt::format("{}{}{:>25}{}\n", prefix, green, var, reset); str_buf << cur; } - str_buf << space << seperator << seperator; + str_buf << space << separator << separator; ::vt::output(str_buf.str(),error,false,false,true,fail); if (fail) { diff --git a/src/vt/configs/error/stack_out.cc b/src/vt/configs/error/stack_out.cc index 720a978964..4b046f7383 100644 --- a/src/vt/configs/error/stack_out.cc +++ b/src/vt/configs/error/stack_out.cc @@ -179,15 +179,15 @@ std::string prettyPrintStack(DumpStackType const& stack) { auto node = ::vt::theContext()->getNode(); auto node_str = ::vt::debug::proc(node); auto prefix = vt_pre + node_str + " "; - auto seperator = fmt::format("{}{}{:-^120}{}\n", prefix, yellow, "", reset); + auto separator = fmt::format("{}{}{:-^120}{}\n", prefix, yellow, "", reset); auto title_node = fmt::format("on Node {}", node); auto title = fmt::format(" Dump Stack Backtrace {} ", title_node); std::string out = ""; - out += fmt::format("{}", seperator); + out += fmt::format("{}", separator); out += fmt::format("{}{}{:-^120}{}\n", prefix, yellow, title, reset); - out += fmt::format("{}", seperator); + out += fmt::format("{}", separator); int i = 0; for (auto&& t : stack) { @@ -203,7 +203,7 @@ std::string prettyPrintStack(DumpStackType const& stack) { i++; } - //out += seperator + seperator + seperator; + //out += separator + separator + separator; return out; } diff --git a/src/vt/runtime/runtime.cc b/src/vt/runtime/runtime.cc index 3958fed6b5..7d73260004 100644 --- a/src/vt/runtime/runtime.cc +++ b/src/vt/runtime/runtime.cc @@ -594,7 +594,7 @@ void Runtime::output( auto bred = debug::bred(); auto node_str = ::vt::debug::proc(node); auto prefix = vt_pre + node_str + " "; - auto seperator = fmt::format("{}{}{:-^120}{}\n", prefix, bred, "", reset); + auto separator = fmt::format("{}{}{:-^120}{}\n", prefix, bred, "", reset); auto warn_sep = fmt::format("{}{}{:-^120}{}\n", prefix, byellow, "", reset); // auto space = fmt::format("{}\n", prefix); @@ -603,10 +603,10 @@ void Runtime::output( auto f1 = fmt::format(" Runtime Error: System Aborting! "); auto const info = ::fmt::format(" Fatal Error on Node {} ", node); // fmt::print(stderr, "{}", space); - fmt::print(stderr, "{}", seperator); + fmt::print(stderr, "{}", separator); fmt::print(stderr, "{}{}{:-^120}{}\n", prefix, bred, f1, reset); fmt::print(stderr, "{}{}{:-^120}{}\n", prefix, bred, info, reset); - fmt::print(stderr, "{}", seperator); + fmt::print(stderr, "{}", separator); } else { auto f1 = fmt::format(" Runtime Warning "); auto const info = ::fmt::format(" Warning on Node {} ", node); diff --git a/src/vt/runtime/runtime_diagnostics.cc b/src/vt/runtime/runtime_diagnostics.cc index 4d7be9d2b4..a8d87ea3be 100644 --- a/src/vt/runtime/runtime_diagnostics.cc +++ b/src/vt/runtime/runtime_diagnostics.cc @@ -147,7 +147,7 @@ using ComponentDiagnosticMap = std::map< void foreachDiagnosticValue( std::map const& vals, - std::function sep, + std::function sep, std::function Date: Mon, 17 Apr 2023 04:31:45 -0600 Subject: [PATCH 013/242] #2134: diagnostic: fix typo in macro name --- src/vt/runtime/component/diagnostic_value.cc | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/vt/runtime/component/diagnostic_value.cc b/src/vt/runtime/component/diagnostic_value.cc index 5347770e74..4abaa3ba72 100644 --- a/src/vt/runtime/component/diagnostic_value.cc +++ b/src/vt/runtime/component/diagnostic_value.cc @@ -95,7 +95,7 @@ void reduceHelper( * for diagnostic values and including this file would require a dependency * between every component and reduce/pipe for the reduction/callback. */ -#define DIAGNOSIC_VALUE_INSTANCE(TYPE) \ +#define DIAGNOSTIC_VALUE_INSTANCE(TYPE) \ template <> \ void DiagnosticValue::reduceOver( \ Diagnostic* diagnostic, DiagnosticErasedValue* out, int snapshot \ @@ -108,15 +108,15 @@ void reduceHelper( } \ -DIAGNOSIC_VALUE_INSTANCE(int64_t) -DIAGNOSIC_VALUE_INSTANCE(int32_t) -DIAGNOSIC_VALUE_INSTANCE(int16_t) -DIAGNOSIC_VALUE_INSTANCE(int8_t) -DIAGNOSIC_VALUE_INSTANCE(uint64_t) -DIAGNOSIC_VALUE_INSTANCE(uint32_t) -DIAGNOSIC_VALUE_INSTANCE(uint16_t) -DIAGNOSIC_VALUE_INSTANCE(uint8_t) -DIAGNOSIC_VALUE_INSTANCE(double) -DIAGNOSIC_VALUE_INSTANCE(float) +DIAGNOSTIC_VALUE_INSTANCE(int64_t) +DIAGNOSTIC_VALUE_INSTANCE(int32_t) +DIAGNOSTIC_VALUE_INSTANCE(int16_t) +DIAGNOSTIC_VALUE_INSTANCE(int8_t) +DIAGNOSTIC_VALUE_INSTANCE(uint64_t) +DIAGNOSTIC_VALUE_INSTANCE(uint32_t) +DIAGNOSTIC_VALUE_INSTANCE(uint16_t) +DIAGNOSTIC_VALUE_INSTANCE(uint8_t) +DIAGNOSTIC_VALUE_INSTANCE(double) +DIAGNOSTIC_VALUE_INSTANCE(float) }}}} /* end namespace vt::runtime::component::detail */ From aab5a8163f7c6c62858eb8e6041caedda9bcdfd8 Mon Sep 17 00:00:00 2001 From: amdarr Date: Tue, 9 May 2023 13:41:47 -0700 Subject: [PATCH 014/242] #2134: runnable: eliminate typos --- src/vt/runnable/invoke.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vt/runnable/invoke.h b/src/vt/runnable/invoke.h index 9c0596699d..cc666783a9 100644 --- a/src/vt/runnable/invoke.h +++ b/src/vt/runnable/invoke.h @@ -54,7 +54,7 @@ namespace vt { namespace runnable { template -static std::string CreatetEventTypeCStyleFunc() { +static std::string CreateEventTypeCStyleFunc() { using TE = vt::util::demangle::TemplateExtract; using DU = vt::util::demangle::DemanglerUtils; @@ -66,7 +66,7 @@ static std::string CreatetEventTypeCStyleFunc() { } template -static std::string CreatetEventTypeMemberFunc() { +static std::string CreateEventTypeMemberFunc() { using TE = vt::util::demangle::TemplateExtract; using DU = vt::util::demangle::DemanglerUtils; @@ -98,7 +98,7 @@ struct CallableWrapper { using Type = Ret(*)(Args...); static std::string GetEventTypeName() { - return CreatetEventTypeCStyleFunc(); + return CreateEventTypeCStyleFunc(); } static std::string GetEventName() { @@ -119,7 +119,7 @@ struct CallableWrapper { using Type = Ret (Class::*)(Args...); static std::string GetEventTypeName() { - return CreatetEventTypeMemberFunc(); + return CreateEventTypeMemberFunc(); } static std::string GetEventName() { From b15a2d8a5edd23013402b41595cee7bb93dec916 Mon Sep 17 00:00:00 2001 From: amdarr Date: Tue, 9 May 2023 13:42:34 -0700 Subject: [PATCH 015/242] #2134: eliminate typos in comments --- src/vt/event/event_record.h | 2 +- src/vt/runtime/component/component.h | 2 +- src/vt/runtime/component/component_pack.cc | 2 +- src/vt/runtime/component/component_pack.h | 8 ++++---- src/vt/runtime/component/meter/counter_gauge.h | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/vt/event/event_record.h b/src/vt/event/event_record.h index 99852ad361..620d93b060 100644 --- a/src/vt/event/event_record.h +++ b/src/vt/event/event_record.h @@ -130,7 +130,7 @@ struct EventRecord { // the union for storing payload of event depending on type EventPayloadType event_union_; - // the unqiue event identifier + // the unique event identifier EventType event_id_ = no_event; // the type of the event record to access the union properly diff --git a/src/vt/runtime/component/component.h b/src/vt/runtime/component/component.h index e1790169e8..2a1a1b7d97 100644 --- a/src/vt/runtime/component/component.h +++ b/src/vt/runtime/component/component.h @@ -57,7 +57,7 @@ namespace vt { namespace runtime { namespace component { /** * \struct ComponentConstructor * - * \brief Construct a component with either a regular \c std::make_unqiue or + * \brief Construct a component with either a regular \c std::make_unique or * through the specialized static \c construct method, which is used to create * the objgroup if the component is implemented as one */ diff --git a/src/vt/runtime/component/component_pack.cc b/src/vt/runtime/component/component_pack.cc index e283b623f0..adb9cfb23a 100644 --- a/src/vt/runtime/component/component_pack.cc +++ b/src/vt/runtime/component/component_pack.cc @@ -49,7 +49,7 @@ namespace vt { namespace runtime { namespace component { void ComponentPack::construct() { - // Topologically sort the components based on dependences to generate a + // Topologically sort the components based on dependencies to generate a // valid startup order auto order = topoSort(); diff --git a/src/vt/runtime/component/component_pack.h b/src/vt/runtime/component/component_pack.h index a455833810..109cc9f393 100644 --- a/src/vt/runtime/component/component_pack.h +++ b/src/vt/runtime/component/component_pack.h @@ -94,7 +94,7 @@ struct ComponentPack { void add(); /** - * \internal \brief Construct all added components along with dependences + * \internal \brief Construct all added components along with dependencies * transitively. */ void construct(); @@ -146,16 +146,16 @@ struct ComponentPack { private: /** * \internal \brief Topologically sort all the registered components to find a - * valid activation order based on registered dependences. + * valid activation order based on registered dependencies. * * \return list of handlers representing a valid total ordering that does not - * break dependences + * break dependencies */ std::list topoSort(); /** * \internal \brief Topologically sort all the registered components to find a - * valid activation order based on registered dependences. + * valid activation order based on registered dependencies. * * \param[in] v current vertex * \param[in] order topological order derived so far diff --git a/src/vt/runtime/component/meter/counter_gauge.h b/src/vt/runtime/component/meter/counter_gauge.h index b546df0523..fd59ddc52a 100644 --- a/src/vt/runtime/component/meter/counter_gauge.h +++ b/src/vt/runtime/component/meter/counter_gauge.h @@ -84,7 +84,7 @@ struct CounterGauge : DiagnosticMeter { /** * \brief Increment counter and update gauge value * - * \param[in] in the new guage value + * \param[in] in the new gauge value * \param[in] num number of times to increment the counter */ void incrementUpdate(U in, T num = 1) { @@ -94,7 +94,7 @@ struct CounterGauge : DiagnosticMeter { private: Counter counter_; /**< The counter for some event */ - Gauge gauge_; /**< The guage measuring some event */ + Gauge gauge_; /**< The gauge measuring some event */ }; }}}} /* end namespace vt::runtime::component::meter */ From e855b8db46c409405c3c54c899646d5a0dc7aa6b Mon Sep 17 00:00:00 2001 From: amdarr Date: Tue, 9 May 2023 13:43:52 -0700 Subject: [PATCH 016/242] #2134: configs: fix typo in feature define --- src/vt/configs/features/features_defines.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vt/configs/features/features_defines.h b/src/vt/configs/features/features_defines.h index 86e40db65d..73b2cf4b9d 100644 --- a/src/vt/configs/features/features_defines.h +++ b/src/vt/configs/features/features_defines.h @@ -52,7 +52,7 @@ // backend features, add any new ones to this list #define vt_feature_no_feature 0 || vt_feature_cmake_no_feature -#define vt_feature_bit_check_overflow 0 || vt_feature_cmake_bit_check_overflo +#define vt_feature_bit_check_overflow 0 || vt_feature_cmake_bit_check_overflow #define vt_feature_trace_enabled 0 || vt_feature_cmake_trace_enabled #define vt_feature_trace_only 0 || vt_feature_cmake_trace_only #define vt_feature_lblite 0 || vt_feature_cmake_lblite From 2bb66be09670e7c8daaaae8ffc7c7d60b5604926 Mon Sep 17 00:00:00 2001 From: amdarr Date: Tue, 9 May 2023 13:45:04 -0700 Subject: [PATCH 017/242] #2134: eliminate typos in comments --- cmake/run-git.cmake | 2 +- src/vt/context/context.cc | 2 +- src/vt/context/context.h | 4 ++-- src/vt/messaging/active.h | 2 +- src/vt/messaging/dependent_send_chain.h | 2 +- src/vt/messaging/message/message_serialize.h | 6 +++--- src/vt/messaging/message/shared_message.h | 4 ++-- src/vt/messaging/message/smart_ptr.h | 8 ++++---- src/vt/messaging/pending_send.h | 6 +++--- src/vt/phase/phase_manager.h | 8 ++++---- src/vt/pmpi/mpi_functions.h.in | 2 +- src/vt/pmpi/pmpi_component.cc | 2 +- src/vt/pmpi/pmpi_component.h | 2 +- src/vt/registry/auto/functor/auto_registry_functor_impl.h | 2 +- 14 files changed, 26 insertions(+), 26 deletions(-) diff --git a/cmake/run-git.cmake b/cmake/run-git.cmake index 73c341e0fb..6ae4c7ade9 100644 --- a/cmake/run-git.cmake +++ b/cmake/run-git.cmake @@ -1,4 +1,4 @@ -# This file is intented to be run with cmake -P +# This file is intended to be run with cmake -P # Derived from # Original Author: diff --git a/src/vt/context/context.cc b/src/vt/context/context.cc index 7c559883b8..86f2998dd6 100644 --- a/src/vt/context/context.cc +++ b/src/vt/context/context.cc @@ -47,7 +47,7 @@ #if vt_check_enabled(trace_only) namespace vt { namespace runnable { struct RunnableNew {}; -}} /* end namespact vt::runnable */ +}} /* end namespace vt::runnable */ #else # include "vt/runtime/runtime.h" # include "vt/runnable/runnable.h" diff --git a/src/vt/context/context.h b/src/vt/context/context.h index c391ee0305..a82fc82e60 100644 --- a/src/vt/context/context.h +++ b/src/vt/context/context.h @@ -93,7 +93,7 @@ struct Context : runtime::component::Component { ~Context(); /** - * \brief Gets the current node (analagous to MPI's rank) currently being + * \brief Gets the current node (analogous to MPI's rank) currently being * used. * * \see \c vt::NodeType @@ -103,7 +103,7 @@ struct Context : runtime::component::Component { inline NodeType getNode() const { return thisNode_; } /** - * \brief Get the number of nodes (analagous to MPI's num ranks) being used + * \brief Get the number of nodes (analogous to MPI's num ranks) being used * * \see \c vt::NodeType * diff --git a/src/vt/messaging/active.h b/src/vt/messaging/active.h index b1d8e198a7..9901166fa3 100644 --- a/src/vt/messaging/active.h +++ b/src/vt/messaging/active.h @@ -419,7 +419,7 @@ struct ActiveMessenger : runtime::component::PollableComponent // and do NOT define their own serialization function are required // to be byte-transmittable. This covers basic byte-copyable // messages directly inheriting from ActiveMsg. ActivMsg implements - // a serialize function which is implictly inherited.. + // a serialize function which is implicitly inherited.. template < typename MsgT, std::enable_if_t static constexpr auto const has_own_serialize = @@ -140,7 +140,7 @@ static constexpr auto const has_own_serialize = ) /** - * \brief Mark the message as supporting BUT NOT USING serialzation. + * \brief Mark the message as supporting BUT NOT USING serialization. * * This message MUST support a serialization function. However, this * support is only for derived message usage. @@ -256,7 +256,7 @@ struct is_byte_copyable_t { }; #endif -// Foward-declare +// Forward-declare struct BaseMsg; // Allows testing of is_base_of,Msg> to determine diff --git a/src/vt/messaging/message/shared_message.h b/src/vt/messaging/message/shared_message.h index 50fcfc849c..b1562de148 100644 --- a/src/vt/messaging/message/shared_message.h +++ b/src/vt/messaging/message/shared_message.h @@ -52,7 +52,7 @@ namespace vt { /** - * \deprecated Use \c makeMesssage. + * \deprecated Use \c makeMessage. * \brief Create a new 'raw' message. * * Create a new message and initialize internal state. @@ -72,7 +72,7 @@ template MsgT* makeSharedMessage(Args&&... args); /** - * \deprecated Use \c makeMesssage. + * \deprecated Use \c makeMessage. * \brief Create a new 'raw' message, of a given size. * * Create a new message and initialize internal state. diff --git a/src/vt/messaging/message/smart_ptr.h b/src/vt/messaging/message/smart_ptr.h index 4bb315ab20..b7d69eabf9 100644 --- a/src/vt/messaging/message/smart_ptr.h +++ b/src/vt/messaging/message/smart_ptr.h @@ -156,7 +156,7 @@ struct MsgSharedPtr final { } /// [obsolete] Use to() as MsgVirtualPtr <-> MsgSharedPtr. - /// Both methods are equivalent in funciton. + /// Both methods are equivalent in function. template MsgSharedPtr toVirtual() const { return to(); @@ -304,8 +304,8 @@ struct MsgSharedPtr final { /** * \brief Helper to unify 'stealing' message ownership. * - * This type is not intented to be used directly. It uses implicit conversion - * construtors to perform a 'std::move' on a \c MsgPtr&. + * This type is not intended to be used directly. It uses implicit conversion + * constructors to perform a 'std::move' on a \c MsgPtr&. * * If a normal \c MsgT* is supplied, it is promoted without stealing. */ @@ -373,7 +373,7 @@ using MsgSharedPtr = messaging::MsgSharedPtr; * \brief Wrapper to manage Active Messages. * * A MsgPtr represents a 'shared pointer like' object wrapping a - * message that correcly manages reference-counts to order to + * message that correctly manages reference-counts to order to * eliminate memory leaks. */ template diff --git a/src/vt/messaging/pending_send.h b/src/vt/messaging/pending_send.h index 0199474dd8..8c83be82bc 100644 --- a/src/vt/messaging/pending_send.h +++ b/src/vt/messaging/pending_send.h @@ -75,7 +75,7 @@ struct PendingSend final { /** * \brief Construct a pending send. * - * This is the prefered form, especially for internal constructs. + * This is the preferred form, especially for internal constructs. * If an action is specified it will be run. Otherwise the default * internal message-sending action is applied. * @@ -94,7 +94,7 @@ struct PendingSend final { /** * \brief Construct a pending send that invokes a callback. * - * \note This form does not implictly send a message. The callback + * \note This form does not implicitly send a message. The callback * action is responsible for all further work. It is a useful * construct to delay the callback and ensure an epoch is produced. * @@ -119,7 +119,7 @@ struct PendingSend final { /** * \brief Construct a pending send to push an epoch. * - * \note This form does not implictly send a message. + * \note This form does not implicitly send a message. * * \param[in] in_msg the message to send * \param[in] in_action the "send" action to run diff --git a/src/vt/phase/phase_manager.h b/src/vt/phase/phase_manager.h index ebb34ccc8f..33c9e0a1a7 100644 --- a/src/vt/phase/phase_manager.h +++ b/src/vt/phase/phase_manager.h @@ -57,7 +57,7 @@ namespace vt { namespace phase { -// fwd-decl for reduce messasge +// fwd-decl for reduce message struct NextMsg; /** @@ -240,9 +240,9 @@ struct PhaseManager : runtime::component::Component { private: PhaseType cur_phase_ = 0; /**< Current phase */ ObjGroupProxyType proxy_ = no_obj_group; /**< Objgroup proxy */ - HookIDMapType collective_hooks_; /**< Collective regisstered hooks */ - HookIDMapType rooted_hooks_; /**< Rooted regisstered hooks */ - HookIDMapType unsync_hooks_; /**< Unsync'ed regisstered hooks */ + HookIDMapType collective_hooks_; /**< Collective registered hooks */ + HookIDMapType rooted_hooks_; /**< Rooted registered hooks */ + HookIDMapType unsync_hooks_; /**< Unsync'ed registered hooks */ std::size_t next_collective_hook_id_ = 1; /**< Next ID for collective hooks */ std::size_t next_rooted_hook_id_ = 1; /**< Next ID for rooted hooks */ std::size_t next_unsync_hook_id_ = 1; /**< Next ID for unsync'ed hooks */ diff --git a/src/vt/pmpi/mpi_functions.h.in b/src/vt/pmpi/mpi_functions.h.in index 6b1af04a69..62923ec135 100644 --- a/src/vt/pmpi/mpi_functions.h.in +++ b/src/vt/pmpi/mpi_functions.h.in @@ -41,7 +41,7 @@ //@HEADER */ ## -## The functions here were copied and sanatized from the MPI 3.1 manual +## The functions here were copied and sanitized from the MPI 3.1 manual ## ## I have commented the MPI_T_* calls and fortran-related bindings ## diff --git a/src/vt/pmpi/pmpi_component.cc b/src/vt/pmpi/pmpi_component.cc index e489659ce0..5bc4b31a4b 100644 --- a/src/vt/pmpi/pmpi_component.cc +++ b/src/vt/pmpi/pmpi_component.cc @@ -51,7 +51,7 @@ namespace vt { namespace pmpi { /*static*/ bool PMPIComponent::trace_pmpi = false; -// n.b. This is exepcted to be generated by the generated pmpi wrapper code. +// n.b. This is expected to be generated by the generated pmpi wrapper code. // void PMPIComponent::registerEventHandlers() {} }} //end namespace vt::pmpi diff --git a/src/vt/pmpi/pmpi_component.h b/src/vt/pmpi/pmpi_component.h index 5c1f45a850..258607254c 100644 --- a/src/vt/pmpi/pmpi_component.h +++ b/src/vt/pmpi/pmpi_component.h @@ -92,7 +92,7 @@ struct PMPIComponent : runtime::component::Component { private: - // n.b. This is exepcted to be generated by the generated pmpi wrapper code. + // n.b. This is expected to be generated by the generated pmpi wrapper code. void registerEventHandlers(); static bool trace_pmpi; diff --git a/src/vt/registry/auto/functor/auto_registry_functor_impl.h b/src/vt/registry/auto/functor/auto_registry_functor_impl.h index 8073cbf1f3..5f58ad5d9a 100644 --- a/src/vt/registry/auto/functor/auto_registry_functor_impl.h +++ b/src/vt/registry/auto/functor/auto_registry_functor_impl.h @@ -56,7 +56,7 @@ namespace vt { namespace auto_registry { template inline HandlerType makeAutoHandlerFunctor() { - // Arg (overload) differentiaton in adapter. + // Arg (overload) differentiation in adapter. using AdapterType = FunctorAdapterArgs; using ContainerType = AutoActiveFunctorContainerType; using RegInfoType = AutoRegInfoType; From a70d213d3e9fe18c689a7d3e626e4db980d82962 Mon Sep 17 00:00:00 2001 From: amdarr Date: Mon, 17 Apr 2023 05:09:07 -0600 Subject: [PATCH 018/242] #2134: fix typos in comments and string --- src/vt/configs/arguments/app_config.h | 2 +- src/vt/configs/arguments/args.cc | 4 ++-- src/vt/configs/debug/debug_printconst.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vt/configs/arguments/app_config.h b/src/vt/configs/arguments/app_config.h index 6a7f961b88..5572500a5e 100644 --- a/src/vt/configs/arguments/app_config.h +++ b/src/vt/configs/arguments/app_config.h @@ -249,7 +249,7 @@ struct AppConfig { /// Original char* object. char* argv_prog_name {const_cast("vt_unknown")}; - /// Arguments are being ref-returend as the result of parse(..). + /// Arguments are being ref-returned as the result of parse(..). /// Does not include argv[0]. Original char* objects. std::vector passthru_args; diff --git a/src/vt/configs/arguments/args.cc b/src/vt/configs/arguments/args.cc index 0e8d8f0186..6cb0a03345 100644 --- a/src/vt/configs/arguments/args.cc +++ b/src/vt/configs/arguments/args.cc @@ -93,7 +93,7 @@ std::tuple parseArguments( std::vector vt_args; - // Load up vectors (has curious ability to altnerate vt/mpi/passthru) + // Load up vectors (has curious ability to alternate vt/mpi/passthru) std::vector* rargs = nullptr; for (int i = 1; i < argc; i++) { char* c = argv[i]; @@ -256,7 +256,7 @@ void addStackDumpArgs(CLI::App& app, AppConfig& appConfig) { auto stack = "Do not dump stack traces"; auto warn = "Do not dump stack traces when vtWarn(..) is invoked"; auto assert = "Do not dump stack traces when vtAssert(..) is invoked"; - auto abort = "Do not dump stack traces when vtAabort(..) is invoked"; + auto abort = "Do not dump stack traces when vtAbort(..) is invoked"; auto file = "Dump stack traces to file instead of stdout"; auto dir = "Name of directory to write stack files"; auto mod = "Write stack dump if (node % config_.vt_stack_mod) == 0"; diff --git a/src/vt/configs/debug/debug_printconst.h b/src/vt/configs/debug/debug_printconst.h index 1180ea1ba7..b42cda6350 100644 --- a/src/vt/configs/debug/debug_printconst.h +++ b/src/vt/configs/debug/debug_printconst.h @@ -45,7 +45,7 @@ #define INCLUDED_VT_CONFIGS_DEBUG_DEBUG_PRINTCONST_H /* - * Specific convienence methods for printing + * Specific convenience methods for printing */ #define print_bool(BOOL) ((BOOL) ? "true" : "false") From 4ad298abb20a56adc7e243772bd38301f7f1e614 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Tue, 14 Mar 2023 14:25:11 +0100 Subject: [PATCH 019/242] #2082: Update dockerfile for nvidia to select compiler version --- ci/docker/ubuntu-nvidia-cpp.dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ci/docker/ubuntu-nvidia-cpp.dockerfile b/ci/docker/ubuntu-nvidia-cpp.dockerfile index 8c803045ca..9a471129d2 100644 --- a/ci/docker/ubuntu-nvidia-cpp.dockerfile +++ b/ci/docker/ubuntu-nvidia-cpp.dockerfile @@ -5,6 +5,7 @@ ARG arch=amd64 ARG ubuntu=20.04 FROM --platform=${arch} nvidia/cuda:${compiler}-devel-ubuntu${ubuntu} as base +ARG host_compiler=gcc-9 ARG proxy="" ENV https_proxy=${proxy} \ @@ -12,9 +13,13 @@ ENV https_proxy=${proxy} \ ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update -y -q && \ +RUN apt-get update -y && \ + apt-get install -y software-properties-common --no-install-recommends && \ + add-apt-repository -y ppa:ubuntu-toolchain-r/test && \ + apt remove -y software-properties-common && \ apt-get install -y --no-install-recommends \ ca-certificates \ + g++-$(echo ${host_compiler} | cut -d- -f2) \ curl \ less \ git \ @@ -28,6 +33,7 @@ RUN apt-get update -y -q && \ libunwind-dev \ valgrind \ ccache && \ + apt-get autoremove -y && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* @@ -48,6 +54,7 @@ RUN mkdir -p /nvcc_wrapper/build && \ chmod +x /nvcc_wrapper/build/nvcc_wrapper ENV MPI_EXTRA_FLAGS="" \ + HOST_COMPILER=${host_compiler} \ PATH=/usr/lib/ccache/:/nvcc_wrapper/build:$PATH \ CXX=nvcc_wrapper From 7e812cdd272a82df19c376db5355a7585f9f5f52 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Tue, 14 Mar 2023 14:25:57 +0100 Subject: [PATCH 020/242] #2082: Update build script to apply compiler version for nvcc --- ci/build_cpp.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index ddb76f1d5b..dc60d1d320 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -37,6 +37,13 @@ fi mkdir -p "${build_dir}" pushd "${build_dir}" +# Match `nvcc_wrapper` and also a path ending with 'nvcc_wrapper' +case $CXX in + *nvcc_wrapper) + NVCC_WRAPPER_DEFAULT_COMPILER="$(which g++-"$(echo "${HOST_COMPILER}" | cut -d- -f2)")" \ + && export NVCC_WRAPPER_DEFAULT_COMPILER;; +esac + if test -d "checkpoint" then rm -Rf checkpoint From 06ae05301abd4c52082c482719dc1f28a4bb6d05 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Tue, 14 Mar 2023 14:26:37 +0100 Subject: [PATCH 021/242] #2082: Change target compile features to c++17 --- src/CMakeLists.txt | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d9326cd274..90ca6f78f8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -217,23 +217,7 @@ endif() target_compile_features( ${VIRTUAL_TRANSPORT_LIBRARY} PUBLIC - cxx_std_14 - cxx_variadic_templates - cxx_auto_type - cxx_constexpr - cxx_decltype - cxx_defaulted_functions - cxx_deleted_functions - cxx_defaulted_move_initializers - cxx_delegating_constructors - cxx_lambdas - cxx_nonstatic_member_init - cxx_nullptr - cxx_override - cxx_range_for - cxx_right_angle_brackets - cxx_uniform_initialization - cxx_alias_templates + cxx_std_17 ) include(turn_on_warnings) From 8fedf659b98a60ce4349b0ccaafd1c25516fb2b8 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Tue, 14 Mar 2023 14:28:35 +0100 Subject: [PATCH 022/242] #2082: Update docker compose file to support seting of compiler version for nvcc --- .env | 5 +++-- docker-compose.yml | 23 +++++++++++++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.env b/.env index b1e6d3c01e..1ee99cf983 100644 --- a/.env +++ b/.env @@ -1,8 +1,9 @@ REPO=lifflander1/vt ARCH=amd64 -UBUNTU=22.04 +UBUNTU=20.04 ULIMIT_CORE=0 -COMPILER=gcc-12 +COMPILER=gcc-9 +HOST_COMPILER=gcc-9 COMPILER_TYPE=gnu PROXY= CACHE= diff --git a/docker-compose.yml b/docker-compose.yml index 84167e384f..afe37ddb7f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -76,11 +76,15 @@ volumes: amd64-ubuntu-18.04-gcc-8-cache: amd64-ubuntu-20.04-gcc-9-cache: amd64-ubuntu-20.04-gcc-10-cache: - amd64-ubuntu-22.04-gcc-12-cache: + amd64-ubuntu-20.04-gcc-11-cache: amd64-ubuntu-18.04-icpx-cache: amd64-ubuntu-18.04-icpc-cache: - amd64-ubuntu-18.04-nvcc-11-cache: - amd64-ubuntu-18.04-nvcc-11.2-cache: + amd64-ubuntu-20.04-11.0.3-cache: + amd64-ubuntu-20.04-11.2.0-cache: + amd64-alpine-clang-4.0-cache: + amd64-alpine-clang-5.0-cache: + amd64-alpine-clang-6.0-cache: + amd64-alpine-clang-7-cache: amd64-alpine-clang-8-cache: amd64-alpine-clang-9-cache: amd64-alpine-clang-10-cache: @@ -89,11 +93,16 @@ volumes: amd64-alpine-gcc-8-cache: amd64-alpine-gcc-9-cache: amd64-alpine-gcc-10-cache: - amd64-alpine-gcc-12-cache: + amd64-alpine-gcc-11-cache: + amd64-alpine-icc-18-cache: + amd64-alpine-icc-19-cache: + amd64-alpine-icc-20-cache: amd64-alpine-icpx-cache: amd64-alpine-icpc-cache: - amd64-alpine-nvcc-11-cache: - amd64-alpine-nvcc-11.2-cache: + amd64-alpine-11.0.3-cache: + amd64-alpine-11.2.0-cache: + arm64v8-ubuntu-18.04-gcc-7-cache: + arm64v8-alpine-gcc-7-cache: # Define basic rules for ccache used across multiple services. The beauty of # docker compose with cached volumes is that similarly configured builds will @@ -141,6 +150,7 @@ x-vtopts: &vtopts CODECOV_TOKEN: ${CODECOV_TOKEN:-} TEST_LB_SCHEMA: ${TEST_LB_SCHEMA:-0} CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD:-17} + HOST_COMPILER: ${HOST_COMPILER} services: ############################################################################## @@ -159,6 +169,7 @@ services: arch: ${ARCH} proxy: ${PROXY} compiler: ${COMPILER} + host_compiler: ${HOST_COMPILER} ubuntu: ${UBUNTU} ubsan_enabled: ${VT_UBSAN:-0} zoltan_enabled: ${VT_ZOLTAN:-0} From 9ad795b9004e79cf3ecedf55e42adfa624a24ccc Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Tue, 14 Mar 2023 16:00:27 +0100 Subject: [PATCH 023/242] #2082: Update NVCC CI to support host compiler version --- ci/azure/azure-clang-10-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-11-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-12-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-13-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-14-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-9-ubuntu-mpich.yml | 1 + ci/azure/azure-clang-alpine-mpich.yml | 1 + ci/azure/azure-gcc-10-ubuntu-openmpi.yml | 1 + ci/azure/azure-gcc-11-ubuntu-mpich.yml | 1 + ci/azure/azure-gcc-12-ubuntu-mpich.yml | 1 + ci/azure/azure-gcc-8-ubuntu-mpich.yml | 1 + ci/azure/azure-gcc-9-ubuntu-mpich.yml | 1 + ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml | 1 + ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml | 1 + ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml | 3 ++- ci/azure/azure-nvidia-12-ubuntu-mpich.yml | 3 ++- scripts/workflow-azure-template.yml | 1 + scripts/workflows-azure.ini | 12 ++++++++---- 18 files changed, 27 insertions(+), 6 deletions(-) diff --git a/ci/azure/azure-clang-10-ubuntu-mpich.yml b/ci/azure/azure-clang-10-ubuntu-mpich.yml index 23f57620b3..a5f42f3c91 100644 --- a/ci/azure/azure-clang-10-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-10-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 20.04 COMPILER_TYPE: clang COMPILER: clang-10 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-clang-11-ubuntu-mpich.yml b/ci/azure/azure-clang-11-ubuntu-mpich.yml index 4e5c7fb00d..765de4b333 100644 --- a/ci/azure/azure-clang-11-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-11-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 22.04 COMPILER_TYPE: clang COMPILER: clang-11 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-clang-12-ubuntu-mpich.yml b/ci/azure/azure-clang-12-ubuntu-mpich.yml index 04c35809a7..7285430eff 100644 --- a/ci/azure/azure-clang-12-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-12-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 22.04 COMPILER_TYPE: clang COMPILER: clang-12 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-clang-13-ubuntu-mpich.yml b/ci/azure/azure-clang-13-ubuntu-mpich.yml index 8919666f9a..3fd07a7db9 100644 --- a/ci/azure/azure-clang-13-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-13-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 22.04 COMPILER_TYPE: clang COMPILER: clang-13 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-clang-14-ubuntu-mpich.yml b/ci/azure/azure-clang-14-ubuntu-mpich.yml index 688afcb8a3..8ee84195f3 100644 --- a/ci/azure/azure-clang-14-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-14-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 22.04 COMPILER_TYPE: clang COMPILER: clang-14 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-clang-9-ubuntu-mpich.yml b/ci/azure/azure-clang-9-ubuntu-mpich.yml index 493b9bff54..00c21342fe 100644 --- a/ci/azure/azure-clang-9-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-9-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 20.04 COMPILER_TYPE: clang COMPILER: clang-9 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-clang-alpine-mpich.yml b/ci/azure/azure-clang-alpine-mpich.yml index b1d024e63f..5a02605c67 100644 --- a/ci/azure/azure-clang-alpine-mpich.yml +++ b/ci/azure/azure-clang-alpine-mpich.yml @@ -28,6 +28,7 @@ variables: COMPILER_TYPE: clang COMPILER: clang-13 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-gcc-10-ubuntu-openmpi.yml b/ci/azure/azure-gcc-10-ubuntu-openmpi.yml index ca8214d009..443436a97e 100644 --- a/ci/azure/azure-gcc-10-ubuntu-openmpi.yml +++ b/ci/azure/azure-gcc-10-ubuntu-openmpi.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 20.04 COMPILER_TYPE: gnu COMPILER: gcc-10 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-gcc-11-ubuntu-mpich.yml b/ci/azure/azure-gcc-11-ubuntu-mpich.yml index f2d6d1727c..263ca668ed 100644 --- a/ci/azure/azure-gcc-11-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-11-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 22.04 COMPILER_TYPE: gnu COMPILER: gcc-11 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 1 diff --git a/ci/azure/azure-gcc-12-ubuntu-mpich.yml b/ci/azure/azure-gcc-12-ubuntu-mpich.yml index 9a8e980b12..6b574b95f1 100644 --- a/ci/azure/azure-gcc-12-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-12-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 22.04 COMPILER_TYPE: gnu COMPILER: gcc-12 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-gcc-8-ubuntu-mpich.yml b/ci/azure/azure-gcc-8-ubuntu-mpich.yml index bf9be53332..16424eb360 100644 --- a/ci/azure/azure-gcc-8-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-8-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 18.04 COMPILER_TYPE: gnu COMPILER: gcc-8 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-gcc-9-ubuntu-mpich.yml b/ci/azure/azure-gcc-9-ubuntu-mpich.yml index b6e3ef9be9..077afc7ef1 100644 --- a/ci/azure/azure-gcc-9-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-9-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 20.04 COMPILER_TYPE: gnu COMPILER: gcc-9 + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml b/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml index 655c346547..c2d5d0ee08 100644 --- a/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml +++ b/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 20.04 COMPILER_TYPE: intel-oneapi COMPILER: icpc + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml b/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml index 6baea0ae0a..45850be644 100644 --- a/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml +++ b/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml @@ -28,6 +28,7 @@ variables: UBUNTU: 20.04 COMPILER_TYPE: intel-oneapi COMPILER: icpx + BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml b/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml index c2e7330ec9..d04b95052c 100644 --- a/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml +++ b/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml @@ -2,7 +2,7 @@ ############## Warning this is a generated file---do not modify ############### ############################################################################### -name: PR tests (nvidia cuda 11.2, ubuntu, mpich) +name: PR tests (nvidia cuda 11.2, gcc-9, ubuntu, mpich) trigger: branches: @@ -28,6 +28,7 @@ variables: UBUNTU: 20.04 COMPILER_TYPE: nvidia COMPILER: 11.2.0 + HOST_COMPILER: gcc-9 BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/ci/azure/azure-nvidia-12-ubuntu-mpich.yml b/ci/azure/azure-nvidia-12-ubuntu-mpich.yml index cfb4d9c2d8..087a56e5f9 100644 --- a/ci/azure/azure-nvidia-12-ubuntu-mpich.yml +++ b/ci/azure/azure-nvidia-12-ubuntu-mpich.yml @@ -2,7 +2,7 @@ ############## Warning this is a generated file---do not modify ############### ############################################################################### -name: PR tests (nvidia cuda 12.1.0, ubuntu, mpich) +name: PR tests (nvidia cuda 12.1.0, gcc-9, ubuntu, mpich) trigger: branches: @@ -28,6 +28,7 @@ variables: UBUNTU: 20.04 COMPILER_TYPE: nvidia COMPILER: 12.1.0 + HOST_COMPILER: gcc-9 BUILD_TYPE: release ULIMIT_CORE: 0 CODE_COVERAGE: 0 diff --git a/scripts/workflow-azure-template.yml b/scripts/workflow-azure-template.yml index f7b7f3edc0..461b2a9514 100644 --- a/scripts/workflow-azure-template.yml +++ b/scripts/workflow-azure-template.yml @@ -16,6 +16,7 @@ variables: [% linux_env %] COMPILER_TYPE: [% compiler_type %] COMPILER: [% compiler %] +[% host_compiler_line %] BUILD_TYPE: [% build_type %] ULIMIT_CORE: [% ulimit_core %] CODE_COVERAGE: [% code_coverage %] diff --git a/scripts/workflows-azure.ini b/scripts/workflows-azure.ini index 0ca1e6713f..04b7e3ba09 100644 --- a/scripts/workflows-azure.ini +++ b/scripts/workflows-azure.ini @@ -60,10 +60,12 @@ cache_name = ubuntu-intel-oneapi-icpc-cache output_name = ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml vt_extended_tests = 0 -[PR-tests-nvcc-12-1] -test_configuration = "nvidia cuda 12.1.0, ubuntu, mpich" +[PR-tests-nvcc-12-1-gcc-9] +test_configuration = "nvidia cuda 12.1.0, gcc-9, ubuntu, mpich" compiler_type = nvidia compiler = 12.1.0 +host_compiler = gcc-9 +host_compiler_line = " HOST_COMPILER: [% host_compiler %]" distro = 20.04 cache_name = ubuntu-nvidia-12-cache output_name = ci/azure/azure-nvidia-12-ubuntu-mpich.yml @@ -74,10 +76,12 @@ vt_trace = 1 vt_pool = 0 vt_tests_num_nodes = 4 -[PR-tests-nvcc-11-2] -test_configuration = "nvidia cuda 11.2, ubuntu, mpich" +[PR-tests-nvcc-11-2-gcc-9] +test_configuration = "nvidia cuda 11.2, gcc-9, ubuntu, mpich" compiler_type = nvidia compiler = 11.2.0 +host_compiler = gcc-9 +host_compiler_line = " HOST_COMPILER: [% host_compiler %]" distro = 20.04 cache_name = ubuntu-nvidia-11.2-cache output_name = ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml From e820a3fd577bcd68e252b40092d68fc16bc24ee7 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Fri, 24 Mar 2023 13:36:48 +0100 Subject: [PATCH 024/242] #2082: Add HOST_COMPILER to cache names in docker compose --- .env | 6 +- docker-compose.yml | 140 +++++++++++++++++++++------------------------ 2 files changed, 68 insertions(+), 78 deletions(-) diff --git a/.env b/.env index 1ee99cf983..4000fab13d 100644 --- a/.env +++ b/.env @@ -1,9 +1,9 @@ REPO=lifflander1/vt ARCH=amd64 -UBUNTU=20.04 +UBUNTU=22.04 ULIMIT_CORE=0 -COMPILER=gcc-9 -HOST_COMPILER=gcc-9 +COMPILER=gcc-12 +HOST_COMPILER=gcc-12 COMPILER_TYPE=gnu PROXY= CACHE= diff --git a/docker-compose.yml b/docker-compose.yml index afe37ddb7f..961eac20c8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -69,40 +69,31 @@ version: '3.5' # add it to this list. For example, for ARM64v8 on Ubuntu 20.04 with clang-9, # add `arm64v8-ubuntu-20.04-clang-9-cache`. volumes: - amd64-ubuntu-18.04-clang-8-cache: - amd64-ubuntu-18.04-clang-9-cache: - amd64-ubuntu-20.04-clang-10-cache: - amd64-ubuntu-22.04-clang-11-cache: - amd64-ubuntu-18.04-gcc-8-cache: - amd64-ubuntu-20.04-gcc-9-cache: - amd64-ubuntu-20.04-gcc-10-cache: - amd64-ubuntu-20.04-gcc-11-cache: - amd64-ubuntu-18.04-icpx-cache: - amd64-ubuntu-18.04-icpc-cache: - amd64-ubuntu-20.04-11.0.3-cache: - amd64-ubuntu-20.04-11.2.0-cache: - amd64-alpine-clang-4.0-cache: - amd64-alpine-clang-5.0-cache: - amd64-alpine-clang-6.0-cache: - amd64-alpine-clang-7-cache: - amd64-alpine-clang-8-cache: - amd64-alpine-clang-9-cache: - amd64-alpine-clang-10-cache: - amd64-alpine-clang-11-cache: - amd64-alpine-clang-13-cache: - amd64-alpine-gcc-8-cache: - amd64-alpine-gcc-9-cache: - amd64-alpine-gcc-10-cache: - amd64-alpine-gcc-11-cache: - amd64-alpine-icc-18-cache: - amd64-alpine-icc-19-cache: - amd64-alpine-icc-20-cache: - amd64-alpine-icpx-cache: - amd64-alpine-icpc-cache: - amd64-alpine-11.0.3-cache: - amd64-alpine-11.2.0-cache: - arm64v8-ubuntu-18.04-gcc-7-cache: - arm64v8-alpine-gcc-7-cache: + amd64-ubuntu-18.04-clang-8-clang-8-cache: + amd64-ubuntu-18.04-clang-9-clang-9-cache: + amd64-ubuntu-20.04-clang-10-clang-10-cache: + amd64-ubuntu-22.04-clang-11-clang-11-cache: + amd64-ubuntu-18.04-gcc-8-gcc-8-cache: + amd64-ubuntu-20.04-gcc-9-gcc-9-cache: + amd64-ubuntu-20.04-gcc-10-gcc-10-cache: + amd64-ubuntu-22.04-gcc-12-gcc-12-cache: + amd64-ubuntu-18.04-icpx-icpx-cache: + amd64-ubuntu-18.04-icpc-icpc-cache: + amd64-ubuntu-20.04-gcc-9-11.0.3-cache: + amd64-ubuntu-20.04-gcc-9-11.2.0-cache: + amd64-alpine-clang-8-clang-8-cache: + amd64-alpine-clang-9-clang-9-cache: + amd64-alpine-clang-10-clang-10-cache: + amd64-alpine-clang-11-clang-11-cache: + amd64-alpine-clang-13-clang-13-cache: + amd64-alpine-gcc-8-gcc-8-cache: + amd64-alpine-gcc-9-gcc-9-cache: + amd64-alpine-gcc-10-gcc-10-cache: + amd64-alpine-gcc-12-gcc-12-cache: + amd64-alpine-icpx-icpx-cache: + amd64-alpine-icpc-icpc-cache: + amd64-alpine-gcc-9-11.0.3-cache: + amd64-alpine-gcc-9-11.2.0-cache: # Define basic rules for ccache used across multiple services. The beauty of # docker compose with cached volumes is that similarly configured builds will @@ -150,7 +141,6 @@ x-vtopts: &vtopts CODECOV_TOKEN: ${CODECOV_TOKEN:-} TEST_LB_SCHEMA: ${TEST_LB_SCHEMA:-0} CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD:-17} - HOST_COMPILER: ${HOST_COMPILER} services: ############################################################################## @@ -158,13 +148,11 @@ services: # Ubuntu gcc-12 debug build: # docker-compose run -e CMAKE_BUILD_TYPE=debug ubuntu-cpp ubuntu-cpp: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp build: context: . target: base dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: &default-args arch: ${ARCH} proxy: ${PROXY} @@ -173,6 +161,8 @@ services: ubuntu: ${UBUNTU} ubsan_enabled: ${VT_UBSAN:-0} zoltan_enabled: ${VT_ZOLTAN:-0} + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: &ulimits core: ${ULIMIT_CORE} environment: @@ -180,7 +170,7 @@ services: <<: *vtopts volumes: &ubuntu-volumes - .:/vt:delegated - - ${CACHE}${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cache:/build:delegated + - ${CACHE}${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cache:/build:delegated command: &vt-cpp-command > /bin/bash -c " /vt/ci/build_cpp.sh /vt /build && @@ -194,14 +184,14 @@ services: # Example: # docker-compose run ubuntu-cpp-clean ubuntu-cpp-clean: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp build: context: . target: base dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -221,14 +211,14 @@ services: # Example: # docker-compose run ubuntu-cpp-clean-noinstall ubuntu-cpp-clean-noinstall: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp build: context: . target: base dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -251,14 +241,14 @@ services: # $ /vt/ci/test_cpp.sh /vt /build # $ /vt/ci/build_vt_sample.sh /vt /build ubuntu-cpp-interactive: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp build: context: . target: base dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -273,14 +263,14 @@ services: # modifying all the other container/image names to be parameterized over # MPI requires a lot of changes. ubuntu-cpp-clean-openmpi: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp build: context: . target: base dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-openmpi-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp ulimits: *ulimits environment: <<: *ccache @@ -293,14 +283,14 @@ services: # Interactive C++ setup of VT on ubuntu platform from container baseline for # OpenMPI. ubuntu-cpp-interactive-openmpi: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp build: context: . target: base dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-openmpi-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp ulimits: *ulimits environment: <<: *ccache @@ -312,16 +302,16 @@ services: # Build C++ container with VT installed in the container on ubuntu platform # from container baseline. ubuntu-vt: - image: ${REPO}:vt-${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + image: ${REPO}:vt-${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp build: context: . target: build dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: <<: *default-args <<: *vtopts + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -335,16 +325,16 @@ services: # Build documentation for VT in the container on ubuntu platform from # container baseline. ubuntu-docs: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-docs + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-docs build: context: . target: base - dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-docs.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-docs.dockerfile args: <<: *default-args token: ${TOKEN} + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -361,14 +351,14 @@ services: ############################################################################## # Build vt sample project using DARMA-vt installed from spack package. ubuntu-spack: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp build: context: . target: base dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-openmpi-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp ulimits: *ulimits environment: <<: *vtopts @@ -381,15 +371,15 @@ services: # Interactive build documentation for VT in the container on ubuntu platform # from container baseline. ubuntu-docs-interactive: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-docs + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-docs build: context: . target: base - dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-docs.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-docs.dockerfile args: <<: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -404,35 +394,35 @@ services: # C++ build of VT within an alpine linux container (limited to clang # compilers) alpine-cpp: - image: ${REPO}:${ARCH}-alpine-${COMPILER}-cpp + image: ${REPO}:${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cpp build: context: . target: base dockerfile: ci/docker/alpine-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-alpine-${COMPILER}-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache <<: *vtopts volumes: &alpine-volumes - .:/vt:delegated - - ${CACHE}${ARCH}-alpine-${COMPILER}-cache:/build:delegated + - ${CACHE}${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cache:/build:delegated command: *vt-cpp-command ############################################################################## # C++ build/test/clean target for VT on alpine platform from container # baseline. alpine-cpp-clean: - image: ${REPO}:${ARCH}-alpine-${COMPILER}-cpp + image: ${REPO}:${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cpp build: context: . target: base dockerfile: ci/docker/alpine-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-alpine-${COMPILER}-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache From ad8dfbb5afcba4d448d0ca781a5eb65674d1f83f Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Wed, 29 Mar 2023 11:03:08 +0200 Subject: [PATCH 025/242] #2082: Update comments in docker-compose.yml --- docker-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 961eac20c8..856a40bbdc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,6 +49,7 @@ # # $ export COMPILER_TYPE=intel # $ export COMPILER=icpx +# $ export HOST_COMPILER=icpx # $ export VT_TRACE=1 # $ docker-compose pull ubuntu-cpp-interactive # $ docker-compose run ubuntu-cpp-interactive @@ -67,7 +68,7 @@ version: '3.5' # Named volumes must be predefined according the docker compose rules. Many # combinations have already been added, but if a needed configuration is missing # add it to this list. For example, for ARM64v8 on Ubuntu 20.04 with clang-9, -# add `arm64v8-ubuntu-20.04-clang-9-cache`. +# add `arm64v8-ubuntu-20.04-clang-9-clang-9-cache`. volumes: amd64-ubuntu-18.04-clang-8-clang-8-cache: amd64-ubuntu-18.04-clang-9-clang-9-cache: From a85db434fb2232a1e6da435da2e55aa8da9f6dba Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Mon, 17 Apr 2023 17:55:02 +0200 Subject: [PATCH 026/242] #2130: Update JSON validator for LBData file --- scripts/JSON_data_files_validator.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/JSON_data_files_validator.py b/scripts/JSON_data_files_validator.py index 436f17d14b..63daa81e21 100644 --- a/scripts/JSON_data_files_validator.py +++ b/scripts/JSON_data_files_validator.py @@ -53,6 +53,17 @@ def _get_valid_schema(self) -> Schema: 'rank': int, 'num_nodes': int, }, + Optional('phases'): { + 'count': int, + 'skipped': { + 'list': [int], + 'range': [[int]], + }, + 'identical_to_previous': { + 'list': [int], + 'range': [[int]], + }, + }, }, 'phases': [ { From 52b0212eb54caa5cd249fef0d4c594f934b41872 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Tue, 18 Apr 2023 17:24:50 +0200 Subject: [PATCH 027/242] #2130: Save phases metadata to file --- src/vt/vrt/collection/balance/node_lb_data.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vt/vrt/collection/balance/node_lb_data.cc b/src/vt/vrt/collection/balance/node_lb_data.cc index 6a5cd55182..d20433ee36 100644 --- a/src/vt/vrt/collection/balance/node_lb_data.cc +++ b/src/vt/vrt/collection/balance/node_lb_data.cc @@ -205,6 +205,10 @@ void NodeLBData::createLBDataFile() { } metadata["type"] = "LBDatafile"; metadata["rank"] = theContext()->getNode(); + auto phasesMetadata = lb_data_->metadataToJson(); + if(phasesMetadata) { + metadata["phases"] = *phasesMetadata; + } lb_data_writer_ = std::make_unique( "phases", metadata, file_name, compress ); From 16b618e35cdfcda13a2f8d529d8c9ae6ea22f160 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Tue, 18 Apr 2023 17:27:59 +0200 Subject: [PATCH 028/242] #2130: Add skipped and identical phases to LBDataHolder --- .../vrt/collection/balance/lb_data_holder.cc | 109 +++++++++++++++++- .../vrt/collection/balance/lb_data_holder.h | 23 ++++ 2 files changed, 131 insertions(+), 1 deletion(-) diff --git a/src/vt/vrt/collection/balance/lb_data_holder.cc b/src/vt/vrt/collection/balance/lb_data_holder.cc index 8706a15a5f..cde3267d12 100644 --- a/src/vt/vrt/collection/balance/lb_data_holder.cc +++ b/src/vt/vrt/collection/balance/lb_data_holder.cc @@ -68,6 +68,63 @@ void LBDataHolder::outputEntity(nlohmann::json& j, ElementIDStruct const& id) co } } +std::unique_ptr LBDataHolder::metadataToJson() const { + // Find last element of a range for which it's values are incremented by 1 + auto find_last_of_range = []( + const std::set& notEmptySet, + std::set::iterator fromIt) { + vtAssert(!notEmptySet.empty(), "Input Set must be not empty"); + + do { + auto next = std::next(fromIt); + // end of a set or range + if (next == notEmptySet.end() || *fromIt + 1 != *next) { + break; + } + ++fromIt; + } while (fromIt != notEmptySet.end()); + + return fromIt; + }; + + nlohmann::json j; + j["count"] = count_; + + // Generate list and ranges of skipped phases + std::set skipped_list; + std::vector> skipped_ranges; + for (auto it = skipped_phases_.begin(); it != skipped_phases_.end(); it++) { + auto endOfRange = find_last_of_range(skipped_phases_, it); + if (it == endOfRange) { + skipped_list.insert(*it); + } else { + skipped_ranges.emplace_back(*it, *endOfRange); + it = endOfRange; + } + } + + // Generate list and ranges of identical phases + std::set identical_list; + std::vector> identical_ranges; + for (auto it = identical_phases_.begin(); it != identical_phases_.end(); + it++) { + auto endOfRange = find_last_of_range(identical_phases_, it); + if (it == endOfRange) { + identical_list.insert(*it); + } else { + identical_ranges.emplace_back(*it, *endOfRange); + it = endOfRange; + } + } + + // Save metadata + j["skipped"]["list"] = skipped_list; + j["skipped"]["range"] = skipped_ranges; + j["identical_to_previous"]["list"] = identical_list; + j["identical_to_previous"]["range"] = identical_ranges; + return std::make_unique(std::move(j)); +} + std::unique_ptr LBDataHolder::toJson(PhaseType phase) const { using json = nlohmann::json; @@ -164,9 +221,14 @@ std::unique_ptr LBDataHolder::toJson(PhaseType phase) const { return std::make_unique(std::move(j)); } -LBDataHolder::LBDataHolder(nlohmann::json const& j) { +LBDataHolder::LBDataHolder(nlohmann::json const& j) + : count_(0) +{ auto this_node = theContext()->getNode(); + // read metadata for skipped and identical phases + readMetadata(j); + auto phases = j["phases"]; if (phases.is_array()) { for (auto const& phase : phases) { @@ -307,11 +369,56 @@ LBDataHolder::LBDataHolder(nlohmann::json const& j) { // right now, so it will be ignored } +void LBDataHolder::readMetadata(nlohmann::json const& j) { + auto metadata = j["metadata"]; + if (metadata.find("phases") != metadata.end()) { + auto phases = metadata["phases"]; + // load count + vtAssertExpr(phases["count"].is_number()); + count_ = phases["count"]; + // load all skipped phases + auto sl = phases["skipped"]["list"]; + if(sl.is_array()) { + for(PhaseType skipped : sl) { + skipped_phases_.insert(skipped); + } + } + auto sr = phases["skipped"]["range"]; + if(sr.is_array()) { + for(auto const& pair : sr) { + vtAssertExpr(pair.is_array()); + for(PhaseType i = pair[0]; i <= pair[1]; i++){ + skipped_phases_.insert(i); + } + } + } + // load all identical phases + auto il = phases["identical_to_previous"]["list"]; + if(il.is_array()) { + for(PhaseType identical : il) { + identical_phases_.insert(identical); + } + } + auto ir = phases["identical_to_previous"]["range"]; + if(ir.is_array()) { + for(auto const& pair : ir) { + vtAssertExpr(pair.is_array()); + for(PhaseType i = pair[0]; i <= pair[1]; i++){ + identical_phases_.insert(i); + } + } + } + } +} + void LBDataHolder::clear() { node_comm_.clear(); node_data_.clear(); node_subphase_comm_.clear(); node_idx_.clear(); + count_ = 0; + skipped_phases_.clear(); + identical_phases_.clear(); } }}}} /* end namespace vt::vrt::collection::balance */ diff --git a/src/vt/vrt/collection/balance/lb_data_holder.h b/src/vt/vrt/collection/balance/lb_data_holder.h index ad9eeefc45..de51305d07 100644 --- a/src/vt/vrt/collection/balance/lb_data_holder.h +++ b/src/vt/vrt/collection/balance/lb_data_holder.h @@ -78,6 +78,9 @@ struct LBDataHolder { s | node_subphase_comm_; s | user_defined_json_; s | node_idx_; + s | count_; + s | skipped_phases_; + s | identical_phases_; } /** @@ -89,6 +92,13 @@ struct LBDataHolder { */ std::unique_ptr toJson(PhaseType phase) const; + /** + * \brief Output a LB phase's metdadata to JSON + * + * \return the json data structure + */ + std::unique_ptr metadataToJson() const; + /** * \brief Clear all LB data */ @@ -103,6 +113,13 @@ struct LBDataHolder { */ void outputEntity(nlohmann::json& j, ElementIDStruct const& elm_id) const; + /** + * \brief Read the LB phase's metadata + * + * \param[in] j the json + */ + void readMetadata(nlohmann::json const& j); + public: /// Node timings for each local object std::unordered_map node_data_; @@ -118,6 +135,12 @@ struct LBDataHolder { std::unordered_map>> node_idx_; /// Map from id to objgroup proxy std::unordered_map node_objgroup_; + // Number of all phases including skipped and identical + PhaseType count_; + // Set of phases that are skipped + std::set skipped_phases_; + // Set of phases which are identical to previous + std::set identical_phases_; }; }}}} /* end namespace vt::vrt::collection::balance */ From 526a6ed8cc9d815b7ba5583ca55b351db6731dd2 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Tue, 25 Apr 2023 16:09:13 +0200 Subject: [PATCH 029/242] #2130: Add UTs for reading phases metadata --- .../vrt/collection/balance/lb_data_holder.cc | 4 + tests/unit/collection/test_lb_data_holder.cc | 196 ++++++++++++++++++ 2 files changed, 200 insertions(+) create mode 100644 tests/unit/collection/test_lb_data_holder.cc diff --git a/src/vt/vrt/collection/balance/lb_data_holder.cc b/src/vt/vrt/collection/balance/lb_data_holder.cc index cde3267d12..d591773d71 100644 --- a/src/vt/vrt/collection/balance/lb_data_holder.cc +++ b/src/vt/vrt/collection/balance/lb_data_holder.cc @@ -365,6 +365,10 @@ LBDataHolder::LBDataHolder(nlohmann::json const& j) } } + if (!count_) { + count_ = node_data_.size(); + } + // @todo: implement subphase communication de-serialization, no use for it // right now, so it will be ignored } diff --git a/tests/unit/collection/test_lb_data_holder.cc b/tests/unit/collection/test_lb_data_holder.cc new file mode 100644 index 0000000000..9733baa84b --- /dev/null +++ b/tests/unit/collection/test_lb_data_holder.cc @@ -0,0 +1,196 @@ +/* +//@HEADER +// ***************************************************************************** +// +// test_lb_data_holder.cc +// DARMA/vt => Virtual Transport +// +// Copyright 2019-2021 National Technology & Engineering Solutions of Sandia, LLC +// (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact darma@sandia.gov +// +// ***************************************************************************** +//@HEADER +*/ + +#include + +#include "test_parallel_harness.h" +#include "test_helpers.h" +#include "test_collection_common.h" + +#include "vt/vrt/collection/manager.h" +#include "vt/vrt/collection/balance/lb_data_holder.h" + +#include + +#if vt_check_enabled(lblite) + +namespace vt { namespace tests { namespace unit { namespace lb { + +static constexpr int const num_phases = 10; + +struct TestOptionalPhasesMetadata : TestParallelHarnessParam { }; + +void addPhasesDataToJson(nlohmann::json& json, PhaseType amountOfPhasesToAdd, std::vector toSkip) { + using ElementIDStruct = vt::vrt::collection::balance::ElementIDStruct; + using LBDataHolder = vt::vrt::collection::balance::LBDataHolder; + using LoadSummary = vt::vrt::collection::balance::LoadSummary; + + std::unordered_map> ids; + for (unsigned i = 0; i < 2; i++) { + auto id = elm::ElmIDBits::createCollectionImpl(true, i+1, 0, 0); + for(unsigned j = 0; j < amountOfPhasesToAdd; j++) { + ids[j].push_back(id); + } + } + + LBDataHolder dh; + for (unsigned i = 0; i < amountOfPhasesToAdd; i++) { + for (auto&& elm : ids[i]) { + dh.node_data_[i][elm] = LoadSummary{3}; + } + } + + nlohmann::json phases = nlohmann::json::array(); + for (unsigned i = 0; i < num_phases; i++) { + if(std::find(toSkip.begin(), toSkip.end(), i) == toSkip.end()) { + phases.push_back(*dh.toJson(i)); + } + } + + json["phases"] = phases; +} + +TEST_F(TestOptionalPhasesMetadata, test_no_lb_phases_metadata) { + using LBDataHolder = vt::vrt::collection::balance::LBDataHolder; + + nlohmann::json json; + json["metadata"]["type"] = "LBDatafile"; + + addPhasesDataToJson(json, num_phases, {}); + + LBDataHolder testObj(json); + EXPECT_EQ(testObj.count_, num_phases); + std::set expectedSkipped = {}; + EXPECT_EQ(testObj.skipped_phases_, expectedSkipped); + std::set expectedIdentical = {}; + EXPECT_EQ(testObj.identical_phases_, expectedIdentical); + + auto outJsonPtr = testObj.metadataToJson(); + ASSERT_TRUE(outJsonPtr != nullptr); + + EXPECT_EQ((*outJsonPtr)["count"], num_phases); + std::vector expectedSkippedList = {}; + EXPECT_EQ((*outJsonPtr)["skipped"]["list"], expectedSkippedList); + std::vector> expectedSkippedRanges = {}; + EXPECT_EQ((*outJsonPtr)["skipped"]["range"], expectedSkippedRanges); + std::vector expectedIdenticalList = {}; + EXPECT_EQ((*outJsonPtr)["identical_to_previous"]["list"], expectedIdenticalList); + std::vector> expectedIdenticalRanges = {}; + EXPECT_EQ((*outJsonPtr)["identical_to_previous"]["range"], expectedIdenticalRanges); +} + +TEST_F(TestOptionalPhasesMetadata, test_lb_phases_metadata_empty) { + using LBDataHolder = vt::vrt::collection::balance::LBDataHolder; + + nlohmann::json metadata, phasesMetadata, json; + phasesMetadata["count"] = num_phases; + phasesMetadata["skipped"]["list"] = {}; + phasesMetadata["skipped"]["range"] = {}; + phasesMetadata["identical_to_previous"]["list"] = {}; + phasesMetadata["identical_to_previous"]["range"] = {}; + metadata["type"] = "LBDatafile"; + metadata["phases"] = phasesMetadata; + json["metadata"] = metadata; + + addPhasesDataToJson(json, num_phases, {}); + + LBDataHolder testObj(json); + EXPECT_EQ(testObj.count_, num_phases); + std::set expectedSkipped = {}; + EXPECT_EQ(testObj.skipped_phases_, expectedSkipped); + std::set expectedIdentical = {}; + EXPECT_EQ(testObj.identical_phases_, expectedIdentical); + + auto outJsonPtr = testObj.metadataToJson(); + ASSERT_TRUE(outJsonPtr != nullptr); + + EXPECT_EQ((*outJsonPtr)["count"], num_phases); + std::vector expectedSkippedList = {}; + EXPECT_EQ((*outJsonPtr)["skipped"]["list"], expectedSkippedList); + std::vector> expectedSkippedRanges = {}; + EXPECT_EQ((*outJsonPtr)["skipped"]["range"], expectedSkippedRanges); + std::vector expectedIdenticalList = {}; + EXPECT_EQ((*outJsonPtr)["identical_to_previous"]["list"], expectedIdenticalList); + std::vector> expectedIdenticalRanges = {}; + EXPECT_EQ((*outJsonPtr)["identical_to_previous"]["range"], expectedIdenticalRanges); +} + +TEST_F(TestOptionalPhasesMetadata, test_lb_phases_metadata_filled) { + using LBDataHolder = vt::vrt::collection::balance::LBDataHolder; + + nlohmann::json metadata, phasesMetadata, json; + phasesMetadata["count"] = num_phases; + phasesMetadata["skipped"]["list"] = {2}; + phasesMetadata["skipped"]["range"] = {{3,4}}; + phasesMetadata["identical_to_previous"]["list"] = {1}; + phasesMetadata["identical_to_previous"]["range"] = {{8,9}}; + metadata["type"] = "LBDatafile"; + metadata["phases"] = phasesMetadata; + json["metadata"] = metadata; + + addPhasesDataToJson(json, num_phases, {1,2,3,4,8,9}); + + LBDataHolder testObj(json); + EXPECT_EQ(testObj.count_, num_phases); + std::set expectedSkipped = {2, 3, 4}; + EXPECT_EQ(testObj.skipped_phases_, expectedSkipped); + std::set expectedIdentical = {1, 8, 9}; + EXPECT_EQ(testObj.identical_phases_, expectedIdentical); + + auto outJsonPtr = testObj.metadataToJson(); + ASSERT_TRUE(outJsonPtr != nullptr); + + EXPECT_EQ((*outJsonPtr)["count"], num_phases); + std::vector expectedSkippedList = {}; + EXPECT_EQ((*outJsonPtr)["skipped"]["list"], expectedSkippedList); + std::vector> expectedSkippedRanges = {{2,4}}; + EXPECT_EQ((*outJsonPtr)["skipped"]["range"], expectedSkippedRanges); + std::vector expectedIdenticalList = {1}; + EXPECT_EQ((*outJsonPtr)["identical_to_previous"]["list"], expectedIdenticalList); + std::vector> expectedIdenticalRanges = {{8,9}}; + EXPECT_EQ((*outJsonPtr)["identical_to_previous"]["range"], expectedIdenticalRanges); +} + +}}}} // end namespace vt::tests::unit::lb + +#endif /*vt_check_enabled(lblite)*/ From 29ec80b3c39b5d78ba7e83f35d17f445500e9e35 Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Mon, 15 May 2023 12:44:12 -0700 Subject: [PATCH 030/242] #2147: fix incorrect order of parameters for call to beginProcessing --- src/vt/context/runnable_context/trace.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vt/context/runnable_context/trace.cc b/src/vt/context/runnable_context/trace.cc index bb955a8212..81e1b0bc17 100644 --- a/src/vt/context/runnable_context/trace.cc +++ b/src/vt/context/runnable_context/trace.cc @@ -67,7 +67,7 @@ void Trace::start(TimeType time) { from_node_ != uninitialized_destination ? from_node_ : cur_node; processing_tag_ = theTrace()->beginProcessing( - trace_id, msg_size_, event_, from_node, idx1_, idx2_, idx3_, idx4_, time + trace_id, msg_size_, event_, from_node, time, idx1_, idx2_, idx3_, idx4_ ); } else { processing_tag_ = theTrace()->beginProcessing( From 41437d4922e7a881d1621924e8b6efd15d5afc16 Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Tue, 16 May 2023 13:36:56 -0700 Subject: [PATCH 031/242] #2147: make getTracesSize() noexcept --- src/vt/trace/trace_lite.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vt/trace/trace_lite.h b/src/vt/trace/trace_lite.h index a14a2f1d3a..8f6a8bb3e7 100644 --- a/src/vt/trace/trace_lite.h +++ b/src/vt/trace/trace_lite.h @@ -349,7 +349,7 @@ struct TraceLite { * * \return computed bytes used for tracing (lower bound) */ - std::size_t getTracesSize() const { + std::size_t getTracesSize() const noexcept { return traces_.size() * sizeof(Log); } From cb50a144c3b95a3ebf26a42e03a2d309c8aa9eb9 Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Tue, 16 May 2023 13:37:40 -0700 Subject: [PATCH 032/242] #2147: add functions for getting the number of trace events and the last trace event --- src/vt/trace/trace_lite.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vt/trace/trace_lite.h b/src/vt/trace/trace_lite.h index 8f6a8bb3e7..0e51b93669 100644 --- a/src/vt/trace/trace_lite.h +++ b/src/vt/trace/trace_lite.h @@ -252,6 +252,14 @@ struct TraceLite { return static_cast(time * 1e6); } + std::size_t getNumTraceEvents() const { + return traces_.size(); + } + + const LogType* getLastTraceEvent() const noexcept { + return traces_.empty() ? nullptr : &traces_.back(); + } + protected: /** * \brief Emit a 'stop' trace for previous open event or a '[re]start' trace From f286d153b9cd19b23cde271256342cfbb968deb6 Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Tue, 16 May 2023 13:39:40 -0700 Subject: [PATCH 033/242] #2147: if adding a memory event to begin/endProcessing, use the same time as the processing event --- src/vt/trace/trace.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vt/trace/trace.cc b/src/vt/trace/trace.cc index 885fc450ca..c9416f28c0 100644 --- a/src/vt/trace/trace.cc +++ b/src/vt/trace/trace.cc @@ -359,7 +359,7 @@ TraceProcessingTag Trace::beginProcessing( ); if (theConfig()->vt_trace_memory_usage) { - addMemoryEvent(theMemUsage()->getFirstUsage()); + addMemoryEvent(theMemUsage()->getFirstUsage(), time); } return TraceProcessingTag{ep, loggedEvent}; @@ -404,7 +404,7 @@ void Trace::endProcessing( ); if (theConfig()->vt_trace_memory_usage) { - addMemoryEvent(theMemUsage()->getFirstUsage()); + addMemoryEvent(theMemUsage()->getFirstUsage(), time); } // Final event is same as original with a few .. tweaks. From dc22536fc8279d38a8e5e7b088db045edcb0c169 Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Tue, 16 May 2023 13:53:26 -0700 Subject: [PATCH 034/242] #2147: cmake: add functionality to add --vt_trace to trace tests in ctest --- tests/CMakeLists.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 48d524dd26..7a8e4ba4ae 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -66,7 +66,7 @@ set_target_properties(gtest_main PROPERTIES FOLDER extern) include(GoogleTest) include(turn_on_warnings) -function(add_unit_test unit_test_name unit_test_files uses_mpi) +function(add_unit_test unit_test_name unit_test_files uses_mpi additional_args) add_executable( ${unit_test_name} ${TEST_SOURCE_FILES} @@ -95,6 +95,7 @@ function(add_unit_test unit_test_name unit_test_files uses_mpi) foreach(PROC ${PROC_TEST_LIST}) gtest_add_tests( TARGET ${unit_test_name} + EXTRA_ARGS ${additional_args} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} TEST_SUFFIX _proc_${PROC} TEST_PREFIX vt: @@ -115,6 +116,7 @@ function(add_unit_test unit_test_name unit_test_files uses_mpi) else() gtest_add_tests( TARGET ${unit_test_name} + EXTRA_ARGS ${additional_args} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} TEST_SUFFIX _no_mpi TEST_PREFIX vt: @@ -167,6 +169,7 @@ foreach(SUB_DIR ${UNIT_TEST_SUBDIRS_LIST}) set(UNIT_LIST_EXTENDED "") set(UNIT_LIST_BASIC "") set(UNIT_LIST_NOMPI "") + set(ADDITIONAL_ARGS "") foreach (unit_test_file ${${SUB_DIR}_UNIT_TEST_SOURCE_FILES}) #message(STATUS "Considering ${unit_test_file}") @@ -200,11 +203,15 @@ foreach(SUB_DIR ${UNIT_TEST_SUBDIRS_LIST}) endif() endforeach() - add_unit_test("${SUB_DIR}_basic" UNIT_LIST_BASIC ON) - add_unit_test("${SUB_DIR}_nompi" UNIT_LIST_NOMPI OFF) + if (SUB_DIR STREQUAL "trace") + list(APPEND ADDITIONAL_ARGS "--vt_trace") + endif() + + add_unit_test("${SUB_DIR}_basic" UNIT_LIST_BASIC ON "${ADDITIONAL_ARGS}") + add_unit_test("${SUB_DIR}_nompi" UNIT_LIST_NOMPI OFF "${ADDITIONAL_ARGS}") if (vt_build_extended_tests) - add_unit_test("${SUB_DIR}_extended" UNIT_LIST_EXTENDED ON) + add_unit_test("${SUB_DIR}_extended" UNIT_LIST_EXTENDED ON "${ADDITIONAL_ARGS}") endif() endforeach() From 47a8f8226e5cc7c0cdec934b0b3d8c04caf3dcec Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Tue, 16 May 2023 13:56:54 -0700 Subject: [PATCH 035/242] #2147: cmake: add test to ensure timings are recorded correctly for calls to start() and finish() trace runnable components --- .../unit/trace/test_runnable_context_trace.cc | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 tests/unit/trace/test_runnable_context_trace.cc diff --git a/tests/unit/trace/test_runnable_context_trace.cc b/tests/unit/trace/test_runnable_context_trace.cc new file mode 100644 index 0000000000..93ad6580ab --- /dev/null +++ b/tests/unit/trace/test_runnable_context_trace.cc @@ -0,0 +1,99 @@ +/* +//@HEADER +// ***************************************************************************** +// +// test_trace_spec_reader.cc +// DARMA/vt => Virtual Transport +// +// Copyright 2019-2021 National Technology & Engineering Solutions of Sandia, LLC +// (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. +// Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// * Neither the name of the copyright holder nor the names of its +// contributors may be used to endorse or promote products derived from this +// software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact darma@sandia.gov +// +// ***************************************************************************** +//@HEADER +*/ + +#include + +#include "test_parallel_harness.h" +#include "test_helpers.h" + +#if vt_check_enabled(trace_enabled) + +namespace vt { namespace tests { namespace unit { + +using TestRunnableContextTrace = TestParallelHarness; + +struct TraceMsg : ::vt::Message { +}; + +void handler_func( TraceMsg * ) +{} + +TEST_F(TestRunnableContextTrace, runnable_context_trace_test_1) { + if (!theTrace()->checkDynamicRuntimeEnabled()) + GTEST_SKIP() << "trace tests require --vt_trace to be set"; + + auto msg = makeMessage< TraceMsg >(); + + auto handler = auto_registry::makeAutoHandler< TraceMsg, handler_func >(); + + HandlerManager::setHandlerTrace(handler, true); + + // Give some nonesense parameters but Trace shouldn't touch them + auto t = ctx::Trace( msg, /* in_trace_event */ 7, + handler, /* in_from_node */ 3, + 5, 9, 3, 2 ); + + // One event for the trace, one for the top open event, third if mem usage tracing is enabled + const int add_num_events = theConfig()->vt_trace_memory_usage ? 3 : 2; + + auto num_events = theTrace()->getNumTraceEvents(); + t.start(TimeType{3}); + EXPECT_EQ(num_events + add_num_events, theTrace()->getNumTraceEvents()); + auto *last_trace = theTrace()->getLastTraceEvent(); + EXPECT_NE(last_trace, nullptr); + EXPECT_EQ(last_trace->type, theConfig()->vt_trace_memory_usage ? trace::eTraceConstants::MemoryUsageCurrent : trace::eTraceConstants::BeginProcessing); + EXPECT_EQ(last_trace->time, TimeType{3}); + + num_events = theTrace()->getNumTraceEvents(); + t.finish(TimeType{7}); + EXPECT_EQ(num_events + add_num_events, theTrace()->getNumTraceEvents()); + last_trace = theTrace()->getLastTraceEvent(); + EXPECT_NE(last_trace, nullptr); + // Counterintuitive, but we restart the open event as the last action + EXPECT_EQ(last_trace->type, trace::eTraceConstants::BeginProcessing); + EXPECT_EQ(last_trace->time, TimeType{7}); // Time should still match though +} + +}}} // end namespace vt::tests::unit + +#endif // vt_check_enabled(trace_enabled) \ No newline at end of file From 3c4d0e3b3e2bbd365250fce972a3dec64f3dd6b5 Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Tue, 16 May 2023 14:02:53 -0700 Subject: [PATCH 036/242] #2147: fix test file license --- tests/unit/trace/test_runnable_context_trace.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/trace/test_runnable_context_trace.cc b/tests/unit/trace/test_runnable_context_trace.cc index 93ad6580ab..fd56779623 100644 --- a/tests/unit/trace/test_runnable_context_trace.cc +++ b/tests/unit/trace/test_runnable_context_trace.cc @@ -2,7 +2,7 @@ //@HEADER // ***************************************************************************** // -// test_trace_spec_reader.cc +// test_runnable_context_trace.cc // DARMA/vt => Virtual Transport // // Copyright 2019-2021 National Technology & Engineering Solutions of Sandia, LLC From 1921d590810cbdef107eac8c3d21af4492680418 Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Tue, 16 May 2023 15:54:55 -0700 Subject: [PATCH 037/242] #2147: add documentation for added Trace functions --- src/vt/trace/trace_lite.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/vt/trace/trace_lite.h b/src/vt/trace/trace_lite.h index 0e51b93669..e39e4da45c 100644 --- a/src/vt/trace/trace_lite.h +++ b/src/vt/trace/trace_lite.h @@ -252,10 +252,20 @@ struct TraceLite { return static_cast(time * 1e6); } + /** + * \brief Get the number of recorded trace events + * + * \return the number of trace events + */ std::size_t getNumTraceEvents() const { return traces_.size(); } + /** + * @brief Get the last recorded trace event + * + * @return the last recorded trace event + */ const LogType* getLastTraceEvent() const noexcept { return traces_.empty() ? nullptr : &traces_.back(); } From f8a80b55cdc069355f5e1110ccd177dac2b3b496 Mon Sep 17 00:00:00 2001 From: Nicolas Morales Date: Thu, 18 May 2023 12:58:53 -0700 Subject: [PATCH 038/242] #2147: fix some typos --- tests/unit/trace/test_runnable_context_trace.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/trace/test_runnable_context_trace.cc b/tests/unit/trace/test_runnable_context_trace.cc index fd56779623..5dc148dc3f 100644 --- a/tests/unit/trace/test_runnable_context_trace.cc +++ b/tests/unit/trace/test_runnable_context_trace.cc @@ -68,7 +68,7 @@ TEST_F(TestRunnableContextTrace, runnable_context_trace_test_1) { HandlerManager::setHandlerTrace(handler, true); - // Give some nonesense parameters but Trace shouldn't touch them + // Give some nonsense parameters but Trace shouldn't touch them auto t = ctx::Trace( msg, /* in_trace_event */ 7, handler, /* in_from_node */ 3, 5, 9, 3, 2 ); @@ -96,4 +96,4 @@ TEST_F(TestRunnableContextTrace, runnable_context_trace_test_1) { }}} // end namespace vt::tests::unit -#endif // vt_check_enabled(trace_enabled) \ No newline at end of file +#endif // vt_check_enabled(trace_enabled) From 517452c584b779ec319b3db7d7fa8554d734d5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Mon, 27 Mar 2023 12:30:31 +0200 Subject: [PATCH 039/242] #2084: bump version number to 1.3.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 23aa839063..f0bb29e763 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.2 +1.3.0 From 13f9a17fdb468e79b1f37aa5253f9c4d205df505 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Fri, 26 May 2023 17:51:43 +0200 Subject: [PATCH 040/242] #2144: Fix unwanted export of ccache usage --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d33275dd0..0f9c51e179 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ if (ccache_binary) STATUS "VT: Found ccache binary: ${ccache_binary}; adding launch rule" ) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${ccache_binary}") + set_directory_properties(PROPERTIES RULE_LAUNCH_COMPILE "${ccache_binary}") endif() set(CMAKE_CXX_EXTENSIONS OFF) From 92404cd35fc761fd2ebf22bc66e4e4237fe5d419 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Tue, 30 May 2023 17:34:41 +0200 Subject: [PATCH 041/242] #2144: Try to find ccache only if no compiler launcher is set --- CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f9c51e179..549781eac8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,14 +25,16 @@ set( "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" ) -# Try to find ccache to speed up compilation -find_program(ccache_binary ccache) -if (ccache_binary) - message( - STATUS - "VT: Found ccache binary: ${ccache_binary}; adding launch rule" - ) - set_directory_properties(PROPERTIES RULE_LAUNCH_COMPILE "${ccache_binary}") +if (NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER) + # Try to find ccache to speed up compilation + find_program(ccache_binary ccache) + if (ccache_binary) + message( + STATUS + "VT: Found ccache binary: ${ccache_binary}; adding launch rule" + ) + set(CMAKE_CXX_COMPILER_LAUNCHER ${ccache_binary}) + endif() endif() set(CMAKE_CXX_EXTENSIONS OFF) From 801cbc4a478fceb05ddd2b0d0e6aa4749ee5cc84 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Wed, 31 May 2023 17:48:31 +0200 Subject: [PATCH 042/242] #2144: Search for ccache only in standalone mode --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 549781eac8..a141f79cdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ set( "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" ) -if (NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER) +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND NOT DEFINED CMAKE_CXX_COMPILER_LAUNCHER) # Try to find ccache to speed up compilation find_program(ccache_binary ccache) if (ccache_binary) From f67648f5986b83010902ce789abd5e975e8782a6 Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Tue, 6 Jun 2023 15:48:25 +0200 Subject: [PATCH 043/242] #2158: Add missing env variable and fix dockerfile name --- .github/workflows/build-docs.yml | 1 + docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 3e1f956475..e71dadc99b 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -17,6 +17,7 @@ jobs: UBUNTU: 18.04 COMPILER_TYPE: gnu COMPILER: gcc-8 + HOST_COMPILER: gcc-8 BUILD_TYPE: release ULIMIT_CORE: 0 VT_LB: 1 diff --git a/docker-compose.yml b/docker-compose.yml index 856a40bbdc..61a2a1186a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -330,7 +330,7 @@ services: build: context: . target: base - dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-docs.dockerfile + dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-docs.dockerfile args: <<: *default-args token: ${TOKEN} From fa443d4b8485283f68614d583bdd5474c67ac913 Mon Sep 17 00:00:00 2001 From: Jonathan Lifflander Date: Tue, 30 May 2023 15:28:01 -0700 Subject: [PATCH 044/242] #2156: CI: fix syntax in docker-compose file for new version --- docker-compose.yml | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 61a2a1186a..939aeea626 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,7 +63,7 @@ # # Need verision >= 3.5 for the features in use -version: '3.5' +version: '3.8' # Named volumes must be predefined according the docker compose rules. Many # combinations have already been added, but if a needed configuration is missing @@ -167,8 +167,7 @@ services: ulimits: &ulimits core: ${ULIMIT_CORE} environment: - <<: *ccache - <<: *vtopts + <<: [*ccache, *vtopts] volumes: &ubuntu-volumes - .:/vt:delegated - ${CACHE}${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cache:/build:delegated @@ -195,8 +194,7 @@ services: - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: - <<: *ccache - <<: *vtopts + <<: [*ccache, *vtopts] volumes: *ubuntu-volumes command: &vt-build-test-clean-cpp-command > /bin/bash -c " @@ -222,8 +220,7 @@ services: - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: - <<: *ccache - <<: *vtopts + <<: [*ccache, *vtopts] volumes: *ubuntu-volumes command: &vt-build-test-clean-noinstall-cpp-command > /bin/bash -c " @@ -252,8 +249,7 @@ services: - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: - <<: *ccache - <<: *vtopts + <<: [*ccache, *vtopts] volumes: *ubuntu-volumes ############################################################################## @@ -274,8 +270,7 @@ services: - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp ulimits: *ulimits environment: - <<: *ccache - <<: *vtopts + <<: [*ccache, *vtopts] OMPI_MCA_btl: "^vader" volumes: *ubuntu-volumes command: *vt-build-test-clean-cpp-command @@ -294,8 +289,7 @@ services: - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp ulimits: *ulimits environment: - <<: *ccache - <<: *vtopts + <<: [*ccache, *vtopts] OMPI_MCA_btl: "^vader" volumes: *ubuntu-volumes @@ -309,14 +303,12 @@ services: target: build dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-cpp.dockerfile args: - <<: *default-args - <<: *vtopts + <<: [*default-args, *vtopts] cache_from: - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: - <<: *ccache - <<: *vtopts + <<: [*ccache, *vtopts] volumes: *ubuntu-volumes command: &cpp-command > /bin/bash -c " @@ -405,8 +397,7 @@ services: - ${REPO}:${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: - <<: *ccache - <<: *vtopts + <<: [*ccache, *vtopts] volumes: &alpine-volumes - .:/vt:delegated - ${CACHE}${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cache:/build:delegated @@ -426,7 +417,6 @@ services: - ${REPO}:${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: - <<: *ccache - <<: *vtopts + <<: [*ccache, *vtopts] volumes: *alpine-volumes command: *vt-build-test-clean-cpp-command From 29273253e1c1793b667d91e3ed833ba986bf90dd Mon Sep 17 00:00:00 2001 From: Jonathan Lifflander Date: Tue, 30 May 2023 15:28:27 -0700 Subject: [PATCH 045/242] #2156: CI: make containers work for arm64/aarch64 --- ci/deps/cmake.sh | 16 ++++++++++-- .../ubuntu-20.04-gnu-openmpi-cpp.dockerfile | 4 ++- ci/docker/ubuntu-clang-cpp.dockerfile | 4 ++- ci/docker/ubuntu-gnu-cpp.dockerfile | 4 ++- ci/docker/ubuntu-gnu-docs.dockerfile | 4 ++- ci/docker/ubuntu-nvidia-cpp.dockerfile | 4 ++- docker-compose.yml | 25 +++++++++++++++++++ 7 files changed, 54 insertions(+), 7 deletions(-) diff --git a/ci/deps/cmake.sh b/ci/deps/cmake.sh index 2214a5add9..6bc2330890 100755 --- a/ci/deps/cmake.sh +++ b/ci/deps/cmake.sh @@ -4,12 +4,24 @@ set -exo pipefail if test $# -lt 1 then - echo "usage: ./$0 " + echo "usage: ./$0 " exit 1 fi cmake_version=$1 -cmake_tar_name=cmake-${cmake_version}-Linux-x86_64.tar.gz +arch=x86_64 + +if test $# -gt 1 +then + arch=$2 +fi + +if test "${arch}" = "arm64v8" +then + arch=aarch64 +fi + +cmake_tar_name=cmake-${cmake_version}-linux-$arch.tar.gz echo "${cmake_version}" echo "${cmake_tar_name}" diff --git a/ci/docker/ubuntu-20.04-gnu-openmpi-cpp.dockerfile b/ci/docker/ubuntu-20.04-gnu-openmpi-cpp.dockerfile index 20ae266e7d..4156a06167 100644 --- a/ci/docker/ubuntu-20.04-gnu-openmpi-cpp.dockerfile +++ b/ci/docker/ubuntu-20.04-gnu-openmpi-cpp.dockerfile @@ -51,8 +51,10 @@ RUN if test ${zoltan_enabled} -eq 1; then \ ENV CC=gcc \ CXX=g++ +ARG arch + COPY ./ci/deps/cmake.sh cmake.sh -RUN ./cmake.sh 3.23.4 +RUN ./cmake.sh 3.23.4 ${arch} ENV PATH=/cmake/bin/:$PATH ENV LESSCHARSET=utf-8 diff --git a/ci/docker/ubuntu-clang-cpp.dockerfile b/ci/docker/ubuntu-clang-cpp.dockerfile index 0436a57db9..d1c01de4e9 100644 --- a/ci/docker/ubuntu-clang-cpp.dockerfile +++ b/ci/docker/ubuntu-clang-cpp.dockerfile @@ -43,8 +43,10 @@ ENV CC=${compiler} \ COPY ./ci/deps/libunwind.sh libunwind.sh RUN ./libunwind.sh 1.6.2 +ARG arch + COPY ./ci/deps/cmake.sh cmake.sh -RUN ./cmake.sh 3.23.4 +RUN ./cmake.sh 3.23.4 ${arch} ENV PATH=/cmake/bin/:$PATH ENV LESSCHARSET=utf-8 diff --git a/ci/docker/ubuntu-gnu-cpp.dockerfile b/ci/docker/ubuntu-gnu-cpp.dockerfile index d32a4e7df6..75a380b808 100644 --- a/ci/docker/ubuntu-gnu-cpp.dockerfile +++ b/ci/docker/ubuntu-gnu-cpp.dockerfile @@ -56,8 +56,10 @@ RUN if test ${zoltan_enabled} -eq 1; then \ ENV CC=gcc \ CXX=g++ +ARG arch + COPY ./ci/deps/cmake.sh cmake.sh -RUN ./cmake.sh 3.23.4 +RUN ./cmake.sh 3.23.4 ${arch} ENV PATH=/cmake/bin/:$PATH ENV LESSCHARSET=utf-8 diff --git a/ci/docker/ubuntu-gnu-docs.dockerfile b/ci/docker/ubuntu-gnu-docs.dockerfile index e6417e8ccf..1434b6af1c 100644 --- a/ci/docker/ubuntu-gnu-docs.dockerfile +++ b/ci/docker/ubuntu-gnu-docs.dockerfile @@ -38,8 +38,10 @@ ENV MPI_EXTRA_FLAGS="" \ CXX=mpicxx \ PATH=/usr/lib/ccache/:$PATH +ARG arch + COPY ./ci/deps/cmake.sh cmake.sh -RUN ./cmake.sh 3.23.4 +RUN ./cmake.sh 3.23.4 ${arch} ENV PATH=/cmake/bin/:$PATH diff --git a/ci/docker/ubuntu-nvidia-cpp.dockerfile b/ci/docker/ubuntu-nvidia-cpp.dockerfile index 9a471129d2..c4e9335df8 100644 --- a/ci/docker/ubuntu-nvidia-cpp.dockerfile +++ b/ci/docker/ubuntu-nvidia-cpp.dockerfile @@ -40,8 +40,10 @@ RUN apt-get update -y && \ ENV CC=gcc \ CXX=g++ +ARG arch + COPY ./ci/deps/cmake.sh cmake.sh -RUN ./cmake.sh 3.23.4 +RUN ./cmake.sh 3.23.4 ${arch} ENV PATH=/cmake/bin/:$PATH ENV LESSCHARSET=utf-8 diff --git a/docker-compose.yml b/docker-compose.yml index 939aeea626..d02d516a16 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -95,6 +95,31 @@ volumes: amd64-alpine-icpc-icpc-cache: amd64-alpine-gcc-9-11.0.3-cache: amd64-alpine-gcc-9-11.2.0-cache: + arm64v8-ubuntu-18.04-clang-8-clang-8-cache: + arm64v8-ubuntu-18.04-clang-9-clang-9-cache: + arm64v8-ubuntu-20.04-clang-10-clang-10-cache: + arm64v8-ubuntu-22.04-clang-11-clang-11-cache: + arm64v8-ubuntu-18.04-gcc-8-gcc-8-cache: + arm64v8-ubuntu-20.04-gcc-9-gcc-9-cache: + arm64v8-ubuntu-20.04-gcc-10-gcc-10-cache: + arm64v8-ubuntu-22.04-gcc-12-gcc-12-cache: + arm64v8-ubuntu-18.04-icpx-icpx-cache: + arm64v8-ubuntu-18.04-icpc-icpc-cache: + arm64v8-ubuntu-20.04-gcc-9-11.0.3-cache: + arm64v8-ubuntu-20.04-gcc-9-11.2.0-cache: + arm64v8-alpine-clang-8-clang-8-cache: + arm64v8-alpine-clang-9-clang-9-cache: + arm64v8-alpine-clang-10-clang-10-cache: + arm64v8-alpine-clang-11-clang-11-cache: + arm64v8-alpine-clang-13-clang-13-cache: + arm64v8-alpine-gcc-8-gcc-8-cache: + arm64v8-alpine-gcc-9-gcc-9-cache: + arm64v8-alpine-gcc-10-gcc-10-cache: + arm64v8-alpine-gcc-12-gcc-12-cache: + arm64v8-alpine-icpx-icpx-cache: + arm64v8-alpine-icpc-icpc-cache: + arm64v8-alpine-gcc-9-11.0.3-cache: + arm64v8-alpine-gcc-9-11.2.0-cache: # Define basic rules for ccache used across multiple services. The beauty of # docker compose with cached volumes is that similarly configured builds will From c6c16d4d4b082e737331bffb8256fc7af59d81c3 Mon Sep 17 00:00:00 2001 From: Jonathan Lifflander Date: Tue, 6 Jun 2023 16:20:48 -0700 Subject: [PATCH 046/242] #2156: ci: fix cmake script for x86_64 --- ci/deps/cmake.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ci/deps/cmake.sh b/ci/deps/cmake.sh index 6bc2330890..a7a173de2b 100755 --- a/ci/deps/cmake.sh +++ b/ci/deps/cmake.sh @@ -21,6 +21,11 @@ then arch=aarch64 fi +if test "${arch}" = "amd64" +then + arch=x86_64 +fi + cmake_tar_name=cmake-${cmake_version}-linux-$arch.tar.gz echo "${cmake_version}" From 73605a389959aa95e7efa6882969b1671687a4b0 Mon Sep 17 00:00:00 2001 From: Jonathan Lifflander Date: Wed, 8 Mar 2023 15:59:13 -0800 Subject: [PATCH 047/242] #276: pipe: start refactoring for c++17 --- src/vt/pipe/callback/cb_union/cb_raw_base.cc | 2 +- src/vt/pipe/callback/cb_union/cb_raw_base.h | 80 +++-- .../pipe/callback/cb_union/cb_raw_base.impl.h | 7 +- src/vt/pipe/pipe_manager.cc | 4 +- src/vt/pipe/pipe_manager.h | 8 +- src/vt/pipe/pipe_manager.impl.h | 28 +- src/vt/pipe/pipe_manager_tl.h | 92 ++---- src/vt/pipe/pipe_manager_tl.impl.h | 311 +++++++----------- src/vt/rdma/rdma.cc | 2 +- src/vt/utils/fntraits/fntraits.h | 72 +++- 10 files changed, 286 insertions(+), 320 deletions(-) diff --git a/src/vt/pipe/callback/cb_union/cb_raw_base.cc b/src/vt/pipe/callback/cb_union/cb_raw_base.cc index 5a75be83b1..fc6424be9d 100644 --- a/src/vt/pipe/callback/cb_union/cb_raw_base.cc +++ b/src/vt/pipe/callback/cb_union/cb_raw_base.cc @@ -98,7 +98,7 @@ CallbackRawBaseSingle::CallbackRawBaseSingle( // ) : pipe_(in_pipe), cb_(SendColDirCB{in_handler,in_vrt_handler,in_index}) // { } -void CallbackRawBaseSingle::send() { +void CallbackRawBaseSingle::sendVoid() { switch (cb_.active_) { case CallbackEnum::SendMsgCB: cb_.u_.send_msg_cb_.triggerVoid(pipe_); diff --git a/src/vt/pipe/callback/cb_union/cb_raw_base.h b/src/vt/pipe/callback/cb_union/cb_raw_base.h index a48dd02308..ed62afe1c8 100644 --- a/src/vt/pipe/callback/cb_union/cb_raw_base.h +++ b/src/vt/pipe/callback/cb_union/cb_raw_base.h @@ -48,6 +48,8 @@ #include "vt/pipe/callback/cb_union/cb_raw.h" #include "vt/pipe/signal/signal.h" #include "vt/registry/auto/auto_registry_common.h" +#include "vt/utils/fntraits/fntraits.h" +#include "vt/messaging/param_msg.h" #include #include @@ -67,7 +69,7 @@ static struct RawSendObjGrpTagType { } RawSendObjGrpTag { }; static struct RawBcastObjGrpTagType { } RawBcastObjGrpTag { }; #pragma GCC diagnostic pop -template +template struct CallbackTyped; struct CallbackRawBaseSingle { @@ -126,23 +128,30 @@ struct CallbackRawBaseSingle { bool null() const { return cb_.null(); } bool valid() const { return cb_.valid(); } - template - void send(Args... args); + template + void send(MsgT* msg) { + sendMsg(msg); + } + + template + void send(messaging::MsgPtrThief msg) { + return sendMsg(msg); + } template - void send(MsgT* msg); + void sendMsg(MsgT* msg); template void sendMsg(messaging::MsgPtrThief msg); - void send(); + void sendVoid(); template void serialize(SerializerT& s); PipeType getPipe() const { return pipe_; } - template + template friend struct CallbackTyped; protected: @@ -150,14 +159,8 @@ struct CallbackRawBaseSingle { GeneralCallback cb_; }; -template +template struct CallbackTyped : CallbackRawBaseSingle { - using VoidSigType = signal::SigVoidType; - template - using IsVoidType = std::enable_if_t::value,U>; - template - using IsNotVoidType = std::enable_if_t::value,U>; - CallbackTyped() = default; CallbackTyped(CallbackTyped const&) = default; CallbackTyped(CallbackTyped&&) = default; @@ -213,7 +216,7 @@ struct CallbackTyped : CallbackRawBaseSingle { ) { } - bool operator==(CallbackTyped const& other) const { + bool operator==(CallbackTyped const& other) const { return equal(other); } bool operator==(CallbackRawBaseSingle const& other) const { @@ -235,25 +238,44 @@ struct CallbackTyped : CallbackRawBaseSingle { cb_ = std::move(other.cb_); } - template - void send(Args... args) { - static_assert(std::is_same::value, "Required exact type match"); - sendMsg(makeMessage(std::forward(args)...)); + template + void send(Params&&... params) { + using Trait = CBTraits; + if constexpr (std::is_same_v) { + using MsgT = messaging::ParamMsg; + auto msg = vt::makeMessage(std::forward(params)...); + CallbackRawBaseSingle::sendMsg(msg); + } else { + using MsgT = typename Trait::MsgT; + auto msg = makeMessage(std::forward(params)...); + sendMsg(msg); + } } - template - IsNotVoidType send(MsgU* m) { - static_assert(std::is_same::value, "Required exact type match"); - CallbackRawBaseSingle::send(m); + void send(typename CBTraits::MsgT* msg) { + using MsgT = typename CBTraits::MsgT; + if constexpr (not std::is_same_v) { + CallbackRawBaseSingle::sendMsg(msg); + } } - void sendMsg(messaging::MsgPtrThief msg) { + template + void send(messaging::MsgPtrThief msg) { CallbackRawBaseSingle::sendMsg(msg); } - template > - void send() { - CallbackRawBaseSingle::send(); + void sendMsg(messaging::MsgPtrThief::MsgT> msg) { + using MsgT = typename CBTraits::MsgT; + if constexpr (not std::is_same_v) { + CallbackRawBaseSingle::sendMsg(msg); + } + } + + void sendMsg(typename CBTraits::MsgT* msg) { + using MsgT = typename CBTraits::MsgT; + if constexpr (not std::is_same_v) { + CallbackRawBaseSingle::sendMsg(msg); + } } template @@ -266,10 +288,8 @@ struct CallbackTyped : CallbackRawBaseSingle { namespace vt { -using VoidMsg = pipe::signal::SigVoidType; - -template -using Callback = pipe::callback::cbunion::CallbackTyped; +template +using Callback = pipe::callback::cbunion::CallbackTyped; using CallbackU = pipe::callback::cbunion::CallbackRawBaseSingle; diff --git a/src/vt/pipe/callback/cb_union/cb_raw_base.impl.h b/src/vt/pipe/callback/cb_union/cb_raw_base.impl.h index baca1f70e1..7447b66a46 100644 --- a/src/vt/pipe/callback/cb_union/cb_raw_base.impl.h +++ b/src/vt/pipe/callback/cb_union/cb_raw_base.impl.h @@ -62,13 +62,8 @@ bool CallbackRawBaseSingle::operator==(CallbackTyped const& other) const { return equal(other); } -template -void CallbackRawBaseSingle::send(Args... args) { - sendMsg(makeMessage(std::forward(args)...)); -} - template -void CallbackRawBaseSingle::send(MsgT* msg) { +void CallbackRawBaseSingle::sendMsg(MsgT* msg) { theMsg()->setupEpochMsg(msg); switch (cb_.active_) { diff --git a/src/vt/pipe/pipe_manager.cc b/src/vt/pipe/pipe_manager.cc index ea942fbd06..5b7a787d70 100644 --- a/src/vt/pipe/pipe_manager.cc +++ b/src/vt/pipe/pipe_manager.cc @@ -56,10 +56,10 @@ PipeManager::PipeManager() { ); } -Callback PipeManager::makeFunc( +Callback<> PipeManager::makeFunc( LifetimeEnum life, FuncVoidType fn ) { - return makeCallbackSingleAnonVoid>(life,fn); + return makeCallbackSingleAnonVoid(life,fn); } // Functions pulled out of PipeManager for header deps, forward to manager diff --git a/src/vt/pipe/pipe_manager.h b/src/vt/pipe/pipe_manager.h index 0a6e933e13..9fc21b7dae 100644 --- a/src/vt/pipe/pipe_manager.h +++ b/src/vt/pipe/pipe_manager.h @@ -169,7 +169,7 @@ struct PipeManager * \return a new callback */ template - Callback makeFunc( + Callback<> makeFunc( LifetimeEnum life, ContextT* ctx, FuncCtxType fn ); @@ -218,7 +218,7 @@ struct PipeManager * * \return the new callback */ - Callback makeFunc(LifetimeEnum life, FuncVoidType fn); + Callback<> makeFunc(LifetimeEnum life, FuncVoidType fn); /** * \brief Make a callback to a active message handler to be invoked on a @@ -254,7 +254,7 @@ struct PipeManager typename FunctorT, typename = std::enable_if_t::has_no_msg_type> > - Callback makeSend(NodeType const& node); + Callback<> makeSend(NodeType const& node); /** * \brief Make a callback to a particular collection element invoking a @@ -317,7 +317,7 @@ struct PipeManager typename FunctorT, typename = std::enable_if_t::has_no_msg_type> > - Callback makeBcast(); + Callback<> makeBcast(); /** * \brief Make a callback to a whole collection invoking a non-intrusive diff --git a/src/vt/pipe/pipe_manager.impl.h b/src/vt/pipe/pipe_manager.impl.h index 749f90d6f2..0896369c92 100644 --- a/src/vt/pipe/pipe_manager.impl.h +++ b/src/vt/pipe/pipe_manager.impl.h @@ -80,27 +80,27 @@ void PipeManager::triggerSendBack(PipeType const& pipe, MsgT* data) { } template -Callback PipeManager::makeFunc( +Callback<> PipeManager::makeFunc( LifetimeEnum life, C* ctx, FuncCtxType fn ) { - return makeCallbackSingleAnon>(life,ctx,fn); + return makeCallbackSingleAnon(life,ctx,fn); } template Callback PipeManager::makeFunc( LifetimeEnum life, C* ctx, FuncMsgCtxType fn ) { - return makeCallbackSingleAnon>(life,ctx,fn); + return makeCallbackSingleAnon(life,ctx,fn); } template Callback PipeManager::makeFunc(LifetimeEnum life, FuncMsgType fn) { - return makeCallbackSingleAnon>(life,fn); + return makeCallbackSingleAnon(life,fn); } template * f> Callback PipeManager::makeSend(NodeType const& node) { - return makeCallbackSingleSend(node); + return makeCallbackSingle(node); } template @@ -109,28 +109,28 @@ Callback PipeManager::makeSend(NodeType const& node) { } template -Callback PipeManager::makeSend(NodeType const& node) { +Callback<> PipeManager::makeSend(NodeType const& node) { return makeCallbackFunctorSendVoid(node); } template * f> Callback PipeManager::makeSend(typename ColT::ProxyType proxy) { - return makeCallbackSingleProxySend(proxy); + return makeCallbackProxy(proxy); } template f> Callback PipeManager::makeSend(typename ColT::ProxyType proxy) { - return makeCallbackSingleProxySend(proxy); + return makeCallbackProxy(proxy); } template f> Callback PipeManager::makeSend(objgroup::proxy::ProxyElm proxy) { - return makeCallbackObjGrpSend(proxy); + return makeCallbackProxy(proxy); } template * f> Callback PipeManager::makeBcast() { - return makeCallbackSingleBcast(); + return makeCallbackSingle(); } template @@ -139,23 +139,23 @@ Callback PipeManager::makeBcast() { } template -Callback PipeManager::makeBcast() { +Callback<> PipeManager::makeBcast() { return makeCallbackFunctorBcastVoid(); } template * f> Callback PipeManager::makeBcast(ColProxyType proxy) { - return makeCallbackSingleProxyBcastDirect(proxy); + return makeCallbackProxy(proxy); } template f> Callback PipeManager::makeBcast(ColProxyType proxy) { - return makeCallbackSingleProxyBcastDirect(proxy); + return makeCallbackProxy(proxy); } template f> Callback PipeManager::makeBcast(objgroup::proxy::Proxy proxy) { - return makeCallbackObjGrpBcast(proxy); + return makeCallbackProxy(proxy); } template diff --git a/src/vt/pipe/pipe_manager_tl.h b/src/vt/pipe/pipe_manager_tl.h index 5792fcc51f..e13a591439 100644 --- a/src/vt/pipe/pipe_manager_tl.h +++ b/src/vt/pipe/pipe_manager_tl.h @@ -76,6 +76,9 @@ struct PipeManagerTL : virtual PipeManagerBase { template using CallbackMsgType = callback::cbunion::CallbackTyped; + template + using CallbackRetType = callback::cbunion::CallbackTyped; + template using FnType = ActiveTypedFnType; @@ -87,94 +90,45 @@ struct PipeManagerTL : virtual PipeManagerBase { /* * Untyped variants of callbacks: uses union to dispatch */ - - - template * f, typename CbkT = DefType> - CbkT makeCallbackSingleSendT(NodeType const& node); - // Single active message function-handler - template * f, typename CbkT = DefType> - CbkT makeCallbackSingleSend(NodeType const& node); - - template * f, typename CbkT = DefType> - CbkT makeCallbackSingleBcast(); + template + auto makeCallbackSingle(NodeType node = uninitialized_destination); // Single active message functor-handler template < typename FunctorT, - typename T = typename util::FunctorExtractor::MessageType, - typename CbkT = DefType + typename T = typename util::FunctorExtractor::MessageType > - CbkT makeCallbackFunctorSend(NodeType const& node); + auto makeCallbackFunctorSend(NodeType const& node); template < typename FunctorT, - typename T = typename util::FunctorExtractor::MessageType, - typename CbkT = DefType + typename T = typename util::FunctorExtractor::MessageType > - CbkT makeCallbackFunctorBcast(); + auto makeCallbackFunctorBcast(); // Single active message functor-handler void param - template > - CbkT makeCallbackFunctorSendVoid(NodeType const& node); + template + auto makeCallbackFunctorSendVoid(NodeType const& node); - template > - CbkT makeCallbackFunctorBcastVoid(); + template + auto makeCallbackFunctorBcastVoid(); // Single active message anon func-handler - template > - CbkT makeCallbackSingleAnonVoid(LifetimeEnum life, FuncVoidType fn); - - template > - CbkT makeCallbackSingleAnon(LifetimeEnum life, FuncMsgType fn); - - template > - CbkT makeCallbackSingleAnon(LifetimeEnum life, U* u, FuncMsgCtxType fn); - - template > - CbkT makeCallbackSingleAnon(LifetimeEnum life, U* u, FuncCtxType fn); - - // Single active message collection proxy send - template < - typename ColT, typename T, ColHanType* f, typename CbkT = DefType - > - CbkT makeCallbackSingleProxySend(typename ColT::ProxyType proxy); - - template < - typename ColT, typename T, ColMemType f, typename CbkT = DefType - > - CbkT makeCallbackSingleProxySend(typename ColT::ProxyType proxy); - - // Obj group send callback - template < - typename ObjT, typename T, ObjMemType f, typename CbkT = DefType - > - CbkT makeCallbackObjGrpSend(objgroup::proxy::ProxyElm proxy); - - // Obj group bcast callback - template < - typename ObjT, typename T, ObjMemType f, typename CbkT = DefType - > - CbkT makeCallbackObjGrpBcast(objgroup::proxy::Proxy proxy); + auto makeCallbackSingleAnonVoid(LifetimeEnum life, FuncVoidType fn); + template + auto makeCallbackSingleAnon(LifetimeEnum life, FuncMsgType fn); - // Single active message collection proxy bcast - template < - typename ColT, typename T, ColHanType* f, typename CbkT = DefType - > - CbkT makeCallbackSingleProxyBcast(ColProxyType proxy); + template + auto makeCallbackSingleAnon(LifetimeEnum life, U* u, FuncMsgCtxType fn); - // Single active message collection proxy bcast direct - template < - typename ColT, typename T, ColHanType* f, typename CbkT = DefType - > - CbkT makeCallbackSingleProxyBcastDirect(ColProxyType proxy); + template + auto makeCallbackSingleAnon(LifetimeEnum life, U* u, FuncCtxType fn); - // Single active message collection proxy bcast direct (member) - template < - typename ColT, typename T, ColMemType f, typename CbkT = DefType - > - CbkT makeCallbackSingleProxyBcastDirect(ColProxyType proxy); + // Proxy callback + template + auto makeCallbackProxy(ProxyT proxy); // Multi-staged callback template diff --git a/src/vt/pipe/pipe_manager_tl.impl.h b/src/vt/pipe/pipe_manager_tl.impl.h index c396165ee2..0abb7a39b4 100644 --- a/src/vt/pipe/pipe_manager_tl.impl.h +++ b/src/vt/pipe/pipe_manager_tl.impl.h @@ -64,6 +64,9 @@ #include "vt/registry/auto/collection/auto_registry_collection.h" #include "vt/vrt/collection/dispatch/registry.h" #include "vt/objgroup/proxy/proxy_bits.h" +#include "vt/utils/fntraits/fntraits.h" +#include "vt/messaging/param_msg.h" +#include "vt/vrt/collection/messages/param_col_msg.h" #include @@ -135,186 +138,121 @@ void PipeManagerTL::addListenerFunctorBcast( ); } -template < - typename ColT, typename MsgT, PipeManagerTL::ColHanType* f, - typename CallbackT -> -CallbackT -PipeManagerTL::makeCallbackSingleProxySend(typename ColT::ProxyType proxy) { - bool const persist = true; - bool const send_back = false; - bool const dispatch = true; - auto const& pipe_id = makePipeID(persist,send_back); - newPipeState(pipe_id,persist,dispatch,-1,-1,0); - auto cb = CallbackT(callback::cbunion::RawSendColMsgTag,pipe_id); - auto const& handler = auto_registry::makeAutoHandlerCollection(); - addListenerAny( - cb.getPipe(), - std::make_unique>(handler, proxy) - ); - return cb; -} +template +using hasIdx_t = typename U::IndexType; -template < - typename ColT, typename MsgT, PipeManagerTL::ColMemType f, - typename CallbackT -> -CallbackT -PipeManagerTL::makeCallbackSingleProxySend(typename ColT::ProxyType proxy) { +template +auto PipeManagerTL::makeCallbackProxy(ProxyT proxy) { bool const persist = true; bool const send_back = false; bool const dispatch = true; - auto const& pipe_id = makePipeID(persist,send_back); - newPipeState(pipe_id,persist,dispatch,-1,-1,0); - auto cb = CallbackT(callback::cbunion::RawSendColMsgTag,pipe_id); - auto const& handler = - auto_registry::makeAutoHandlerCollectionMem(); - addListenerAny( - cb.getPipe(), - std::make_unique>(handler, proxy) - ); - return cb; -} - -template < - typename ObjT, typename MsgT, PipeManagerTL::ObjMemType fn, - typename CallbackT -> -CallbackT -PipeManagerTL::makeCallbackObjGrpSend(objgroup::proxy::ProxyElm proxy) { - bool const persist = true; - bool const send_back = false; - auto const& pipe_id = makePipeID(persist,send_back); - auto const proxy_bits = proxy.getProxy(); - auto const dest_node = proxy.getNode(); - auto const ctrl = objgroup::proxy::ObjGroupProxy::getID(proxy_bits); - auto const han = auto_registry::makeAutoHandlerObjGroup(ctrl); - auto cb = CallbackT( - callback::cbunion::RawSendObjGrpTag,pipe_id,han,proxy_bits,dest_node - ); - return cb; -} - -template < - typename ObjT, typename MsgT, PipeManagerTL::ObjMemType fn, - typename CallbackT -> -CallbackT -PipeManagerTL::makeCallbackObjGrpBcast(objgroup::proxy::Proxy proxy) { - bool const persist = true; - bool const send_back = false; - auto const& pipe_id = makePipeID(persist,send_back); - auto const proxy_bits = proxy.getProxy(); - auto const ctrl = objgroup::proxy::ObjGroupProxy::getID(proxy_bits); - auto const han = auto_registry::makeAutoHandlerObjGroup(ctrl); - auto cb = CallbackT( - callback::cbunion::RawBcastObjGrpTag,pipe_id,han,proxy_bits - ); - return cb; -} - - -// Single active message collection proxy bcast -template < - typename ColT, typename MsgT, PipeManagerTL::ColHanType* f, - typename CallbackT -> -CallbackT -PipeManagerTL::makeCallbackSingleProxyBcast(ColProxyType proxy) { - bool const persist = true; - bool const send_back = false; - bool const dispatch = true; - auto const& pipe_id = makePipeID(persist,send_back); - newPipeState(pipe_id,persist,dispatch,-1,-1,0); - auto cb = CallbackT(callback::cbunion::RawBcastColMsgTag,pipe_id); - auto const& handler = auto_registry::makeAutoHandlerCollection(); - addListenerAny( - cb.getPipe(), - std::make_unique>(handler,proxy) - ); - return cb; -} - -template < - typename ColT, typename MsgT, PipeManagerTL::ColHanType* f, - typename CallbackT -> -CallbackT -PipeManagerTL::makeCallbackSingleProxyBcastDirect(ColProxyType proxy) { - bool const persist = true; - bool const send_back = false; - auto const& pipe_id = makePipeID(persist,send_back); - auto const& handler = auto_registry::makeAutoHandlerCollection(); - auto const& vrt_handler = vrt::collection::makeVrtDispatch(); - auto cb = CallbackT( - callback::cbunion::RawBcastColDirTag, pipe_id, handler, vrt_handler, - proxy.getProxy() - ); - return cb; + auto const pipe_id = makePipeID(persist, send_back); + newPipeState(pipe_id, persist, dispatch, -1, -1, 0); + + using Trait = ObjFuncTraits; + using ObjT = typename Trait::ObjT; + using MsgT = typename Trait::MsgT; + using RetType = typename Trait::template WrapType; + + if constexpr (detection::is_detected::value) { + if constexpr (std::is_same_v) { + using Tuple = typename Trait::TupleType; + using PMsgT = vrt::collection::ParamColMsg; + auto han = auto_registry::makeAutoHandlerCollectionMemParam< + ObjT, decltype(f), f, PMsgT + >(); + if constexpr (is_bcast) { + auto vrt_handler = vrt::collection::makeVrtDispatch(); + return RetType{ + callback::cbunion::RawBcastColDirTag, pipe_id, han, vrt_handler, + proxy.getProxy() + }; + } else { + auto cb = RetType(callback::cbunion::RawSendColMsgTag, pipe_id); + addListenerAny( + cb.getPipe(), + std::make_unique>(han, proxy) + ); + return cb; + } + } else { + HandlerType han = uninitialized_handler; + if constexpr (Trait::is_member) { + han = auto_registry::makeAutoHandlerCollectionMem(); + } else { + han = auto_registry::makeAutoHandlerCollection(); + } + if constexpr (is_bcast) { + auto vrt_handler = vrt::collection::makeVrtDispatch(); + return RetType{ + callback::cbunion::RawBcastColDirTag, pipe_id, han, vrt_handler, + proxy.getProxy() + }; + } else { + auto cb = RetType(callback::cbunion::RawSendColMsgTag, pipe_id); + addListenerAny( + cb.getPipe(), + std::make_unique>(han, proxy) + ); + return cb; + } + } + } else { + auto const proxy_bits = proxy.getProxy(); + auto const ctrl = objgroup::proxy::ObjGroupProxy::getID(proxy_bits); + HandlerType han = uninitialized_handler; + if constexpr (std::is_same_v) { + using Tuple = typename Trait::TupleType; + using PMsgT = messaging::ParamMsg; + han = auto_registry::makeAutoHandlerObjGroupParam< + ObjT, decltype(f), f, PMsgT + >(ctrl); + } else { + han = auto_registry::makeAutoHandlerObjGroup(ctrl); + } + if constexpr (is_bcast) { + return RetType{ + callback::cbunion::RawBcastObjGrpTag, pipe_id, han, proxy_bits + }; + } else { + auto const dest_node = proxy.getNode(); + return RetType{ + callback::cbunion::RawSendObjGrpTag, pipe_id, han, proxy_bits, dest_node + }; + } + } } -template < - typename ColT, typename MsgT, PipeManagerTL::ColMemType f, - typename CallbackT -> -CallbackT -PipeManagerTL::makeCallbackSingleProxyBcastDirect(ColProxyType proxy) { - bool const persist = true; - bool const send_back = false; - auto const& pipe_id = makePipeID(persist,send_back); - auto const& handler = - auto_registry::makeAutoHandlerCollectionMem(); - auto const& vrt_handler = vrt::collection::makeVrtDispatch(); - auto cb = CallbackT( - callback::cbunion::RawBcastColDirTag, pipe_id, handler, vrt_handler, - proxy.getProxy() - ); - return cb; -} +template +auto PipeManagerTL::makeCallbackSingle(NodeType node) { + auto const new_pipe_id = makePipeID(true,false); -template * f, typename CallbackT> -CallbackT -PipeManagerTL::makeCallbackSingleSend(NodeType const& send_to_node) { - auto const& new_pipe_id = makePipeID(true,false); - auto const& handler = auto_registry::makeAutoHandler(); - auto cb = CallbackT( - callback::cbunion::RawSendMsgTag,new_pipe_id,handler,send_to_node - ); - return cb; -} + using Trait = FuncTraits; + using MsgT = typename Trait::MsgT; -template * f, typename CallbackT> -CallbackT - PipeManagerTL::makeCallbackSingleSendT(NodeType const& send_to_node) { - auto const& new_pipe_id = makePipeID(true,false); - auto const& handler = auto_registry::makeAutoHandler(); - auto cb = CallbackT( - callback::cbunion::RawSendMsgTag,new_pipe_id,handler,send_to_node - ); - return cb; -} + HandlerType han = uninitialized_handler; + if constexpr (std::is_same_v) { + han = auto_registry::makeAutoHandlerParam(); + } else { + han = auto_registry::makeAutoHandler(); + } -template * f, typename CallbackT> -CallbackT -PipeManagerTL::makeCallbackSingleBcast() { - auto const& new_pipe_id = makePipeID(true,false); - auto const& handler = auto_registry::makeAutoHandler(); - auto cb = CallbackT( - callback::cbunion::RawBcastMsgTag,new_pipe_id,handler - ); - return cb; + using RetType = typename Trait::template WrapType; + if constexpr (is_bcast) { + return RetType{callback::cbunion::RawBcastMsgTag, new_pipe_id, han}; + } else { + return RetType{callback::cbunion::RawSendMsgTag, new_pipe_id, han, node}; + } } -template -CallbackT -PipeManagerTL::makeCallbackSingleAnonVoid(LifetimeEnum life, FuncVoidType fn) { +inline auto PipeManagerTL::makeCallbackSingleAnonVoid(LifetimeEnum life, FuncVoidType fn) { PipeType new_pipe_id = no_pipe; if (life == LifetimeEnum::Once) { new_pipe_id = makeCallbackFuncVoid(false,fn,true,1,1); } else { new_pipe_id = makeCallbackFuncVoid(true,fn,true); } - auto cb = CallbackT(callback::cbunion::RawAnonTag,new_pipe_id); + auto cb = CallbackRetType<>(callback::cbunion::RawAnonTag,new_pipe_id); vt_debug_print( normal, pipe, @@ -325,9 +263,8 @@ PipeManagerTL::makeCallbackSingleAnonVoid(LifetimeEnum life, FuncVoidType fn) { return cb; } -template -CallbackT -PipeManagerTL::makeCallbackSingleAnon( +template +auto PipeManagerTL::makeCallbackSingleAnon( LifetimeEnum life, C* ctx, FuncCtxType fn ) { auto fn_closure = [ctx,fn] { fn(ctx); }; @@ -340,9 +277,8 @@ PipeManagerTL::makeCallbackSingleAnon( return makeCallbackSingleAnonVoid(life,fn_closure); } -template -CallbackT -PipeManagerTL::makeCallbackSingleAnon( +template +auto PipeManagerTL::makeCallbackSingleAnon( LifetimeEnum life, C* ctx, FuncMsgCtxType fn ) { auto fn_closure = [ctx,fn](MsgT* msg) { fn(msg, ctx); }; @@ -352,12 +288,11 @@ PipeManagerTL::makeCallbackSingleAnon( "makeCallbackSingleAnon: created closure\n" ); - return makeCallbackSingleAnon(life,fn_closure); + return makeCallbackSingleAnon(life,fn_closure); } -template -CallbackT -PipeManagerTL::makeCallbackSingleAnon(LifetimeEnum life, FuncMsgType fn) { +template +auto PipeManagerTL::makeCallbackSingleAnon(LifetimeEnum life, FuncMsgType fn) { PipeType new_pipe_id = no_pipe; if (life == LifetimeEnum::Once) { new_pipe_id = makeCallbackFunc(false,fn,true,1,1); @@ -365,7 +300,7 @@ PipeManagerTL::makeCallbackSingleAnon(LifetimeEnum life, FuncMsgType fn) { new_pipe_id = makeCallbackFunc(true,fn,true); } - auto cb = CallbackT(callback::cbunion::RawAnonTag,new_pipe_id); + auto cb = CallbackRetType(callback::cbunion::RawAnonTag,new_pipe_id); vt_debug_print( normal, pipe, @@ -376,49 +311,45 @@ PipeManagerTL::makeCallbackSingleAnon(LifetimeEnum life, FuncMsgType fn) { return cb; } -template -CallbackT -PipeManagerTL::makeCallbackFunctorSend(NodeType const& send_to_node) { +template +auto PipeManagerTL::makeCallbackFunctorSend(NodeType const& send_to_node) { using MsgT = typename util::FunctorExtractor::MessageType; auto const& new_pipe_id = makePipeID(true,false); auto const& handler = auto_registry::makeAutoHandlerFunctor(); - auto cb = CallbackT( + auto cb = CallbackRetType( callback::cbunion::RawSendMsgTag,new_pipe_id,handler,send_to_node ); return cb; } -template -CallbackT -PipeManagerTL::makeCallbackFunctorBcast() { +template +auto PipeManagerTL::makeCallbackFunctorBcast() { using MsgT = typename util::FunctorExtractor::MessageType; auto const& new_pipe_id = makePipeID(true,false); auto const& handler = auto_registry::makeAutoHandlerFunctor(); - auto cb = CallbackT( + auto cb = CallbackRetType( callback::cbunion::RawBcastMsgTag,new_pipe_id,handler ); return cb; } -template -CallbackT -PipeManagerTL::makeCallbackFunctorSendVoid(NodeType const& send_to_node) { +template +auto PipeManagerTL::makeCallbackFunctorSendVoid(NodeType const& send_to_node) { auto const& new_pipe_id = makePipeID(true,false); auto const& handler = auto_registry::makeAutoHandlerFunctor(); - auto cb = CallbackT( + auto cb = CallbackRetType<>( callback::cbunion::RawSendMsgTag,new_pipe_id,handler,send_to_node ); return cb; } -template -CallbackT -PipeManagerTL::makeCallbackFunctorBcastVoid() { +template +auto PipeManagerTL::makeCallbackFunctorBcastVoid() { auto const& new_pipe_id = makePipeID(true,false); auto const& handler = auto_registry::makeAutoHandlerFunctor(); - auto cb = CallbackT( + auto cb = CallbackRetType<>( callback::cbunion::RawBcastMsgTag,new_pipe_id,handler ); return cb; diff --git a/src/vt/rdma/rdma.cc b/src/vt/rdma/rdma.cc index 522bec52f3..d5ad0924da 100644 --- a/src/vt/rdma/rdma.cc +++ b/src/vt/rdma/rdma.cc @@ -272,7 +272,7 @@ RDMAManager::RDMAManager() if (not msg->has_bytes) { auto cbmsg = makeMessage(num_bytes); - msg->cb.send(cbmsg.get()); + msg->cb.sendMsg(cbmsg); } theRDMA()->createDirectChannelInternal( diff --git a/src/vt/utils/fntraits/fntraits.h b/src/vt/utils/fntraits/fntraits.h index 92dbde7af1..9574431289 100644 --- a/src/vt/utils/fntraits/fntraits.h +++ b/src/vt/utils/fntraits/fntraits.h @@ -65,6 +65,8 @@ struct ObjFuncTraitsImpl< using ObjT = Obj; using MsgT = Msg; using ReturnT = Return; + template