diff --git a/.gitignore b/.gitignore index e9ede979b0..b80ef85489 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ lib/*-build lib/checkpoint lib/googletest lib/kokkos +lib/vt-tv .emacs.desktop .clangd/ .vscode/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b24765221..5542d5fa89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,7 @@ include(cmake/configure_options.cmake) include(cmake/check_compiler.cmake) include(cmake/nvcc_no_deprecated_gpu_targets.cmake) include(cmake/load_bundled_libraries.cmake) - +include(cmake/load_local_packages.cmake) # Primary VT build add_subdirectory(src) diff --git a/ci/azure/azure-clang-10-ubuntu-mpich.yml b/ci/azure/azure-clang-10-ubuntu-mpich.yml index 7f314d0cd3..90f36ecdee 100644 --- a/ci/azure/azure-clang-10-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-10-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-clang-11-ubuntu-mpich.yml b/ci/azure/azure-clang-11-ubuntu-mpich.yml index 4d40ee104d..7f7e949017 100644 --- a/ci/azure/azure-clang-11-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-11-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-clang-12-ubuntu-mpich.yml b/ci/azure/azure-clang-12-ubuntu-mpich.yml index 18d3e1d258..c49dc12ae6 100644 --- a/ci/azure/azure-clang-12-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-12-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-clang-13-ubuntu-mpich.yml b/ci/azure/azure-clang-13-ubuntu-mpich.yml index 969b41aef4..998a1c8d17 100644 --- a/ci/azure/azure-clang-13-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-13-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-clang-14-ubuntu-mpich.yml b/ci/azure/azure-clang-14-ubuntu-mpich.yml index f4da3d33cd..99bcf4dfb0 100644 --- a/ci/azure/azure-clang-14-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-14-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 1 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-clang-16-ubuntu-mpich.yml b/ci/azure/azure-clang-16-ubuntu-mpich.yml index 78bae8f992..0e13229cdc 100644 --- a/ci/azure/azure-clang-16-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-16-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-clang-9-ubuntu-mpich.yml b/ci/azure/azure-clang-9-ubuntu-mpich.yml index e8af31032c..2bda7143f7 100644 --- a/ci/azure/azure-clang-9-ubuntu-mpich.yml +++ b/ci/azure/azure-clang-9-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: EXT_LIB VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-clang-alpine-mpich.yml b/ci/azure/azure-clang-alpine-mpich.yml index b83816c9c2..5e1d4fd27d 100644 --- a/ci/azure/azure-clang-alpine-mpich.yml +++ b/ci/azure/azure-clang-alpine-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-gcc-10-ubuntu-openmpi-spack.yml b/ci/azure/azure-gcc-10-ubuntu-openmpi-spack.yml index 9c1099d749..41da998d91 100644 --- a/ci/azure/azure-gcc-10-ubuntu-openmpi-spack.yml +++ b/ci/azure/azure-gcc-10-ubuntu-openmpi-spack.yml @@ -49,6 +49,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: false diff --git a/ci/azure/azure-gcc-10-ubuntu-openmpi.yml b/ci/azure/azure-gcc-10-ubuntu-openmpi.yml index 272586a9dd..255681d57c 100644 --- a/ci/azure/azure-gcc-10-ubuntu-openmpi.yml +++ b/ci/azure/azure-gcc-10-ubuntu-openmpi.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-gcc-11-ubuntu-mpich.yml b/ci/azure/azure-gcc-11-ubuntu-mpich.yml index 5712304949..d84579d971 100644 --- a/ci/azure/azure-gcc-11-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-11-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-gcc-12-ubuntu-mpich.yml b/ci/azure/azure-gcc-12-ubuntu-mpich.yml index 52f0914524..3909b9a04b 100644 --- a/ci/azure/azure-gcc-12-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-12-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 1 VT_KOKKOS_ENABLED: 1 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-gcc-12-ubuntu-vttv.yml b/ci/azure/azure-gcc-12-ubuntu-vttv.yml new file mode 100644 index 0000000000..fc797c8a73 --- /dev/null +++ b/ci/azure/azure-gcc-12-ubuntu-vttv.yml @@ -0,0 +1,216 @@ +############################################################################### +############## Warning this is a generated file---do not modify ############### +############################################################################### + +name: PR tests (gcc-12, ubuntu, vttv) + +trigger: + branches: + include: + - develop + - main + +pr: + drafts: false + autoCancel: true + branches: + include: + - '*' + + +resources: +- repo: self + +variables: + tag: '$(Build.BuildId)' + REPO: lifflander1/vt + ARCH: amd64 + UBUNTU: 22.04 + COMPILER_TYPE: gnu + COMPILER: gcc-12 + HOST_COMPILER: gcc-12 + BUILD_TYPE: release + ULIMIT_CORE: 0 + VT_CODE_COVERAGE: 0 + VT_LB: 1 + VT_TRACE: 0 + VT_TRACE_RT: 0 + VT_TRACE_ONLY: 0 + VT_MIMALLOC: 0 + VT_DOCS: 0 + VT_ASAN: 0 + VT_UBSAN: 0 + VT_WERROR: 1 + VT_POOL: 1 + VT_EXTENDED_TESTS: 1 + VT_TESTS_NUM_NODES: 2 + VT_EXTERNAL_FMT: 0 + VT_UNITY_BUILD: 1 + VT_PRODUCTION_BUILD: 0 + VT_FCONTEXT: 0 + VT_ZOLTAN: 0 + VT_CI_BUILD: 1 + VT_DIAGNOSTICS: 1 + VT_NO_COLOR: 1 + VT_BUILD_SHARED_LIBS: 0 + VT_INCLUSION: TPL + VT_DEBUG_VERBOSE: 0 + VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 1 + CMAKE_CXX_STANDARD: 17 + VT_CI_TEST_LB_SCHEMA: 0 + RUN_FULL_CI: true + CACHE: "$(Agent.TempDirectory)/cache/" + cache_name: ubuntu-gcc-12-cache + volume_name: ubuntu-cpp + build_root: "$(CACHE)$(ARCH)-ubuntu-$(UBUNTU)-$(HOST_COMPILER)-$(COMPILER)-cache/" + TS: 0 + TS_YEAR: 0 + TS_MONTH: 0 + TS_DAY: 0 + + + +stages: +- stage: Build + displayName: Build image + jobs: + - job: Build + displayName: Build + pool: + vmImage: 'ubuntu-22.04' + timeoutInMinutes: 180 + steps: + - checkout: self + fetchDepth: 0 + - task: Bash@3 + displayName: Build timestamp for caching + continueOnError: true + condition: eq(variables['RUN_FULL_CI'], 'true') + inputs: + targetType: 'inline' + script: | + echo 'string(TIMESTAMP current_date "%H;%M;%S" UTC)' > script + echo 'execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${current_date}")' >> script + val=$(cmake -P script) + echo "##vso[task.setvariable variable=TS]$val" + echo 'string(TIMESTAMP current_date "%Y" UTC)' > script + echo 'execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${current_date}")' >> script + val=$(cmake -P script) + echo "##vso[task.setvariable variable=TS_YEAR]$val" + echo 'string(TIMESTAMP current_date "%m" UTC)' > script + echo 'execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${current_date}")' >> script + val=$(cmake -P script) + echo "##vso[task.setvariable variable=TS_MONTH]$val" + echo 'string(TIMESTAMP current_date "%d" UTC)' > script + echo 'execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${current_date}")' >> script + val=$(cmake -P script) + echo "##vso[task.setvariable variable=TS_DAY]$val" + - task: Bash@3 + displayName: Output timestamp for caching + continueOnError: true + condition: and(eq(variables['RUN_FULL_CI'], 'true'), in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues')) + inputs: + targetType: 'inline' + script: 'echo "my pipeline variable is $(TS) $(TS_YEAR) $(TS_MONTH) $(TS_DAY)"' + - task: Cache@2 + displayName: Update cache + continueOnError: true + condition: and(eq(variables['RUN_FULL_CI'], 'true'), in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues')) + inputs: + securityNamespace: cache + key: $(Agent.OS) | "$(cache_name)" | $(TS_YEAR) | $(TS_MONTH) | $(TS_DAY) | $(TS) + path: '$(build_root)$(volume_name)/ccache' + restoreKeys: | + $(Agent.OS) | "$(cache_name)" | $(TS_YEAR) | $(TS_MONTH) | $(TS_DAY) + $(Agent.OS) | "$(cache_name)" | $(TS_YEAR) | $(TS_MONTH) + $(Agent.OS) | "$(cache_name)" | $(TS_YEAR) + $(Agent.OS) | "$(cache_name)" + - task: Bash@3 + displayName: Check for changes in containers + condition: in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues') + inputs: + targetType: 'inline' + script: | + val=$(./scripts/check_containers.sh) + echo "##vso[task.setvariable variable=compose_command]$val" + - task: DockerCompose@1 + displayName: Pull container + inputs: + projectName: darma-tasking-vt + containerregistrytype: 'Container Registry' + dockerComposeFile: '**/docker-compose.yml' + action: 'Run a Docker Compose command' + dockerComposeCommand: '$(compose_command) ubuntu-cpp-vtk' + - task: DockerCompose@1 + displayName: Build container + inputs: + projectName: darma-tasking-vt + containerregistrytype: 'Container Registry' + dockerComposeFile: '**/docker-compose.yml' + action: 'Run a Docker Compose command' + dockerComposeCommand: 'run ubuntu-cpp-vtk' + env: + CODECOV_TOKEN: $(codecov_token) + - task: Bash@3 + displayName: Put compilation's and tests' logs in PR comment + continueOnError: true + condition: and(eq(variables['RUN_FULL_CI'], 'true'), and(succeededOrFailed(), eq(variables['Build.Reason'], 'PullRequest'))) + inputs: + targetType: 'inline' + script: | + ./scripts/report_logs_in_comment.sh \ + "$(build_root)$(volume_name)/vt/compilation_errors_warnings.out" \ + "$(build_root)$(volume_name)/vt/cmake-output.log" \ + "$(Build.BuildNumber)" \ + "$(System.PullRequest.PullRequestNumber)" \ + "$(Build.Repository.Name)" \ + "$GITHUB_PAT" \ + "$(Build.BuildId)" \ + "$(System.JobId)" \ + "$(Agent.JobStatus)" + env: + GITHUB_PAT: $(github_pat) + - task: DockerCompose@1 + displayName: Push container to registry + continueOnError: true + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop')) + inputs: + projectName: darma-tasking-vt + containerregistrytype: 'Container Registry' + dockerRegistryEndpoint: 'dockerRegistryConnection1' + dockerComposeFile: '**/docker-compose.yml' + action: 'Run a Docker Compose command' + dockerComposeCommand: 'push ubuntu-cpp-vtk' + - task: Bash@3 + displayName: Create artifacts + continueOnError: true + condition: and(eq(variables['RUN_FULL_CI'], 'true'), in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues')) + inputs: + targetType: 'inline' + script: | + zip -j $(Agent.TempDirectory)/LastTest.log.gz $(build_root)$(volume_name)/vt/Testing/Temporary/LastTest.log + zip -j $(Agent.TempDirectory)/cmake-output.log.gz $(build_root)$(volume_name)/vt/cmake-output.log + - task: PublishPipelineArtifact@1 + displayName: Upload CMake test output artifact + continueOnError: true + condition: and(eq(variables['RUN_FULL_CI'], 'true'), in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues')) + inputs: + targetPath: '$(Agent.TempDirectory)/LastTest.log.gz' + artifact: 'CMakeLastTestLog' + publishLocation: 'pipeline' + - task: PublishPipelineArtifact@1 + displayName: Upload CMake full output artifact + continueOnError: true + condition: and(eq(variables['RUN_FULL_CI'], 'true'), in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues')) + inputs: + targetPath: '$(Agent.TempDirectory)/cmake-output.log.gz' + artifact: 'CMakeOutputLog' + publishLocation: 'pipeline' + - task: Bash@3 + displayName: Finish pipeline + condition: in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues') + inputs: + targetType: 'inline' + script: | + echo Done diff --git a/ci/azure/azure-gcc-8-ubuntu-mpich.yml b/ci/azure/azure-gcc-8-ubuntu-mpich.yml index 3fc4bcca8a..0780609881 100644 --- a/ci/azure/azure-gcc-8-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-8-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-gcc-9-ubuntu-mpich.yml b/ci/azure/azure-gcc-9-ubuntu-mpich.yml index bc6a187602..50ace94dbd 100644 --- a/ci/azure/azure-gcc-9-ubuntu-mpich.yml +++ b/ci/azure/azure-gcc-9-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 1 RUN_FULL_CI: true diff --git a/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml b/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml index 82751acabb..20c6394c36 100644 --- a/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml +++ b/ci/azure/azure-intel-oneapi-icpc-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml b/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml index 51fd3e475e..f5301e1df8 100644 --- a/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml +++ b/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 1 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml b/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml index f2997d00a9..da23bddc82 100644 --- a/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml +++ b/ci/azure/azure-nvidia-11-2-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 0 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/azure/azure-nvidia-12-ubuntu-mpich.yml b/ci/azure/azure-nvidia-12-ubuntu-mpich.yml index f8f3b6fff8..3c2ce1ba58 100644 --- a/ci/azure/azure-nvidia-12-ubuntu-mpich.yml +++ b/ci/azure/azure-nvidia-12-ubuntu-mpich.yml @@ -56,6 +56,7 @@ variables: VT_INCLUSION: TPL VT_DEBUG_VERBOSE: 1 VT_KOKKOS_ENABLED: 0 + VT_TV_ENABLED: 0 CMAKE_CXX_STANDARD: 17 VT_CI_TEST_LB_SCHEMA: 0 RUN_FULL_CI: true diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index 1e4fae89ff..d494b195f5 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -71,6 +71,11 @@ then rm -Rf checkpoint fi +if test -d "vt-tv" +then + rm -Rf vt-tv +fi + if test -d "${source_dir}/lib/checkpoint" then { echo "Checkpoint already in lib... not downloading, building, and installing"; } 2>/dev/null @@ -96,6 +101,19 @@ else fi fi +if test "${VT_TV_ENABLED}" -eq 1 +then + if test -d "${source_dir}/lib/vt-tv" + then + { echo "vt-tv already in lib... not downloading"; } 2>/dev/null + else + cd "${source_dir}/lib" + vt_tv_rev="1.5.0" + git clone -b "${vt_tv_rev}" --depth 1 https://github.com/DARMA-tasking/vt-tv.git + cd - + fi +fi + if test "${VT_ZOLTAN_ENABLED:-0}" -eq 1 then export Zoltan_DIR=${ZOLTAN_DIR:-""} @@ -125,6 +143,7 @@ cmake -G "${CMAKE_GENERATOR:-Ninja}" \ -Dvt_pool_enabled="${VT_POOL_ENABLED:-1}" \ -Dvt_build_extended_tests="${VT_EXTENDED_TESTS_ENABLED:-1}" \ -Dvt_zoltan_enabled="${VT_ZOLTAN_ENABLED:-0}" \ + -Dvt_tv_enabled="${VT_TV_ENABLED:-0}" \ -Dvt_production_build_enabled="${VT_PRODUCTION_BUILD_ENABLED:-0}" \ -Dvt_unity_build_enabled="${VT_UNITY_BUILD_ENABLED:-0}" \ -Dvt_diagnostics_enabled="${VT_DIAGNOSTICS_ENABLED:-1}" \ diff --git a/ci/deps/vtk.sh b/ci/deps/vtk.sh new file mode 100755 index 0000000000..c0a515925a --- /dev/null +++ b/ci/deps/vtk.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +set -exo pipefail + +if test $# -lt 3 +then + echo "usage: ./$0 " + exit 1 +fi + +base_dir=$(pwd) + +vtk_version="$1" +vtk_tar_name="v${vtk_version}.tar.gz" +vtk_name="VTK-${vtk_version}" +build_root="${2-}" + +make_args=$3 + +wget "https://github.com/Kitware/VTK/archive/refs/tags/$vtk_tar_name" +tar xzf ${vtk_tar_name} +rm ${vtk_tar_name} + +mkdir -p ${build_root} +cd ${build_root} + +mkdir -p build +mkdir -p install + +cd build +cmake \ + -DCMAKE_INSTALL_PREFIX:FILEPATH=${build_root}/install \ + ${base_dir}/${vtk_name} +cmake --build . --target install -j ${make_args} + +cd ${base_dir} +rm -rf ${vtk_name} +rm -rf ${build_root}/build diff --git a/ci/docker/ubuntu-gnu-cpp.dockerfile b/ci/docker/ubuntu-gnu-cpp.dockerfile index 8842ba9147..af31b8f87c 100644 --- a/ci/docker/ubuntu-gnu-cpp.dockerfile +++ b/ci/docker/ubuntu-gnu-cpp.dockerfile @@ -31,6 +31,11 @@ RUN apt-get update -y -q && \ wget \ zlib1g \ zlib1g-dev \ + libncurses5-dev \ + m4 \ + libgl1-mesa-dev \ + libglu1-mesa-dev \ + mesa-common-dev \ brotli \ python3 \ python3-brotli \ @@ -136,7 +141,8 @@ ENV BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \ CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} \ VT_DEBUG_VERBOSE=$(VT_DEBUG_VERBOSE) \ VT_CI_BUILD=${VT_CI_BUILD} \ - VT_KOKKOS_ENABLED=${VT_KOKKOS_ENABLED} + VT_KOKKOS_ENABLED=${VT_KOKKOS_ENABLED} \ + VT_TV_ENABLED=${VT_TV_ENABLED} RUN /vt/ci/build_cpp.sh /vt /build diff --git a/ci/docker/ubuntu-gnu-vtk-cpp.dockerfile b/ci/docker/ubuntu-gnu-vtk-cpp.dockerfile new file mode 100644 index 0000000000..2ba34f3a53 --- /dev/null +++ b/ci/docker/ubuntu-gnu-vtk-cpp.dockerfile @@ -0,0 +1,156 @@ +ARG arch=amd64 +ARG ubuntu=20.04 +FROM ${arch}/ubuntu:${ubuntu} as base + +ARG proxy="" +ARG compiler=gcc-12 +ARG ubuntu + +ENV https_proxy=${proxy} \ + http_proxy=${proxy} + +ENV DEBIAN_FRONTEND=noninteractive + +ARG zoltan_enabled + +RUN apt-get update -y -q && \ + apt-get install -y -q --no-install-recommends \ + ${compiler} \ + g++-$(echo ${compiler} | cut -d- -f2) \ + ${zoltan_enabled:+gfortran-$(echo ${compiler} | cut -d- -f2)} \ + ca-certificates \ + ccache \ + curl \ + git \ + less \ + libomp5 \ + libunwind-dev \ + make-guile \ + ninja-build \ + python3 \ + valgrind \ + wget \ + zlib1g \ + zlib1g-dev \ + libncurses5-dev \ + m4 \ + libgl1-mesa-dev \ + libglu1-mesa-dev \ + mesa-common-dev \ + brotli \ + python3 \ + python3-brotli \ + python3-pip && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN ln -s \ + "$(which g++-$(echo ${compiler} | cut -d- -f2))" \ + /usr/bin/g++ + +RUN ln -s \ + "$(which gcc-$(echo ${compiler} | cut -d- -f2))" \ + /usr/bin/gcc + +RUN if test ${zoltan_enabled} -eq 1; then \ + ln -s \ + "$(which gfortran-$(echo ${compiler} | cut -d- -f2))" \ + /usr/bin/gfortran; \ + fi + +ENV CC=gcc \ + CXX=g++ + +ARG arch + +COPY ./ci/deps/cmake.sh cmake.sh +RUN ./cmake.sh 3.23.4 ${arch} + +ENV PATH=/cmake/bin/:$PATH +ENV LESSCHARSET=utf-8 + +COPY ./ci/deps/vtk.sh vtk.sh +RUN chmod +x vtk.sh && ./vtk.sh 9.3.0 /vtk-build -j4 +ENV VTK_DIR=/vtk-build/install/lib/cmake/vtk-9.3 + +COPY ./ci/deps/mpich.sh mpich.sh +RUN if [ "$ubuntu" = "18.04" ]; then \ + ./mpich.sh 3.3.2 -j4; else \ + ./mpich.sh 4.0.2 -j4; \ + fi + +ENV MPI_EXTRA_FLAGS="" \ + PATH=/usr/lib/ccache/:$PATH + +ARG ZOLTAN_INSTALL_DIR=/trilinos-install +ENV ZOLTAN_DIR=${ZOLTAN_INSTALL_DIR} + +COPY ./ci/deps/zoltan.sh zoltan.sh +RUN if test ${zoltan_enabled} -eq 1; then \ + ./zoltan.sh -j4 ${ZOLTAN_INSTALL_DIR}; \ + fi + +RUN apt-get update -y -q && \ + apt-get install -y -q --no-install-recommends \ + lcov && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN pip3 install schema + +FROM base as build +COPY . /vt + +ARG BUILD_SHARED_LIBS +ARG CMAKE_BUILD_TYPE +ARG VT_ASAN_ENABLED +ARG VT_DOXYGEN_ENABLED +ARG VT_EXTENDED_TESTS_ENABLED +ARG VT_FCONTEXT_ENABLED +ARG VT_LB_ENABLED +ARG VT_MIMALLOC_ENABLED +ARG VT_NO_COLOR_ENABLED +ARG VT_POOL_ENABLED +ARG VT_PRODUCTION_BUILD_ENABLED +ARG VT_TRACE_ENABLED +ARG VT_TRACE_RUNTIME_ENABLED +ARG VT_UBSAN_ENABLED +ARG VT_WERROR_ENABLED +ARG VT_ZOLTAN_ENABLED +ARG CMAKE_CXX_STANDARD +ARG VT_DEBUG_VERBOSE +ARG VT_CI_BUILD +ARG VT_KOKKOS_ENABLED + +ENV BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \ + CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ + VT_ASAN_ENABLED=${VT_ASAN_ENABLED} \ + VT_DIAGNOSTICS_ENABLED=${VT_DIAGNOSTICS_ENABLED} \ + VT_DIAGNOSTICS_RUNTIME_ENABLED=${VT_DIAGNOSTICS_RUNTIME_ENABLED} \ + VT_DOXYGEN_ENABLED=${VT_DOXYGEN_ENABLED} \ + VT_EXTENDED_TESTS_ENABLED=${VT_EXTENDED_TESTS_ENABLED} \ + VT_FCONTEXT_ENABLED=${VT_FCONTEXT_ENABLED} \ + VT_LB_ENABLED=${VT_LB_ENABLED} \ + VT_MIMALLOC_ENABLED=${VT_MIMALLOC_ENABLED} \ + VT_MPI_GUARD_ENABLED=${VT_MPI_GUARD_ENABLED} \ + VT_NO_COLOR_ENABLED=${VT_NO_COLOR_ENABLED} \ + VT_POOL_ENABLED=${VT_POOL_ENABLED} \ + VT_PRODUCTION_BUILD_ENABLED=${VT_PRODUCTION_BUILD_ENABLED} \ + VT_TRACE_ENABLED=${VT_TRACE_ENABLED} \ + VT_TRACE_RUNTIME_ENABLED=${VT_TRACE_RUNTIME} \ + VT_UBSAN_ENABLED=${VT_UBSAN_ENABLED} \ + VT_UNITY_BUILD_ENABLED=${VT_UNITY_BUILD_ENABLED} \ + VT_WERROR_ENABLED=${VT_WERROR_ENABLED} \ + VT_ZOLTAN_ENABLED=${VT_ZOLTAN_ENABLED} \ + CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} \ + VT_DEBUG_VERBOSE=$(VT_DEBUG_VERBOSE) \ + VT_CI_BUILD=${VT_CI_BUILD} \ + VT_KOKKOS_ENABLED=${VT_KOKKOS_ENABLED} \ + VT_TV_ENABLED=${VT_TV_ENABLED} + +RUN /vt/ci/build_cpp.sh /vt /build + +FROM build as test +RUN /vt/ci/test_cpp.sh /vt /build + +RUN /vt/ci/build_vt_sample.sh /vt /build diff --git a/cmake/configure_options.cmake b/cmake/configure_options.cmake index 031671c495..e3509db735 100644 --- a/cmake/configure_options.cmake +++ b/cmake/configure_options.cmake @@ -84,6 +84,8 @@ define_option(vt_mpi_guards "user MPI prevention guards" ON vt_feature_cmake_mpi_access_guards ) +define_option(vt_tv_enabled "vt-tv" "Build VT with vt-tv" OFF vt_feature_cmake_tv) + define_option(vt_zoltan_enabled "Zoltan" "Build VT with Zoltan" OFF vt_feature_cmake_zoltan) if(NOT LOWERCASE_CMAKE_BUILD_TYPE STREQUAL "release") diff --git a/cmake/link_vt.cmake b/cmake/link_vt.cmake index ffd0b8e821..52128a747f 100644 --- a/cmake/link_vt.cmake +++ b/cmake/link_vt.cmake @@ -34,6 +34,7 @@ function(link_target_with_vt) LINK_FORT LINK_JSON LINK_BROTLI + LINK_VT_TV ) set( multiValueArg @@ -71,6 +72,14 @@ function(link_target_with_vt) endif() endif() + if (NOT DEFINED ARG_LINK_VT_TV AND ${ARG_DEFAULT_LINK_SET} OR ARG_LINK_VT_TV) + if (vt_tv_enabled) + target_link_libraries( + ${ARG_TARGET} PUBLIC ${ARG_BUILD_TYPE} ${TV_LIBRARY} + ) + endif() + endif() + if (NOT DEFINED ARG_LINK_ZOLTAN AND ${ARG_DEFAULT_LINK_SET} OR ARG_LINK_ZOLTAN) if (vt_zoltan_enabled) if (${ARG_DEBUG_LINK}) diff --git a/cmake/load_bundled_libraries.cmake b/cmake/load_bundled_libraries.cmake index 0981547a6a..2d95298dd1 100644 --- a/cmake/load_bundled_libraries.cmake +++ b/cmake/load_bundled_libraries.cmake @@ -40,8 +40,10 @@ endif() # yaml-cpp always included in the build set(YAMLCPP_LIBRARY yaml-cpp) -add_subdirectory(${PROJECT_LIB_DIR}/yaml-cpp) -set_darma_compiler_flags(${YAMLCPP_LIBRARY}) +if(NOT TARGET ${YAMLCPP_LIBRARY}) + add_subdirectory(${PROJECT_LIB_DIR}/yaml-cpp) + set_darma_compiler_flags(${YAMLCPP_LIBRARY}) +endif() # EngFormat-Cpp always included in the build set(ENG_FORMAT_LIBRARY EngFormat-Cpp) diff --git a/cmake/load_local_packages.cmake b/cmake/load_local_packages.cmake index 6bc92937b5..62adbd4ac1 100644 --- a/cmake/load_local_packages.cmake +++ b/cmake/load_local_packages.cmake @@ -15,3 +15,9 @@ else() endif() set(MAGISTRATE_LIBRARY vt::lib::magistrate) + +if (EXISTS "${PROJECT_LIB_DIR}/vt-tv" AND vt_tv_enabled AND NOT vt_trace_only) + set(vt_tv_python_bindings_enabled OFF) + add_subdirectory(${PROJECT_LIB_DIR}/vt-tv) + set(TV_LIBRARY vt::lib::vt-tv) +endif() diff --git a/cmake/load_packages.cmake b/cmake/load_packages.cmake index 5932b51939..754b62ea43 100644 --- a/cmake/load_packages.cmake +++ b/cmake/load_packages.cmake @@ -1,8 +1,5 @@ get_directory_property(projHasParent PARENT_DIRECTORY) -# Local packages that VT depends on: checkpoint -include(cmake/load_local_packages.cmake) - # MPI package include(cmake/load_mpi_package.cmake) diff --git a/cmake_config.h.in b/cmake_config.h.in index ac4d937a4a..86585007df 100644 --- a/cmake_config.h.in +++ b/cmake_config.h.in @@ -67,6 +67,7 @@ #define vt_feature_cmake_rdma_tests @vt_feature_cmake_rdma_tests@ #define vt_feature_cmake_external_fmt @vt_feature_cmake_external_fmt@ #define vt_feature_cmake_libunwind @vt_feature_cmake_libunwind@ +#define vt_feature_cmake_tv @vt_feature_cmake_tv@ #define vt_detected_max_num_nodes @cmake_detected_max_num_nodes@ diff --git a/docker-compose.yml b/docker-compose.yml index d81e1ac6f0..b4916434ae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -117,6 +117,7 @@ x-vtopts: &vtopts CODECOV_TOKEN: ${CODECOV_TOKEN:-} VT_CI_TEST_LB_SCHEMA: ${VT_CI_TEST_LB_SCHEMA:-0} CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD:-17} + VT_TV_ENABLED: ${VT_TV_ENABLED:-0} services: ############################################################################## @@ -136,6 +137,7 @@ services: host_compiler: ${HOST_COMPILER} ubuntu: ${UBUNTU} ubsan_enabled: ${VT_UBSAN:-0} + vt_tv_enabled: ${VT_TV_ENABLED:-0} zoltan_enabled: ${VT_ZOLTAN:-0} external_fmt: ${VT_EXTERNAL_FMT:-0} cache_from: @@ -153,6 +155,25 @@ services: /vt/ci/test_cpp.sh /vt /build && /vt/ci/build_vt_sample.sh /vt /build" + ############################################################################## + # C++ builds of VTK and VT on ubuntu/alpine platform from container baseline + # Ubuntu gcc-12 debug build: + # docker compose run -e CMAKE_BUILD_TYPE=debug ubuntu-vtk-cpp + ubuntu-cpp-vtk: + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-vtk-cpp + build: + context: . + target: base + dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-vtk-cpp.dockerfile + args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-vtk-cpp + ulimits: *ulimits + environment: + <<: [*ccache, *vtopts] + volumes: *ubuntu-volumes + command: *vt-cpp-command + ############################################################################## # C++ build/test/clean target for VT on ubuntu platform from container # baseline. diff --git a/scripts/workflow-azure-template.yml b/scripts/workflow-azure-template.yml index 72b77118b0..a54ba86de5 100644 --- a/scripts/workflow-azure-template.yml +++ b/scripts/workflow-azure-template.yml @@ -44,6 +44,7 @@ variables: VT_INCLUSION: [% vt_inclusion %] VT_DEBUG_VERBOSE: [% vt_debug_verbose %] VT_KOKKOS_ENABLED: [% vt_kokkos_enabled %] + VT_TV_ENABLED: [% vt_tv_enabled %] CMAKE_CXX_STANDARD: [% cmake_cxx_standard %] VT_CI_TEST_LB_SCHEMA: [% vt_ci_test_lb_schema %] RUN_FULL_CI: [% run_full_ci %] diff --git a/scripts/workflows-azure.ini b/scripts/workflows-azure.ini index 5bc0323f4c..7905116fb5 100644 --- a/scripts/workflows-azure.ini +++ b/scripts/workflows-azure.ini @@ -46,6 +46,7 @@ cmake_cxx_standard = 17 vt_debug_verbose = 0 vt_kokkos_enabled = 0 run_full_ci = true +vt_tv_enabled = 0 [PR-tests-intel-oneAPI] test_configuration = "intel icpx, ubuntu, mpich, verbose" @@ -230,3 +231,13 @@ pr_pattern = "pr: none" triggers = "trigger:\\n branches:\\n include:\\n - develop" build_root = $(ARCH)-[% linux %]-$(UBUNTU)-$(HOST_COMPILER)-$(COMPILER)-openmpi-cpp/ run_full_ci = false + +[PR-tests-gcc-12-vttv] +test_configuration = "gcc-12, ubuntu, vttv" +docker_target = "[% linux %]-cpp-vtk" +compiler_type = gnu +compiler = gcc-12 +distro = 22.04 +output_name = ci/azure/azure-gcc-12-ubuntu-vttv.yml +vt_tv_enabled = 1 +vt_trace_only = 0 diff --git a/src/vt/configs/arguments/app_config.h b/src/vt/configs/arguments/app_config.h index 2ddb024a31..51ceeb98ba 100644 --- a/src/vt/configs/arguments/app_config.h +++ b/src/vt/configs/arguments/app_config.h @@ -232,6 +232,9 @@ struct AppConfig { bool vt_debug_print_flush = false; + bool vt_tv = false; + std::string vt_tv_config_file = ""; + bool vt_user_1 = false; bool vt_user_2 = false; bool vt_user_3 = false; @@ -394,6 +397,9 @@ struct AppConfig { | vt_debug_print_flush + | vt_tv + | vt_tv_config_file + | vt_user_1 | vt_user_2 | vt_user_3 diff --git a/src/vt/configs/arguments/args.cc b/src/vt/configs/arguments/args.cc index 0aae6c0572..4a968dfdba 100644 --- a/src/vt/configs/arguments/args.cc +++ b/src/vt/configs/arguments/args.cc @@ -206,6 +206,10 @@ static const std::string vt_max_mpi_send_size_label = "Max MPI Send Size"; static const std::string vt_no_assert_fail_label = "Disable Assert Failure"; static const std::string vt_throw_on_abort_label = "Throw on Abort"; +// Visualization +static const std::string vt_tv_label = "Enabled"; +static const std::string vt_tv_config_file_label = "Configuration File"; + std::unordered_map user_args_labels = { {"vt_user_1", "unused_user_param"}, {"vt_user_2", "unused_user_param"}, @@ -615,6 +619,11 @@ void parseYaml(AppConfig& appConfig, std::string const& inputFile) { update_config(appConfig.vt_max_mpi_send_size, vt_max_mpi_send_size_label, runtime); update_config(appConfig.vt_no_assert_fail, vt_no_assert_fail_label, runtime); update_config(appConfig.vt_throw_on_abort, vt_throw_on_abort_label, runtime); + + // Visualization + YAML::Node viz = yaml_input["Visualization"]; + update_config(appConfig.vt_tv, vt_tv_label, viz); + update_config(appConfig.vt_tv_config_file, vt_tv_config_file_label, viz); } void addColorArgs(CLI::App& app, AppConfig& appConfig) { @@ -1109,6 +1118,20 @@ void addRuntimeArgs(CLI::App& app, AppConfig& appConfig) { a3->group(configRuntime); } +void addTVArgs(CLI::App& app, AppConfig& appConfig) { + auto tv_enabled = "Enable vt-tv visualization/mesh streaming"; + auto tv_file = "File name for YAML vt-tv configuraton file"; + + auto a1 = app.add_flag("--vt_tv", appConfig.vt_tv, tv_enabled); + auto a2 = app.add_option( + "--vt_tv_config_file", appConfig.vt_tv_config_file, tv_file + ); + + auto configTV = "vt-tv Configuration"; + a1->group(configTV); + a2->group(configTV); +} + void addThreadingArgs( [[maybe_unused]] CLI::App& app, [[maybe_unused]] AppConfig& appConfig @@ -1306,7 +1329,11 @@ std::string convertConfigToYamlString(AppConfig& appConfig) { // Runtime {"Runtime", vt_max_mpi_send_size_label, static_cast(appConfig.vt_max_mpi_send_size)}, {"Runtime", vt_no_assert_fail_label, static_cast(appConfig.vt_no_assert_fail)}, - {"Runtime", vt_throw_on_abort_label, static_cast(appConfig.vt_throw_on_abort)} + {"Runtime", vt_throw_on_abort_label, static_cast(appConfig.vt_throw_on_abort)}, + + // Visualization + {"Visualization", vt_tv_label, static_cast(appConfig.vt_tv)}, + {"Visualization", vt_tv_config_file_label, static_cast(appConfig.vt_tv_config_file)} }; // Create an empty node that we will populate @@ -1452,6 +1479,7 @@ std::tuple ArgConfig::parseToConfig( addSchedulerArgs(app, appConfig); addConfigFileArgs(app, appConfig); addRuntimeArgs(app, appConfig); + addTVArgs(app, appConfig); addThreadingArgs(app, appConfig); std::tuple result = parseArguments(app, argc, argv, appConfig); diff --git a/src/vt/configs/features/features_defines.h b/src/vt/configs/features/features_defines.h index d322443be6..4589a0eeb5 100644 --- a/src/vt/configs/features/features_defines.h +++ b/src/vt/configs/features/features_defines.h @@ -74,6 +74,7 @@ #define vt_feature_debug_verbose 0 || vt_feature_cmake_debug_verbose #define vt_feature_fmt_external 0 || vt_feature_cmake_external_fmt #define vt_feature_libunwind 0 || vt_feature_cmake_libunwind +#define vt_feature_tv 0 || vt_feature_cmake_tv #define vt_check_enabled(test_option) (vt_feature_ ## test_option != 0) diff --git a/src/vt/vrt/collection/balance/lb_data_holder.cc b/src/vt/vrt/collection/balance/lb_data_holder.cc index dd8a3dfb34..b3fbbb2af0 100644 --- a/src/vt/vrt/collection/balance/lb_data_holder.cc +++ b/src/vt/vrt/collection/balance/lb_data_holder.cc @@ -45,6 +45,10 @@ #include "vt/elm/elm_id_bits.h" #include "vt/vrt/collection/balance/lb_data_holder.h" +#if vt_check_enabled(tv) +# include +#endif + #include namespace vt { namespace vrt { namespace collection { namespace balance { @@ -325,6 +329,103 @@ std::unique_ptr LBDataHolder::toJson(PhaseType phase) const { return std::make_unique(std::move(j)); } +#if vt_check_enabled(tv) +std::unique_ptr LBDataHolder::toTV(PhaseType phase) const { + using vt::tv::PhaseWork; + using vt::tv::ObjectWork; + using vt::tv::ObjectCommunicator; + + std::unordered_map objects; + + if (node_data_.find(phase) != node_data_.end()) { + for (auto&& elm : node_data_.at(phase)) { + ElementIDStruct id = elm.first; + double whole_phase_load = elm.second.whole_phase_load; + auto const& subphase_loads = elm.second.subphase_loads; + + ElmUserDataType user_defined; + if ( + user_defined_lb_info_.find(phase) != user_defined_lb_info_.end() and + user_defined_lb_info_.at(phase).find(id) != + user_defined_lb_info_.at(phase).end() + ) { + user_defined = user_defined_lb_info_.at(phase).at(id); + } + std::unordered_map subphase_map; + for (std::size_t i = 0; i < subphase_loads.size(); i++) { + subphase_map[i] = subphase_loads[i]; + } + objects.try_emplace( + id.id, + // add id into map and then construct ObjectWork with these parameters + ObjectWork( + id.id, whole_phase_load, std::move(subphase_map), std::move(user_defined) + ) + ); + } + } + + if (node_comm_.find(phase) != node_comm_.end()) { + for (auto&& elm : node_comm_.at(phase)) { + auto const& key = elm.first; + auto const& volume = elm.second; + auto const& bytes = volume.bytes; + switch(key.cat_) { + case elm::CommCategory::SendRecv: { + auto from_id = key.fromObj(); + auto to_id = key.toObj(); + + if (objects.find(from_id.id) != objects.end()) { + objects.at(from_id.id).addSentCommunications(to_id.id, bytes); + } else if (objects.find(to_id.id) != objects.end()) { + objects.at(to_id.id).addReceivedCommunications(from_id.id, bytes); + } + break; + } + default: + // skip all other communications for now + break; + } + } + } + + return std::make_unique(phase, objects); +} + +std::unordered_map LBDataHolder::getObjInfo( + PhaseType phase +) const { + std::unordered_map map; + if (node_data_.find(phase) != node_data_.end()) { + for (auto&& elm : node_data_.at(phase)) { + ElementIDStruct id = elm.first; + + bool is_collection = false; + bool is_objgroup = false; + + std::vector idx; + if (auto it = node_idx_.find(id); it != node_idx_.end()) { + is_collection = true; + idx = std::get<1>(it->second); + } + + if (node_objgroup_.find(id) != node_objgroup_.end()) { + is_objgroup = true; + } + + tv::ObjectInfo oi{ + id.id, id.getHomeNode(), id.isMigratable(), std::move(idx) + }; + oi.setIsCollection(is_collection); + oi.setIsObjGroup(is_objgroup); + map[id.id] = std::move(oi); + } + } + return map; +} + +#endif + LBDataHolder::LBDataHolder(nlohmann::json const& j) { this_node_ = theContext()->getNode(); diff --git a/src/vt/vrt/collection/balance/lb_data_holder.h b/src/vt/vrt/collection/balance/lb_data_holder.h index 729949693f..6b24f0a549 100644 --- a/src/vt/vrt/collection/balance/lb_data_holder.h +++ b/src/vt/vrt/collection/balance/lb_data_holder.h @@ -47,6 +47,10 @@ #include "vt/config.h" #include "vt/vrt/collection/balance/lb_common.h" +#if vt_check_enabled(tv) +# include +#endif + #include #include @@ -94,6 +98,26 @@ struct LBDataHolder { */ std::unique_ptr toJson(PhaseType phase) const; +#if vt_check_enabled(tv) + /** + * \brief Generate vt-tv data structure for visualization + * + * \param[in] phase the phase to generate + * + * \return a \c vt::tv::PhaseWork data structure + */ + std::unique_ptr toTV(PhaseType phase) const; + + /** + * \brief Get all object info mapped here for a given phase + * + * \return map with object info + */ + std::unordered_map getObjInfo( + PhaseType phase + ) const; +#endif + /** * \brief Output a LB phase's metadata to JSON * diff --git a/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc b/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc index de4705aa5e..20f73dca2b 100644 --- a/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc +++ b/src/vt/vrt/collection/balance/lb_invoke/lb_manager.cc @@ -73,6 +73,10 @@ #include "vt/vrt/collection/manager.h" #include "vt/utils/json/json_appender.h" +#if vt_check_enabled(tv) +# include +#endif + namespace vt { namespace vrt { namespace collection { namespace balance { /*static*/ std::unique_ptr LBManager::construct() { @@ -478,6 +482,57 @@ void LBManager::fatalError() { closeStatisticsFile(); } +#if vt_check_enabled(tv) +struct GatherTVInfo { + GatherTVInfo() = default; + + std::unordered_map rank_map; + std::unordered_map info; + PhaseType phase = 0; + + template + void serialize(SerializerT& s) { + s | rank_map | info | phase; + } + + friend GatherTVInfo operator+(GatherTVInfo a1, GatherTVInfo const& a2) { + for (auto& [node, rank] : a2.rank_map) { + a1.rank_map[node] = rank; + } + for (auto& [elm, oi] : a2.info) { + a1.info[elm] = oi; + } + return a1; + } +}; + + +static void collectTVData(GatherTVInfo& gather) { + using tv::utility::ParseRender; + ParseRender pr{theConfig()->vt_tv_config_file}; + auto info = std::make_unique( + std::move(gather.info), + std::move(gather.rank_map) + ); + pr.parseAndRender(gather.phase, std::move(info)); +} + +void gatherTVGlobal(PhaseType phase, objgroup::proxy::Proxy &proxy) { + vt::runInEpochCollective([&]{ + auto phase_work = theNodeLBData()->getLBData()->toTV(phase); + auto object_info = theNodeLBData()->getLBData()->getObjInfo(phase); + std::unordered_map map; + map[phase] = std::move(*phase_work); + auto this_node = theContext()->getNode(); + vt::tv::Rank r{this_node, std::move(map)}; + std::unordered_map rank_map; + rank_map[this_node] = std::move(r); + GatherTVInfo gather{rank_map, object_info, phase}; + proxy.reduce(0, std::move(gather)); + }); +} +#endif + void LBManager::finishedLB(PhaseType phase) { vt_debug_print( normal, lb, @@ -488,6 +543,12 @@ void LBManager::finishedLB(PhaseType phase) { theNodeLBData()->outputLBDataForPhase(phase); destroyLB(); + +#if vt_check_enabled(tv) + if (theConfig()->vt_tv) { + gatherTVGlobal(phase, proxy_); + } +#endif } void LBManager::statsHandler(std::vector const& in_stat_vec) { diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8cf9666ada..5f97e3e290 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -10,6 +10,7 @@ else() message(STATUS "Building VT without extended testing") endif() +set(PROJECT_TEST_CONFIG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/config) set(PROJECT_TEST_UNIT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/unit) set(PROJECT_TEST_PERF_DIR ${CMAKE_CURRENT_SOURCE_DIR}/perf) set(PROJECT_GTEST_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/extern/googletest/googletest/include) @@ -44,7 +45,9 @@ subdirlist( set(BUILD_GMOCK OFF CACHE BOOL "Builds the googlemock subproject" FORCE) set(INSTALL_GTEST OFF CACHE BOOL "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" FORCE) -add_subdirectory(extern/googletest) +if (NOT TARGET gtest) + add_subdirectory(extern/googletest) +endif() set(GOOGLETEST_LIBRARY gtest) set_darma_compiler_flags(${GOOGLETEST_LIBRARY}) @@ -207,6 +210,11 @@ foreach(SUB_DIR ${UNIT_TEST_SUBDIRS_LIST}) list(APPEND ADDITIONAL_ARGS "--vt_trace") endif() + if (vt_tv_enabled) + list(APPEND ADDITIONAL_ARGS "--vt_tv") + list(APPEND ADDITIONAL_ARGS "--vt_tv_config_file=${PROJECT_TEST_CONFIG_DIR}/test_vttv.yaml") + 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}") diff --git a/tests/config/test_vttv.yaml b/tests/config/test_vttv.yaml new file mode 100644 index 0000000000..0630021086 --- /dev/null +++ b/tests/config/test_vttv.yaml @@ -0,0 +1,10 @@ +viz: + x_ranks: 2 + y_ranks: 2 + z_ranks: 1 + object_jitter: 0.5 + rank_qoi: load + object_qoi: load + save_meshes: false + save_pngs: false + force_continuous_object_qoi: true diff --git a/tests/unit/active/test_active_send_large.cc b/tests/unit/active/test_active_send_large.cc index 7833fd87a5..25ac33b187 100644 --- a/tests/unit/active/test_active_send_large.cc +++ b/tests/unit/active/test_active_send_large.cc @@ -91,7 +91,7 @@ template void checkMsg(T msg) { auto arr = reinterpret_cast(&msg->payload[0]); for (std::size_t i = 0; i < msg->bytes / sizeof(int64_t); i++) { - EXPECT_EQ(arr[i], i); + EXPECT_EQ(arr[i], static_cast(i)); } } diff --git a/tests/unit/collection/test_checkpoint.extended.cc b/tests/unit/collection/test_checkpoint.extended.cc index 5f7b7c4666..28af0b2ed5 100644 --- a/tests/unit/collection/test_checkpoint.extended.cc +++ b/tests/unit/collection/test_checkpoint.extended.cc @@ -242,7 +242,7 @@ TEST_F(TestCheckpoint, test_checkpoint_1) { }); // Ensure that all elements were properly destroyed - EXPECT_EQ(counter, 0); + EXPECT_EQ(counter, 0ull); } } @@ -315,7 +315,7 @@ TEST_F(TestCheckpoint, test_checkpoint_in_place_2) { }); // Ensure that all elements were properly destroyed - EXPECT_EQ(counter, 0); + EXPECT_EQ(counter, 0ull); } TEST_F(TestCheckpoint, test_checkpoint_in_place_3) { @@ -428,7 +428,7 @@ TEST_F(TestCheckpoint, test_checkpoint_no_elements_on_root_rank) { //verify that root node has no elements, by construction with map if(this_node == 0) { auto local_set = theCollection()->getLocalIndices(proxy); - EXPECT_EQ(local_set.size(), 0); + EXPECT_EQ(local_set.size(), 0ull); } vt_print(gen, "checkpointToFile\n"); diff --git a/tests/unit/collection/test_lb.extended.cc b/tests/unit/collection/test_lb.extended.cc index 15511d158b..2d23f79bf1 100644 --- a/tests/unit/collection/test_lb.extended.cc +++ b/tests/unit/collection/test_lb.extended.cc @@ -188,7 +188,7 @@ TEST_F(TestLoadBalancerOther, test_make_graph_symmetric) { auto const phase = thePhase()->getCurrentPhase(); auto const comm_data = theNodeLBData()->getNodeComm(phase); ASSERT_NE(comm_data, nullptr); - ASSERT_EQ(comm_data->size(), 1); + ASSERT_EQ(comm_data->size(), 1ull); // test auto proxy = theLBManager()->makeLB(); @@ -200,11 +200,11 @@ TEST_F(TestLoadBalancerOther, test_make_graph_symmetric) { // assert if (num_nodes == 1) { - ASSERT_EQ(comm_data->size(), 1); + ASSERT_EQ(comm_data->size(), 1ull); return; } - ASSERT_EQ(comm_data->size(), 2); + ASSERT_EQ(comm_data->size(), 2ull); auto const prev_node = (this_node + num_nodes - 1) % num_nodes; bool this_to_next = false, prev_to_this = false; @@ -439,7 +439,7 @@ TEST_P(TestNodeLBDataDumper, test_node_lb_data_dumping_with_interval) { auto& json = *json_ptr; EXPECT_TRUE(json.find("phases") != json.end()); - EXPECT_EQ(json["phases"].size(), num_phases); + EXPECT_EQ(json["phases"].size(), static_cast(num_phases)); for(const auto& phase : json["phases"]){ EXPECT_TRUE(phase.find("user_defined") != phase.end()); EXPECT_TRUE(phase["user_defined"].contains("time")); diff --git a/tests/unit/collection/test_model_select_subphases.nompi.cc b/tests/unit/collection/test_model_select_subphases.nompi.cc index ec2ee0ec5a..4ab01ce4df 100644 --- a/tests/unit/collection/test_model_select_subphases.nompi.cc +++ b/tests/unit/collection/test_model_select_subphases.nompi.cc @@ -125,7 +125,7 @@ TEST_F(TestModelSelectSubphases, test_model_select_subphases_1) { auto test_model = std::make_shared(std::make_shared(), subphases); - EXPECT_EQ(test_model->getNumSubphases(), subphases.size()); + EXPECT_EQ(test_model->getNumSubphases(), static_cast(subphases.size())); test_model->setLoads(&proc_load, nullptr, nullptr); test_model->updateLoads(0); @@ -174,7 +174,7 @@ TEST_F(TestModelSelectSubphases, test_model_select_subphases_2) { auto test_model = std::make_shared(std::make_shared(), subphases); - EXPECT_EQ(test_model->getNumSubphases(), subphases.size()); + EXPECT_EQ(test_model->getNumSubphases(), static_cast(subphases.size())); test_model->setLoads(&proc_load, nullptr, nullptr); test_model->updateLoads(0); diff --git a/tests/unit/collection/test_workload_data_migrator.cc b/tests/unit/collection/test_workload_data_migrator.cc index 32680266f9..45855ec7cd 100644 --- a/tests/unit/collection/test_workload_data_migrator.cc +++ b/tests/unit/collection/test_workload_data_migrator.cc @@ -240,7 +240,7 @@ TEST_F(TestWorkloadDataMigrator, test_normalize_call) { auto user = new_model->getUserData( obj_id, {PhaseOffset::NEXT_PHASE, PhaseOffset::WHOLE_PHASE} ); - EXPECT_EQ(user.size(), 1); + EXPECT_EQ(user.size(), static_cast(1)); if (user.size() == 1) { auto it = user.find(std::string("tag")); EXPECT_TRUE(it != user.end()); @@ -299,7 +299,7 @@ TEST_F(TestWorkloadDataMigrator, test_move_data_home) { auto user = back_home_model->getUserData( obj_id, {PhaseOffset::NEXT_PHASE, PhaseOffset::WHOLE_PHASE} ); - EXPECT_EQ(user.size(), 1); + EXPECT_EQ(user.size(), static_cast(1)); if (user.size() == 1) { auto it = user.find(std::string("tag")); EXPECT_TRUE(it != user.end()); @@ -372,7 +372,7 @@ TEST_F(TestWorkloadDataMigrator, test_move_some_data_home) { auto user = back_home_if_not_here_model->getUserData( obj_id, {PhaseOffset::NEXT_PHASE, PhaseOffset::WHOLE_PHASE} ); - EXPECT_EQ(user.size(), 1); + EXPECT_EQ(user.size(), static_cast(1)); if (user.size() == 1) { auto it = user.find(std::string("tag")); EXPECT_TRUE(it != user.end()); @@ -435,7 +435,7 @@ TEST_F(TestWorkloadDataMigrator, test_move_data_here_from_home) { auto user = here_model->getUserData( obj_id, {PhaseOffset::NEXT_PHASE, PhaseOffset::WHOLE_PHASE} ); - EXPECT_EQ(user.size(), 1); + EXPECT_EQ(user.size(), static_cast(1)); if (user.size() == 1) { auto it = user.find(std::string("tag")); EXPECT_TRUE(it != user.end()); @@ -509,7 +509,7 @@ TEST_F(TestWorkloadDataMigrator, test_move_some_data_here_from_home) { auto user = here_model->getUserData( obj_id, {PhaseOffset::NEXT_PHASE, PhaseOffset::WHOLE_PHASE} ); - EXPECT_EQ(user.size(), 1); + EXPECT_EQ(user.size(), static_cast(1)); if (user.size() == 1) { auto it = user.find(std::string("tag")); EXPECT_TRUE(it != user.end()); @@ -554,7 +554,7 @@ TEST_F(TestWorkloadDataMigrator, test_move_data_here_from_whereever_1) { // then iterate over it to make sure what shows up here is correct for (auto obj_id : *here_model) { if (obj_id.isMigratable()) { - EXPECT_EQ(migratable_objects_here.count(obj_id), 1); + EXPECT_EQ(migratable_objects_here.count(obj_id), static_cast(1)); EXPECT_EQ(obj_id.getCurrNode(), this_node); @@ -574,7 +574,7 @@ TEST_F(TestWorkloadDataMigrator, test_move_data_here_from_whereever_1) { auto user = here_model->getUserData( obj_id, {PhaseOffset::NEXT_PHASE, PhaseOffset::WHOLE_PHASE} ); - EXPECT_EQ(user.size(), 1); + EXPECT_EQ(user.size(), static_cast(1)); if (user.size() == 1) { auto it = user.find(std::string("tag")); EXPECT_TRUE(it != user.end()); @@ -619,7 +619,7 @@ TEST_F(TestWorkloadDataMigrator, test_move_data_here_from_whereever_2) { // then iterate over it to make sure what shows up here is correct for (auto obj_id : *here_model) { if (obj_id.isMigratable()) { - EXPECT_EQ(migratable_objects_here.count(obj_id), 1); + EXPECT_EQ(migratable_objects_here.count(obj_id), static_cast(1)); EXPECT_EQ(obj_id.getCurrNode(), this_node); @@ -639,7 +639,7 @@ TEST_F(TestWorkloadDataMigrator, test_move_data_here_from_whereever_2) { auto user = here_model->getUserData( obj_id, {PhaseOffset::NEXT_PHASE, PhaseOffset::WHOLE_PHASE} ); - EXPECT_EQ(user.size(), 1); + EXPECT_EQ(user.size(), static_cast(1)); if (user.size() == 1) { auto it = user.find(std::string("tag")); EXPECT_TRUE(it != user.end()); diff --git a/tests/unit/lb/test_lb_data_comm.cc b/tests/unit/lb/test_lb_data_comm.cc index b0ab4e6c69..9eabb5a886 100644 --- a/tests/unit/lb/test_lb_data_comm.cc +++ b/tests/unit/lb/test_lb_data_comm.cc @@ -302,7 +302,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_col_to_col_send) { EXPECT_TRUE(key.from_.isMigratable()); EXPECT_EQ(key.from_.id, idxToElmID(prev_idx)); EXPECT_EQ(vol.bytes, sizeof(MyMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -367,7 +367,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_col_to_objgroup_send) { EXPECT_FALSE(key.to_.isMigratable()); EXPECT_EQ(key.to_.id, idb); EXPECT_EQ(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -430,7 +430,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_objgroup_to_col_send) { EXPECT_FALSE(key.from_.isMigratable()); EXPECT_EQ(key.from_.id, vt::elm::ElmIDBits::createObjGroup(op, prev).id); EXPECT_EQ(vol.bytes, sizeof(MyMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -484,7 +484,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_objgroup_to_objgroup_send) { EXPECT_FALSE(key.from_.isMigratable()); EXPECT_EQ(key.to_.id, idb); EXPECT_EQ(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -541,7 +541,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_handler_to_col_send) { EXPECT_FALSE(key.from_.isMigratable()); EXPECT_EQ(key.from_.id, vt::elm::ElmIDBits::createBareHandler(prev).id); EXPECT_EQ(vol.bytes, sizeof(MyMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -602,7 +602,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_col_to_handler_send) { EXPECT_FALSE(key.to_.isMigratable()); EXPECT_EQ(key.to_.id, vt::elm::ElmIDBits::createBareHandler(next).id); EXPECT_EQ(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -649,7 +649,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_objgroup_to_handler_send) { EXPECT_EQ(key.to_.id, vt::elm::ElmIDBits::createBareHandler(next).id); EXPECT_FALSE(key.from_.isMigratable()); EXPECT_EQ(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -694,7 +694,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_handler_to_objgroup_send) { EXPECT_EQ(key.from_.id, vt::elm::ElmIDBits::createBareHandler(this_node).id); EXPECT_FALSE(key.from_.isMigratable()); EXPECT_EQ(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_EQ(vol.messages, num_sends); + EXPECT_EQ(vol.messages, static_cast(num_sends)); found = true; } } @@ -734,7 +734,7 @@ TEST_F(TestLBDataComm, test_lb_data_comm_handler_to_handler_send) { EXPECT_FALSE(key.to_.isMigratable()); EXPECT_FALSE(key.from_.isMigratable()); EXPECT_GE(vol.bytes, sizeof(MyObjMsg) * num_sends); - EXPECT_GE(vol.messages, num_sends); + EXPECT_GE(vol.messages, static_cast(num_sends)); found = true; } } diff --git a/tests/unit/lb/test_lb_reader.nompi.cc b/tests/unit/lb/test_lb_reader.nompi.cc index 5da78769d9..1ac64cfb7c 100644 --- a/tests/unit/lb/test_lb_reader.nompi.cc +++ b/tests/unit/lb/test_lb_reader.nompi.cc @@ -69,8 +69,8 @@ TEST_F(TestLBReader, test_lb_read_1) { EXPECT_EQ(Config::hasOfflineLB(), false); EXPECT_EQ(Config::numEntries(), 3); - EXPECT_EQ(Config::getExactEntries().size(), 2); - EXPECT_EQ(Config::getModEntries().size(), 1); + EXPECT_EQ(Config::getExactEntries().size(), 2u); + EXPECT_EQ(Config::getModEntries().size(), 1u); for (ConfigIdx i = 0; i < 21; i++) { auto entry = Config::entry(i); diff --git a/tests/unit/objgroup/test_objgroup.cc b/tests/unit/objgroup/test_objgroup.cc index ddfc690cd0..0d742a606a 100644 --- a/tests/unit/objgroup/test_objgroup.cc +++ b/tests/unit/objgroup/test_objgroup.cc @@ -79,7 +79,7 @@ struct TestObjGroup : TestParallelHarness { void verifyVec(VectorPayload vec) { auto final_size = vec.vec_.size(); auto n = vt::theContext()->getNumNodes(); - EXPECT_EQ(final_size, n); + EXPECT_EQ(final_size, static_cast(n)); total_verify_expected_++; } }; diff --git a/tests/unit/phase/test_phase_management.cc b/tests/unit/phase/test_phase_management.cc index 98f7baf147..a32ca0513e 100644 --- a/tests/unit/phase/test_phase_management.cc +++ b/tests/unit/phase/test_phase_management.cc @@ -55,7 +55,7 @@ TEST_F(TestPhaseManagement, test_phase_manager_1) { auto phase_mgr = phase::PhaseManager::construct(); // start with phase 0 - EXPECT_EQ(phase_mgr->getCurrentPhase(), 0); + EXPECT_EQ(phase_mgr->getCurrentPhase(), 0ull); int start_hooks = 0; int end_hooks = 0; @@ -97,13 +97,13 @@ TEST_F(TestPhaseManagement, test_phase_manager_1) { EXPECT_EQ(start_hooks, 3); EXPECT_EQ(end_hooks, 1); EXPECT_EQ(end_post_hooks, 1); - EXPECT_EQ(phase_mgr->getCurrentPhase(), 1); + EXPECT_EQ(phase_mgr->getCurrentPhase(), 1ull); phase_mgr->nextPhaseCollective(); EXPECT_EQ(start_hooks, 4); EXPECT_EQ(end_hooks, 2); EXPECT_EQ(end_post_hooks, 2); - EXPECT_EQ(phase_mgr->getCurrentPhase(), 2); + EXPECT_EQ(phase_mgr->getCurrentPhase(), 2ull); } }}} // end namespace vt::tests::unit diff --git a/tests/unit/runtime/test_initialization.cc b/tests/unit/runtime/test_initialization.cc index 465683f226..441013f68a 100644 --- a/tests/unit/runtime/test_initialization.cc +++ b/tests/unit/runtime/test_initialization.cc @@ -337,6 +337,8 @@ TEST_F(TestInitialization, test_initialize_with_yaml) { Configuration File: Enable Output Config: True File: test_config.yaml + Visualization: + Enabled: False )"; cfg_file_.close(); } @@ -499,6 +501,10 @@ TEST_F(TestInitialization, test_initialize_with_yaml) { EXPECT_EQ(theConfig()->vt_no_assert_fail, false); EXPECT_EQ(theConfig()->vt_throw_on_abort, true); + // Visualization + EXPECT_EQ(theConfig()->vt_tv, false); + EXPECT_EQ(theConfig()->vt_tv_config_file, ""); + // TEST THAT THE CONFIGURATION FILE WAS WRITTEN OUT CORRECTLY YAML::Node input_config = YAML::LoadFile(config_file); YAML::Node output_config = YAML::Load(theConfig()->vt_output_config_str); diff --git a/tests/unit/termination/test_integral_set.cc b/tests/unit/termination/test_integral_set.cc index adc4b39cc1..b5df66fe5e 100644 --- a/tests/unit/termination/test_integral_set.cc +++ b/tests/unit/termination/test_integral_set.cc @@ -177,7 +177,7 @@ TEST_F(TestIntegralSet, test_interval_set_3) { i.insert(0); EXPECT_FALSE(i.empty()); - EXPECT_EQ(i.size(), 1); + EXPECT_EQ(i.size(), 1ull); } }}} // end namespace vt::tests::unit diff --git a/tests/unit/utils/test_histogram_approx.nompi.cc b/tests/unit/utils/test_histogram_approx.nompi.cc index ab21d3a8e9..f0379bc356 100644 --- a/tests/unit/utils/test_histogram_approx.nompi.cc +++ b/tests/unit/utils/test_histogram_approx.nompi.cc @@ -93,7 +93,7 @@ TEST_F(TestHistogramApprox, test_histogram_2) { EXPECT_EQ(h.getMin(), 1); EXPECT_EQ(h.getMax(), 92); EXPECT_EQ(h.getCount(), len); - EXPECT_EQ(h.getCentroids().size(), 4); + EXPECT_EQ(h.getCentroids().size(), 4u); } TEST_F(TestHistogramApprox, test_histogram_sum_3) { @@ -247,7 +247,7 @@ TEST_F(TestHistogramApprox, test_histogram_merge_7) { auto centroids = h1.getCentroids(); // Must be 8 centroids if merge/max was applied correctly - EXPECT_EQ(centroids.size(), 8); + EXPECT_EQ(centroids.size(), 8ull); // We should have all the original centroids, except the last one, which // should be a single combined centroids of the last three values if optimal