diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9cede3bb..55467aa71 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,6 +95,11 @@ extends: - .docker_image +.ubuntu2004: &ubuntu2004 + image: "kitware/vtkm:ci-ubuntu2004-20210920" + extends: + - .docker_image + .ubuntu2004_kokkos: &ubuntu2004_kokkos image: "kitware/vtkm:ci-ubuntu2004_kokkos-20210916" extends: diff --git a/.gitlab/ci/docker/ubuntu2004/base/Dockerfile b/.gitlab/ci/docker/ubuntu2004/base/Dockerfile new file mode 100644 index 000000000..989c7a421 --- /dev/null +++ b/.gitlab/ci/docker/ubuntu2004/base/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:20.04 +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 \ + cmake \ + curl \ + g++ \ + git \ + git-lfs \ + libmpich-dev \ + libomp-dev \ + libtbb-dev \ + libhdf5-dev \ + mpich \ + ninja-build \ + software-properties-common + +# Need to run git-lfs install manually on ubuntu based images when using the +# system packaged version +RUN git-lfs install diff --git a/.gitlab/ci/ubuntu2004.yml b/.gitlab/ci/ubuntu2004.yml index 9b63a884c..bed966203 100644 --- a/.gitlab/ci/ubuntu2004.yml +++ b/.gitlab/ci/ubuntu2004.yml @@ -1,3 +1,36 @@ +build:ubuntu2004_gcc9: + tags: + - build + - vtkm + - docker + - linux + extends: + - .ubuntu2004 + - .cmake_build_linux + - .only-default + variables: + CMAKE_BUILD_TYPE: Debug + VTKM_SETTINGS: "benchmarks+tbb+openmp+mpi+shared+hdf5" + +test:ubuntu2004_gcc9: + tags: + - test + - vtkm + - docker + - linux + extends: + - .ubuntu2004 + - .cmake_test_linux + - .only-default + variables: + #Restrict OpenMP number of threads since multiple test stages + #execute on the same hardware concurrently + OMP_NUM_THREADS: 4 + dependencies: + - build:ubuntu2004_gcc9 + needs: + - build:ubuntu2004_gcc9 + build:ubuntu2004_kokkos: tags: - build diff --git a/CMake/VTKmDeviceAdapters.cmake b/CMake/VTKmDeviceAdapters.cmake index dc892f91b..006448e72 100644 --- a/CMake/VTKmDeviceAdapters.cmake +++ b/CMake/VTKmDeviceAdapters.cmake @@ -46,11 +46,11 @@ if(VTKm_ENABLE_TBB AND NOT TARGET vtkm::tbb) add_library(vtkmTBB INTERFACE) add_library(vtkm::tbb ALIAS vtkmTBB) target_link_libraries(vtkmTBB INTERFACE TBB::tbb) + target_compile_definitions(vtkmTBB INTERFACE "TBB_VERSION_MAJOR=${TBB_VERSION_MAJOR}") set_target_properties(vtkmTBB PROPERTIES EXPORT_NAME vtkm::tbb) install(TARGETS vtkmTBB EXPORT ${VTKm_EXPORT_NAME}) endif() - if(VTKm_ENABLE_OPENMP AND NOT TARGET vtkm::openmp) find_package(OpenMP 4.0 REQUIRED COMPONENTS CXX QUIET) diff --git a/benchmarking/BenchmarkFilters.cxx b/benchmarking/BenchmarkFilters.cxx index 236e2e596..ba34a4701 100644 --- a/benchmarking/BenchmarkFilters.cxx +++ b/benchmarking/BenchmarkFilters.cxx @@ -53,9 +53,6 @@ #include #include -#ifdef VTKM_ENABLE_TBB -#include -#endif #ifdef VTKM_ENABLE_OPENMP #include #endif diff --git a/vtkm/cont/tbb/internal/ParallelSortTBB.cxx b/vtkm/cont/tbb/internal/ParallelSortTBB.cxx index d99406954..73db80ed6 100644 --- a/vtkm/cont/tbb/internal/ParallelSortTBB.cxx +++ b/vtkm/cont/tbb/internal/ParallelSortTBB.cxx @@ -53,7 +53,13 @@ // correct settings so that we don't clobber any existing function #include +#if TBB_VERSION_MAJOR >= 2020 +#include +#include +#else #include +#endif + #include #if defined(VTKM_MSVC) diff --git a/vtkm/cont/tbb/internal/RuntimeDeviceConfigurationTBB.h b/vtkm/cont/tbb/internal/RuntimeDeviceConfigurationTBB.h index fdb170ea4..b030a44a0 100644 --- a/vtkm/cont/tbb/internal/RuntimeDeviceConfigurationTBB.h +++ b/vtkm/cont/tbb/internal/RuntimeDeviceConfigurationTBB.h @@ -14,7 +14,13 @@ #include VTKM_THIRDPARTY_PRE_INCLUDE +#if TBB_VERSION_MAJOR >= 2020 +#define TBB_PREVIEW_GLOBAL_CONTROL +#include +#include +#else #include +#endif VTKM_THIRDPARTY_POST_INCLUDE #include