Commit 46b02688 authored by Vicente Bolea's avatar Vicente Bolea 💬 Committed by Vicente Bolea
Browse files

CI: add ubuntu2004 with tbb 2020 build

parent 7aae612d
Pipeline #248976 running with stage
......@@ -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:
......
FROM ubuntu:20.04
LABEL maintainer "Vicente Adolfo Bolea Sanchez<vicente.bolea@kitware.com>"
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
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
......
......@@ -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)
......
......@@ -53,9 +53,6 @@
#include <sstream>
#include <type_traits>
#ifdef VTKM_ENABLE_TBB
#include <tbb/tbb.h>
#endif
#ifdef VTKM_ENABLE_OPENMP
#include <omp.h>
#endif
......
......@@ -53,7 +53,13 @@
// correct settings so that we don't clobber any existing function
#include <vtkm/internal/Windows.h>
#if TBB_VERSION_MAJOR >= 2020
#include <tbb/task.h>
#include <tbb/task_group.h>
#else
#include <tbb/tbb.h>
#endif
#include <thread>
#if defined(VTKM_MSVC)
......
......@@ -14,7 +14,13 @@
#include <vtkm/cont/tbb/internal/DeviceAdapterTagTBB.h>
VTKM_THIRDPARTY_PRE_INCLUDE
#if TBB_VERSION_MAJOR >= 2020
#define TBB_PREVIEW_GLOBAL_CONTROL
#include <tbb/global_control.h>
#include <tbb/task_arena.h>
#else
#include <tbb/tbb.h>
#endif
VTKM_THIRDPARTY_POST_INCLUDE
#include <memory>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment