diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 77324c664..91381f6b3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -81,7 +81,7 @@ - .docker_image .ubuntu1804_cuda: &ubuntu1804_cuda - image: "kitware/vtkm:ci-ubuntu1804_cuda11.6-20220407" + image: "kitware/vtkm:ci-ubuntu1804_cuda11-20220919" extends: - .docker_image @@ -96,7 +96,7 @@ - .docker_image .ubuntu2004: &ubuntu2004 - image: "kitware/vtkm:ci-ubuntu2004-20210920" + image: "kitware/vtkm:ci-ubuntu2004-20220623" extends: - .docker_image diff --git a/.gitlab/ci/config/google_benchmarks.sh b/.gitlab/ci/config/google_benchmarks.sh index 5e8aef597..e778c5170 100755 --- a/.gitlab/ci/config/google_benchmarks.sh +++ b/.gitlab/ci/config/google_benchmarks.sh @@ -22,6 +22,9 @@ tar xf "$tarball" mkdir build mkdir "$install_dir" -cmake -GNinja -S benchmark* -B build -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON +cmake -GNinja -S benchmark* -B build \ + -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON \ + -DCMAKE_BUILD_TYPE="Release" + cmake --build build cmake --install build --prefix "$install_dir" diff --git a/.gitlab/ci/config/initial_config.cmake b/.gitlab/ci/config/initial_config.cmake index 2d4c84517..6c12cfe97 100644 --- a/.gitlab/ci/config/initial_config.cmake +++ b/.gitlab/ci/config/initial_config.cmake @@ -107,6 +107,9 @@ foreach(option IN LISTS options) set(VTKm_CUDA_Architecture "turing" CACHE STRING "") endif() + elseif(ampere STREQUAL option) + set(CMAKE_CUDA_ARCHITECTURES "80" CACHE STRING "") + elseif(hip STREQUAL option) if(CMAKE_VERSION VERSION_LESS_EQUAL 3.20) message(FATAL_ERROR "VTK-m requires cmake > 3.20 to enable HIP support") @@ -154,6 +157,9 @@ foreach(option IN LISTS options) else() message(FATAL_ERROR "CCACHE version [${CCACHE_VERSION}] is <= 4") endif() + + elseif(perftest STREQUAL option) + set(VTKm_ENABLE_PERFORMANCE_TESTING "ON" CACHE STRING "") endif() endforeach() diff --git a/.gitlab/ci/ctest_test.cmake b/.gitlab/ci/ctest_test.cmake index 3b1a3d432..2c37cae1b 100644 --- a/.gitlab/ci/ctest_test.cmake +++ b/.gitlab/ci/ctest_test.cmake @@ -29,7 +29,7 @@ set(test_exclusions string(REPLACE " " ";" test_exclusions "${test_exclusions}") string(REPLACE ";" "|" test_exclusions "${test_exclusions}") if (test_exclusions) - set(test_exclusions "(${test_exclusions})") + set(test_exclusions EXCLUDE "(${test_exclusions})") endif () if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.21) @@ -41,17 +41,32 @@ if (DEFINED ENV{CTEST_MAX_PARALLELISM}) set(PARALLEL_LEVEL $ENV{CTEST_MAX_PARALLELISM}) endif() +if (DEFINED ENV{TEST_INCLUSIONS}) + set(test_inclusions INCLUDE $ENV{TEST_INCLUSIONS}) + unset(test_exclusions) +endif() + + ctest_test(APPEND PARALLEL_LEVEL ${PARALLEL_LEVEL} RETURN_VALUE test_result - EXCLUDE "${test_exclusions}" + ${test_exclusions} + ${test_inclusions} REPEAT "UNTIL_PASS:${CTEST_REPEAT_UNTIL_PASS}" ${junit_args} ) message(STATUS "ctest_test RETURN_VALUE: ${test_result}") +if(VTKm_ENABLE_PERFORMANCE_TESTING) + file(GLOB note_files + "${CTEST_BINARY_DIRECTORY}/benchmark_*.stdout" + "${CTEST_BINARY_DIRECTORY}/compare_*.stdout" + "${CTEST_BINARY_DIRECTORY}/$ENV{CI_COMMIT_SHA}_*.json") + list(APPEND CTEST_NOTES_FILES ${note_files}) +endif() + if(NOT DEFINED ENV{GITLAB_CI_EMULATION}) - ctest_submit(PARTS Test BUILD_ID build_id) + ctest_submit(PARTS Test Notes BUILD_ID build_id) message(STATUS "Test submission build_id: ${build_id}") endif() diff --git a/.gitlab/ci/docker/ubuntu1804/cuda/Dockerfile b/.gitlab/ci/docker/ubuntu1804/cuda/Dockerfile new file mode 100644 index 000000000..a1eb81f13 --- /dev/null +++ b/.gitlab/ci/docker/ubuntu1804/cuda/Dockerfile @@ -0,0 +1,24 @@ +FROM nvidia/cuda:11.7.1-devel-ubuntu18.04 +LABEL maintainer "Vicente Adolfo Bolea Sanchez " + +# Base dependencies for building VTK-m projects +RUN apt-get update && apt-get install -y --no-install-recommends \ + clang-8 \ + curl \ + g++-8 \ + git \ + libmpich-dev \ + libomp-dev \ + libtbb-dev \ + mpich \ + ninja-build \ + python3 \ + python3-scipy \ + && \ + rm -rf /var/lib/apt/lists/* + +# Install Git LFS from official tarball, repo version is too old +RUN curl -OL https://github.com/git-lfs/git-lfs/releases/download/v3.2.0/git-lfs-linux-amd64-v3.2.0.tar.gz && \ + tar -xvzf git-lfs-linux-amd64-v3.2.0.tar.gz && \ + ./git-lfs-3.2.0/install.sh && \ + rm -rf ./git-lfs-3.2.0 diff --git a/.gitlab/ci/docker/ubuntu1804/cuda11.1/Dockerfile b/.gitlab/ci/docker/ubuntu1804/cuda11.1/Dockerfile deleted file mode 100644 index ef7b91123..000000000 --- a/.gitlab/ci/docker/ubuntu1804/cuda11.1/Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM nvidia/cuda:11.6.1-devel-ubuntu18.04 -LABEL maintainer "Robert Maynard" - -# Base dependencies for building VTK-m projects -RUN apt-get update && apt-get install -y --no-install-recommends \ - curl \ - g++-8 \ - clang-8 \ - git \ - git-lfs \ - libmpich-dev \ - libomp-dev \ - libtbb-dev \ - mpich \ - ninja-build \ - && \ - rm -rf /var/lib/apt/lists/* - -# Need to run git-lfs install manually on ubuntu based images when using the -# system packaged version -RUN git-lfs install - -# Provide a consistent CMake path across all images -# Allow tests that require CMake to work correctly -RUN mkdir /opt/cmake && \ - curl -L https://github.com/Kitware/CMake/releases/download/v3.16.7/cmake-3.16.7-Linux-x86_64.sh > cmake-3.16.7-Linux-x86_64.sh && \ - sh cmake-3.16.7-Linux-x86_64.sh --prefix=/opt/cmake/ --exclude-subdir --skip-license && \ - rm cmake-3.16.7-Linux-x86_64.sh - -# Provide CMake 3.17 so we can re-run tests easily -# This will be used when we run just the tests -RUN mkdir /opt/cmake-latest/ && \ - curl -L https://github.com/Kitware/CMake/releases/download/v3.17.3/cmake-3.17.3-Linux-x86_64.sh > cmake-3.17.3-Linux-x86_64.sh && \ - sh cmake-3.17.3-Linux-x86_64.sh --prefix=/opt/cmake-latest/ --exclude-subdir --skip-license && \ - rm cmake-3.17.3-Linux-x86_64.sh && \ - ln -s /opt/cmake-latest/bin/ctest /opt/cmake-latest/bin/ctest-latest - -ENV PATH "/opt/cmake/bin:/opt/cmake-latest/bin:${PATH}" diff --git a/.gitlab/ci/docker/ubuntu2004/base/Dockerfile b/.gitlab/ci/docker/ubuntu2004/base/Dockerfile index 989c7a421..9f88be281 100644 --- a/.gitlab/ci/docker/ubuntu2004/base/Dockerfile +++ b/.gitlab/ci/docker/ubuntu2004/base/Dockerfile @@ -4,7 +4,7 @@ LABEL maintainer "Vicente Adolfo Bolea Sanchez" ENV TZ=America/New_York # Base dependencies for building VTK-m projects -RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \ +RUN apt update && DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends \ cmake \ curl \ g++ \ @@ -16,7 +16,10 @@ RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-i libhdf5-dev \ mpich \ ninja-build \ - software-properties-common + python \ + python3-scipy \ + software-properties-common && \ + apt clean # Need to run git-lfs install manually on ubuntu based images when using the # system packaged version diff --git a/.gitlab/ci/ubuntu1804.yml b/.gitlab/ci/ubuntu1804.yml index 3a1336639..c1f7789b2 100644 --- a/.gitlab/ci/ubuntu1804.yml +++ b/.gitlab/ci/ubuntu1804.yml @@ -220,3 +220,39 @@ test:ubuntu1804_kokkos: - build:ubuntu1804_kokkos needs: - build:ubuntu1804_kokkos + +build:ubuntu1804_cuda_perftest: + tags: + - build + - vtkm + - docker + - linux + extends: + - .ubuntu1804_cuda + - .cmake_build_linux + - .run_automatically + variables: + CMAKE_BUILD_TYPE: Release + VTKM_SETTINGS: "benchmarks+ampere+perftest+cuda+mpi+shared" + +test:ubuntu1804_cuda_perftest: + tags: + - benchmark + - vtkm + - docker + - cuda-rt + - linux + extends: + - .ubuntu1804_cuda + - .cmake_test_linux + - .run_automatically + dependencies: + - build:ubuntu1804_cuda_perftest + needs: + - build:ubuntu1804_cuda_perftest + variables: + TEST_INCLUSIONS: "PerformanceTest" + VTKm_PERF_REMOTE_URL: "https://vbolea:$VTKM_BENCH_RECORDS_TOKEN@gitlab.kitware.com/vbolea/vtk-m-benchmark-records.git" + VTKm_PERF_ALPHA: "0.05" + VTKm_PERF_REPETITIONS: "10" + VTKm_PERF_DIST: "t" diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 2b9423c69..995f94349 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -59,3 +59,5 @@ set(CTEST_REPEAT_UNTIL_PASS 3) if (NOT x"@CMAKE_HIP_COMPILER@"x STREQUAL xx) set(CTEST_REPEAT_UNTIL_PASS 0) endif() + +set(VTKm_ENABLE_PERFORMANCE_TESTING "@VTKm_ENABLE_PERFORMANCE_TESTING@")